lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Valdivia <h...@danielvaldivia.com>
Subject EdgeNGramFilterFactory not working? Solr 5.3.1
Date Tue, 17 Nov 2015 23:17:03 GMT
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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message