How to use min_term_freq with bool query?

I have this query:


and I want to exclude results that have the term mentioned 1 times.

I have already tried more like this api without any luck. I have also looked to term vector but it also did not work.

For the exclusion you could use the must_not clause :

1 Like

What exactly should I exclude? Can you give me example please?



I think I misunderstood what you want to achieve here :
But if you want to exclude ONLY the terms mentioned once?
There's one approach where you could add the term_vectors data (term_frequency), into your documents during the indexing process, then query on the term_frequency for the specific term.

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