I need to be able to find exact text matches, not raw matches so I can take advantage of fuzzy matching. For example, consider these documents:
doc1.name = "cheese pizza"
doc2.name = "kid's cheese pizza"
doc3.name = "pizza"
doc4.name = "cheese pizza deluxe"
doc5.name = "cheese only pizza"
A standard query for "pizza" would return all of those documents scored, but not return the single document that's needed, doc3 in this case. If I search for "cheese pizza", I need doc1 to be returned.
I found this link to be helpful in that it discusses the idea of storing a second field (perhaps "nameCount") with the number of terms in the searched field.
Is there a way to have ES compute the number of terms (after stop words) during document insertion, and then also compute the number of terms of the query to account for same stop words, assume using a script?
Can someone recommend a better approach or share links to solutions? Thanks!