How i can search by part of word with dismax? For example when my query is "wor" i want get results with "word" "world" "adwords" etc. fields values. Is it possible?
Asked
Active
Viewed 882 times
1 Answers
2
Check for EdgeNGramFilterFactory filter
<filter class="solr.EdgeNGramFilterFactory" minGramSize="3" maxGramSize="25" side="front"/>
EdgeNGramFilterFactory generates edge grams for the token e.g.
word
would generate -> wo, wor, word .....
You can use this at index time to generate the tokens.
So when you search for wor
, documents with word
would match
However, if you want to search in the mid of the words check for NGramFilterFactory

Jayendra
- 52,349
- 4
- 80
- 90
-
Thanks a lot! I have one more question. How be with integer and date types? Do you know solution for it? – user2208348 Jul 15 '13 at 07:47
-
treat the number as string with edge gram filter applied. – Jayendra Jul 15 '13 at 07:48