I have a question which closely relates to this question.
In my schema I have a field
<field name="text" type="textgen" indexed="true" stored="true" required="true"/>
This gives an exact match, ie. stemming disabled
eat = eat
Is it possible, while configured to textgen to search for other variants of the word
eg. eat = eat, eats, eating
eat~0 will give similar sounding words such as meat, beat etc. but this is not what I want.
I’m starting to think that the only way to achieve this is to add another field with something other then textgen but if there is a simpler way I am very interested to hear it.
Using
copyfieldstatements is the normal approach in Solr. Sincestemmingis the answer to exactly what you’re asking, this is what I recommend you to use. You can setstored=falseif you are worried about index size.You might also use
lemmatisation, which is the opposite of stemming – where you instead add a words all inflected forms. This is typically performed on the search query, expanding e.g.,eattoeat, eats, eatingetc.The third alternative might be to use wildcard search, although I wouldn’t encourage it. Not least since it bypasses all schema configured filters for the target field.