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 > > > > > https://lucene.apache.org/core/8_8_

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. 2

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 e

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 docu

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 ignore a ,

2016-11-28 Thread Alan Woodward
Using StandardTokenizer should remove punctuation as well. Alan Woodward www.flax.co.uk > On 28 Nov 2016, at 16:06, Thomas Johnson wrote: > > We are using Lucene 5.0. Some of our documents are getting indexed with a > comma after the value. For example “John Doe, bob smith, and jane go into a

How to ignore a ,

2016-11-28 Thread Thomas Johnson
We are using Lucene 5.0. Some of our documents are getting indexed with a comma after the value. For example "John Doe, bob smith, and jane go into a bar." We are using a WhitespaceTokenizer and a LowerCaseFilter as the analyzer. If we search for "Doe" nothing is found because the value in the