lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guilleret Florian <guilleret.flor...@gmail.com>
Subject EdgeNGramFilterFactory did not work
Date Thu, 17 Aug 2017 12:41:35 GMT
Hi,

I want to got this use :

My document got SKU. Like : 27VAN670

When i query 27VAN670 solr return my document well.

But when i query 27VAN solr return 0 document;

So someone telle me to use EdgeNGramFilterFactory.

With SOLR Api I add new Field Type :

{
          "add-field-type" : {
             "name":"textNgram2",
             "class":"solr.TextField",
             "positionIncrementGap":"100",
             "analyzer" : {
                "tokenizer":{
                   "class":"solr.StandardTokenizerFactory" },
                "filters":[{
                   "class":"solr.EdgeNGramFilterFactory",
                   "minGramSize":"1",
                   "maxGramSize":"15"
                   }]}
           }

        }

And I also create a new Field :

{
              "add-field":{
                 "name":"textNgramStr2",
                 "type":"textNgram2",
                 "stored":true,
                 "indexed":true
                  }
            }

Now in SOLR admin I cans saw my new textNgramStr2. And when I update
my document in solr I put SKU of my product in textNgramStr2.

But solr still found nothing when I request 27VAN

Can someone help me on that ?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message