Re: How to ignore a match if a given keyword is before/after another given keyword?

2021-04-14 Thread Aditya Varun Chadha
maybe you want (abstractly): bool(must(term("f", "positive"), mustNot(phrase("f", "negative positive", slop=1))) On Thu, Apr 15, 2021 at 7:27 AM Jean Morissette wrote: > Hi all, > > Does someone know if it's possible to search documents containing a given > keyword only if this keyword is not f

How to ignore a match if a given keyword is before/after another given keyword?

2021-04-14 Thread Jean Morissette
Hi all, Does someone know if it's possible to search documents containing a given keyword only if this keyword is not followed or preceded or another given keyword? Thanks, Jean

Re: How to create a query to search for 2 words separated by 0-3 gaps?

2021-04-14 Thread Jean Morissette
Thank you for your response. It was exactly what I was looking for. On Thu, 1 Apr 2021 at 14:40, Haoyu Zhai wrote: > Hi Jean, > One thing I could come up with is to use IntervalQuery. > > Specifically you could create an IntervalQuery with IntervalSource of: > > Intervals.within(Intervals.term(w