lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <j...@basetechnology.com>
Subject Re: split on white space and then EdgeNGramFilterFactory
Date Thu, 02 Aug 2012 12:34:45 GMT
Only do the ngram filter at index time. So, add a query-time analyzer to 
that field type but without the ngram filter.

Also, add &debugQuery to your query request to see what Lucene query is 
generated.

And, use the Solr admin analyzer to validate both index-time and query-time 
analysis of your terms.

-- Jack Krupansky

-----Original Message----- 
From: Rajani Maski
Sent: Thursday, August 02, 2012 7:26 AM
To: solr-user@lucene.apache.org
Subject: split on white space and then EdgeNGramFilterFactory

Hi,

   I wanted to do split on white space and then apply
EdgeNGramFilterFactory.

Example : A field in a document has text content : "smart phone, i24
xpress exchange offer, 500 dollars"

smart s sm sma smar smart
phone p ph pho phon phone
i24  i i2 i24
xpress x xp xpr xpre xpres xpress

so on.....

If I search on  "xpres"  I should get this document record matched

What field type can support this?

I was trying with below one but was not able to achieve the above
requirement.

<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.EdgeNGramFilterFactory" minGramSize="1" maxGramSize="25"
/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</type>

Any suggestions?

Thanks,
Rajani 


Mime
View raw message