Search for short words with SOLR
Posted
by Carsten Gehling
on Stack Overflow
See other posts from Stack Overflow
or by Carsten Gehling
Published on 2010-06-11T08:16:42Z
Indexed on
2010/06/11
8:43 UTC
Read the original article
Hit count: 429
I am using SOLR along with NGramTokenizerFactory to help create search tokens for substrings of words
NGramTokenizer is configured with a minimum word length of 3
This means that I can search for e.g. "unb" and then match the word "unbelievable".
However I have a problem with short words like "I" and "in". These are not indexed by SOLR (I suspect it is because of NGramTokenizer) and therefore I cannot search for them.
I don't want to reduce the minimum word length to 1 or 2, since this creates a huge search index. But I would like SOLR to include whole words whose length is already below this minimum.
How can I do that?
/Carsten
© Stack Overflow or respective owner