lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@odoko.co.uk>
Subject Re: How to wildcard
Date Thu, 15 Nov 2012 20:54:26 GMT
You could use a solr.EdgeNGramFilterFactory, which would index
edge-ngrams, thus:

Exustar:
ex
exu
exus
exust
exusta
exustar

SM312
sm
sm3
sm31
sm312

etc

This would make your indexing slower, and your index bigger, but your
queries would be faster and you wouldn't need to infix wildcard *
characters within your query string (which is always risky).

Upayavira

On Thu, Nov 15, 2012, at 05:44 PM, David Alyea wrote:
> I'm coming from the world of having perfected grep searching,
> and now I'm using solr with great results so far.  Still, I have some
> searches I'm trying to figure out.
> 
> My users might be searching for:
> 
> Exustar SM312 Carbon Mountain Bike Shoes
> 
> by typing in the search "sm3 carbon".  Then want to see
> all the SM312, SM345, SM389 and other matching shoes.
> 
> Right now, my solr search misses all of these shoes.  My solr
> setup is pretty standard, I've only added these filters to my
> main text search field:
> 
> to index:
> <filter class="solr.PorterStemFilterFactory"/>
> <filter class="solr.KStemFilterFactory"/>
> <filter class="solr.EnglishMinimalStemFilterFactory"/>
> 
> to query:
> <filter class="solr.SnowballPorterFilterFactory" language="English" />
> 
> Any recommendations on how to handle wildcarding in this case?

Mime
View raw message