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

2021-04-27 Thread Adrien Grand
Great to hear! Le mar. 27 avr. 2021 à 22:44, Jean Morissette a écrit : > Using intervals worked, thank you for your help ! > > On Sun, 25 Apr 2021 at 13:52, Adrien Grand wrote: > > > Hi Jean, > > > > You should be able to do this with intervals, see > > > > >

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

2021-04-27 Thread Jean Morissette
Using intervals worked, thank you for your help ! On Sun, 25 Apr 2021 at 13:52, Adrien Grand wrote: > Hi Jean, > > You should be able to do this with intervals, see > > https://lucene.apache.org/core/8_8_1/queries/org/apache/lucene/queries/intervals/package-summary.html > . > > Le dim. 25 avr.

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

2021-04-25 Thread Adrien Grand
Hi Jean, You should be able to do this with intervals, see https://lucene.apache.org/core/8_8_1/queries/org/apache/lucene/queries/intervals/package-summary.html . Le dim. 25 avr. 2021 à 18:43, Jean Morissette a écrit : > Thank you for your answer. > > The problem with this solution is that it

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

2021-04-25 Thread Jean Morissette
Thank you for your answer. The problem with this solution is that it excludes documents which contain both positive and negative positive matches. For example, consider those 3 documents with the terms a, b: - document 1: "a" - document 2: "a b" - document 3: "a b a" What we want is to find

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

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