Question regarding UnifiedHighlighter and SynonymGraphFilter

2022-09-13 Thread Rune Stilling
Hi list I’m using the SynonymGraphFilter in Lucene 8.11 together with the UnifiedHighlighter class. I’m not sure if they are supposed to work seamlessly together but I’m having issues with the highlighter showing partial matches of multi token synonym phrases. Ie. the word “in” in the

SynonymGraphFilter & fuzzy terms

2020-06-25 Thread Petra Staub
I am using the classic query parser in combination with the SynonymGraphFilter. This works fine (synonyms get expanded) but I noticed that it is not possible to generate fuzzy query terms i.e. querying expanded synonym terms with an edit distance. I there a possibility to achieve this? Example

Re: SynonymGraphFilter can't consume an incoming graph

2019-02-15 Thread Michael Sokolov
; It's, well, undefined. As in nobody knows except that it'll be wrong. > > And exactly what the results are may change with any given release. > > > > Best, > > Erick > > > > On Sun, Feb 10, 2019 at 10:48 AM lambda.coder lucene > > wrote: >

Re: SynonymGraphFilter can't consume an incoming graph

2019-02-14 Thread lambda.coder lucene
what the results are may change with any given release. > > Best, > Erick > > On Sun, Feb 10, 2019 at 10:48 AM lambda.coder lucene > wrote: >> >> Hello, >> >> The Javadocs of SynonymGraphFilter says that it can’t consume an incoming >> graph and

Re: SynonymGraphFilter can't consume an incoming graph

2019-02-10 Thread Erick Erickson
It's, well, undefined. As in nobody knows except that it'll be wrong. And exactly what the results are may change with any given release. Best, Erick On Sun, Feb 10, 2019 at 10:48 AM lambda.coder lucene wrote: > > Hello, > > The Javadocs of SynonymGraphFilter says th

SynonymGraphFilter can't consume an incoming graph

2019-02-10 Thread lambda.coder lucene
Hello, The Javadocs of SynonymGraphFilter says that it can’t consume an incoming graph and that the result will be undefined Is there any example that exhibits the limitations and what is meant by undefined ? Regards Patrick

Re: SynonymGraphFilter

2018-09-13 Thread baris . kazar
Thanks Michael. I think this clears my questions. Best regards On 9/12/18 8:23 PM, Michael Sokolov wrote: Usually one will either apply synonyms at index time or apply them at query time, but not both. I think the situation is that you will get most correct behavior, respecting synonym graph s

Re: SynonymGraphFilter

2018-09-12 Thread Michael Sokolov
Usually one will either apply synonyms at index time or apply them at query time, but not both. I think the situation is that you will get most correct behavior, respecting synonym graph structure, with query time synonyms. Index time synonyms may give better performance, but at the cost of some o

Re: SynonymGraphFilter

2018-09-12 Thread baris . kazar
So, the below statement suggests this? "To get fully correct positional queries when your synonym replacements are multiple tokens, you should instead apply synonyms using this TokenFilter at query time and translate the resulting graph to a TermAutomatonQuery e.g. using TokenStreamToTermAuto

Re: SynonymGraphFilter

2018-09-12 Thread baris . kazar
Any examples on the following note on the Javadocs at https://lucene.apache.org/core/6_4_1/analyzers-common/org/apache/lucene/analysis/synonym/SynonymGraphFilter.html Quoted from the above url: */However, if you use this during indexing, you must follow it with FlattenGraphFilter to squash to

Re: SynonymGraphFilter

2018-09-11 Thread baris . kazar
Mike,- Great article, thanks for that; and i was exactly thinking about reverse mapping when i was writing this question. i guess Lucene would be nicer to both mappings when one is called for or another parameter to activate this double mapping. My next question is: can a synonmy be separ

Re: SynonymGraphFilter

2018-09-11 Thread Michael McCandless
Try reading the blog post I wrote about token stream graphs? http://blog.mikemccandless.com/2012/04/lucenes-tokenstreams-are-actually.html Mike McCandless http://blog.mikemccandless.com On Tue, Sep 11, 2018 at 1:35 PM, wrote: > Any comments please? > > Thanks > > > On 9/10/18 5:07 PM, baris.k

Re: SynonymGraphFilter

2018-09-11 Thread baris . kazar
Any comments please? Thanks On 9/10/18 5:07 PM, baris.ka...@oracle.com wrote: Any examples on this? i think it would be nice if Javadocs had an example on this: However, if you use this during indexing, you must follow it with FlattenGraphFilter to squash tokens on top of one another like

Re: SynonymGraphFilter

2018-09-10 Thread baris . kazar
Any examples on this? i think it would be nice if Javadocs had an example on this: However, if you use this during indexing, you must follow it with FlattenGraphFilter to squash tokens on top of one another like SynonymFilter, because the indexer can't directly consume a graph. To get fully c

SynonymGraphFilter

2018-09-10 Thread baris . kazar
https://lucene.apache.org/core/6_4_1/analyzers-common/org/apache/lucene/analysis/synonym/SynonymGraphFilter.html Does this mean i dont have to repeat it in the search analyzer when i do this at indexing time? Best regards -

Re: Proper Use of SynonymGraphFilter

2017-02-14 Thread Michael McCandless
s using it incorrectly by specifying the SynonymGraphFilter > at query time AND SynonymGraphFilter followed by FlattenGraphFilter at index > time. > > I need to specify one or the other. > > J.D. > > J.D. Corbin > > Senior Research Engineer > > Advanced Computing & D

Re: Proper Use of SynonymGraphFilter

2017-02-13 Thread Corbin, J.D.
Hi Mike, Thanks for the response, Sounds like I was using it incorrectly by specifying the SynonymGraphFilter at query time AND SynonymGraphFilter followed by FlattenGraphFilter at index time. I need to specify one or the other. J.D. J.D. Corbin Senior Research Engineer Advanced Computing

Re: Proper Use of SynonymGraphFilter

2017-02-13 Thread Michael McCandless
Hi J.D., First you need to decide if it's OK to do all your syns at search time. It results in slower queries, and different scoring, yet correct multi-token results, vs. index time. If that is OK, then you should not use any syn filter at index time, and use only SynonymGraphFilter at s

Proper Use of SynonymGraphFilter

2017-02-13 Thread Corbin, J.D.
Hi, I am looking for some guidance on the proper use of the SynonymGraphFilter in Lucene (6.4.1). Below is how I am implementing the analyzers for the index and query sides. I don't see a lot of examples on the proper usage of the SynonymGraphFilter so was hoping that someone (Michael McCan

SynonymGraphFilter Usage

2017-02-09 Thread Corbin, J.D.
I am using the SynonymGraphFilter(SGF) in a custom analyzer (query side only) and when I print out the query generated from the QueryParser, it displays some clauses that I would like to understand. I am not sure I'm using the SGF properly. Example Query output:(using Lucene