I think you should skip spaces before indexing and querying followed by a
filter of EdgeNGramFilterFactory at index time. This may requre you to work
on your data before indexing & querying. Point is we do not want to make
tokens by breaking them into spaces. So indexing and query time should be
the entire keyword minus space(all lowercases ofcourse). Your example1 will
be indexed as bestbuy and example2 as circuitcity (followed by a filter of
EdgeNGramFilterFactory)

So your fieldType will have something like this:

<analyzer type="index">
      <tokenizer class="solr.KeywordTokenizerFactory"/>
      <filter class="solr.LowerCaseFilterFactory"/>
      <filter class="solr.EdgeNGramFilterFactory" minGramSize="1"
maxGramSize="25"/>
</analyzer>
<analyzer type="query">
      <tokenizer class="solr.KeywordTokenizerFactory"/>
     <filter class="solr.LowerCaseFilterFactory"/>
</analyzer>

This is actually a hack. We use this for autosuggestions and all. But this
should work in your case.





--
View this message in context: 
http://lucene.472066.n3.nabble.com/What-filter-to-use-to-search-with-spaces-omitted-included-between-words-tp4085576p4085600.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to