lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandre Rafalovitch <arafa...@gmail.com>
Subject Re: EdgeNGramFilterFactory not working? Solr 5.3.1
Date Tue, 17 Nov 2015 23:25:17 GMT
Here would be my debugging sequence:

1. Are you actually searching against: dispNamePrefix (and not against
the default text field which has its own analyzer stack)?
2. Do you see the field definition in the Schema Browser screen?
3. If you on that screen, click "Load Term Info" do you see the partial terms?
4. If you go to the Analysis screen, you should be able to select the
field (or the type) from the drop-down and put both text to index and
text to search and see what happens to them and whether they match.

Regards,
   Alex.
----
Newsletter and resources for Solr beginners and intermediates:
http://www.solr-start.com/


On 17 November 2015 at 18:17, Daniel Valdivia <hola@danielvaldivia.com> wrote:
> Hi,
>
> I'm trying to get the EdgeNGramFilterFactory filter to work on a certain field, however
after defining the fieldType, creating a field for it and copying the source, this doesn't
seem to be working.
>
> One catch here, that I'm not sure if it's affecting the outcome is that none of my fields
are stored, everything but the document id in my index is stored=false
>
> I'm using Solr 5.3.1, and I know in my corpus the word "incident" is present, I can search
for it, but looking for "inci" yields no results
>
> http://localhost:8983/solr/superCore/select?q=inci&fl=record_display_name&wt=json&indent=true
>
> Any idea on what could I be doing wrong?
>
> This is how I define the field type
>
> {
>   "add-field-type" : {
>     "indexed" : true,
>     "queryAnalyzer" : {
>       "filters" : [
>         {
>           "class" : "solr.LowerCaseFilterFactory"
>         }
>       ],
>       "tokenizer" : {
>         "class" : "solr.WhitespaceTokenizerFactory"
>       }
>     },
>     "indexAnalyzer" : {
>       "filters" : [
>         {
>           "class" : "solr.LowerCaseFilterFactory"
>         },
>         {
>           "class" : "solr.EdgeNGramFilterFactory",
>           "minGramSize" : "2",
>           "maxGramSize" : "10"
>         }
>       ],
>       "tokenizer" : {
>         "class" : "solr.WhitespaceTokenizerFactory"
>       }
>     },
>     "stored" : false,
>     "name" : "prefix",
>     "class" : "solr.TextField"
>   }
> }
>
> Adding the field
>
> {
>   "add-field":{
>      "name":"dispNamePrefix",
>      "type":"prefix",
>      "stored":false }
> }
>
> Copy field
>
> {
>   "add-copy-field":{
>      "source":"record_display_name",
>      "dest":[ "dispNamePrefix"]}
> }

Mime
View raw message