Match only the same tokens


(Kseniia Pelykh) #1

Hi,

I have this situation: I want to get documents that have the same tokens as my query. Not documents that can have more tokens that my query as match_phrase does.
I can't use term because I need to consider also synonyms and stopwords and also I have to ignore the position of tokens

Example:
brown fox matches brown fox
brown fox matches fox brown
brown fox doesn't match brown fox and dog

Can you help me with this issue?

Thank you.


(Mark Harwood) #2

Maybe thefingerprint token filter is what you need. It de-dups tokens though so brown fox would match fox brown brown


(Kseniia Pelykh) #3

Thank you a lot Mark,
I will try this token.


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.