I have a situation where I need to use both EdgeNGramFilterFactory and NGramFilterFactory.
I am using NGramFilterFactory to perform a \"contains\" style search with min
You don't necessarily have to do all this in the same field. I would create a different fields using different custom types for each treatment so that you can apply the logic separately.
In the following:
text
contains the original tokens, minimally processed; text_ngram
uses the NGramFilter for your two-character-minimum tokenstext_first_letter
uses EdgeNGram for your one-character initial-letter tokensIf you're processing all text
fields in this way, then you might be able to get away with using a copyField
to populate the fields. Otherwise, you can instruct your Solr client to send in the same field values for the three separate field types.
When searching, include all of them in your searches with the qf
parameter.
Setting up field
and dynamicField
definitions are left up to you. Or let me know if you have more questions and I can edit with clarifications.