lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Valdivia <h...@danielvaldivia.com>
Subject Re: EdgeNGramFilterFactory not working? Solr 5.3.1
Date Tue, 17 Nov 2015 23:42:39 GMT
Hi Markus,

I did, everytime I run this experiment I start from 0 :)

However, after the last change I did seems like I forgot to commit and I couldn't get results,
so now I have some results.

The resolution to this problem was specifying the search in the dispNamePrefix field :O

Thanks Markus and Alexandre

> On Nov 17, 2015, at 3:40 PM, Markus Jelsma <markus.jelsma@openindex.io> wrote:
> 
> Hi - the usual suspect is: 'did you reindex?' Not seeing things change after modifying
index-time analysis chains means you need to reindex.
> 
> M.
> 
> 
> 
> -----Original message-----
>> From:Daniel Valdivia <hola@danielvaldivia.com>
>> Sent: Wednesday 18th November 2015 0:17
>> To: solr-user@lucene.apache.org
>> Subject: EdgeNGramFilterFactory not working? Solr 5.3.1
>> 
>> 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