Re: Question for SynonymQuery

2023-01-27 Thread Mikhail Khludnev
Right. SynonymMap.html#WORD_SEPARATOR was a redundant complication. Spaces work fine. On Thu, Jan 19, 2023 at 4:26 AM Anh Dũng Bùi wrote: > Thanks Mikhail! > > It turns out

Re: Question for SynonymQuery

2023-01-27 Thread Mikhail Khludnev
Hello, Santam. It seems I achieved what you asking for. https://github.com/mkhludnev/likely/blob/381b491d25e4d2035dd5b8a891dfdcfe2b986b90/src/test/java/org/apache/lucene/playground/TestMultiPulty.java#L32 It expands API and UI into phrases, which match like you expect. On Fri, Jan 20, 2023 at

Re: Question for SynonymQuery

2023-01-20 Thread _ SATNAM
Hey Mikhail and Anh Dung Bui i am also struggling with synonym query my use case for eg I created synonyms for word API --> Application program interface UI -> user interface doc 1 ---> This is API and it is called Application program interface doc2 > How i help you in UI

Re: Question for SynonymQuery

2023-01-18 Thread Anh Dũng Bùi
Thanks Mikhail! It turns out I used FlattenGraphFilter and cause the PositionLength to be all 1 and resulted in the behavior above =) A side note is that we don't need to use WORD_SEPARATOR in the synonym file. SynonymMap.Parser.analyze would tokenize and append the separator for us. Regards,

RE: Question for SynonymQuery

2023-01-03 Thread Trevor Nicholls
ocessing > occurs once at indexing time and not at all during searching - and I'm > sure you'll be doing far more searching than indexing). > > cheers > T > > > -----Original Message- > From: Michael Wechner > Sent: Thursday, 29 December 2022 08:56

Re: Question for SynonymQuery

2023-01-02 Thread Michael Wechner
onymQuery; I have just used the standard QueryParser. Instead the synonym processing occurs in the indexing phase, which is not only simpler (one search pattern, one query), but also I think you would also find it gives you superior performance (because the synonym processing occurs once at indexing time

Re: Question for SynonymQuery

2023-01-02 Thread Mikhail Khludnev
ng searching - and I'm sure you'll be doing far more > searching than indexing). > > cheers > T > > > -Original Message- > From: Michael Wechner > Sent: Thursday, 29 December 2022 08:56 > To: java-user@lucene.apache.org > Subject: Re: Question for SynonymQuery &g

RE: Question for SynonymQuery

2023-01-02 Thread Trevor Nicholls
-Original Message- From: Michael Wechner Sent: Thursday, 29 December 2022 08:56 To: java-user@lucene.apache.org Subject: Re: Question for SynonymQuery Hi Anh The following Stackoverflow link might help https://stackoverflow.com/questions/73240494/can-someone-assist-me-with-a-multi-word-synonym

Re: Question for SynonymQuery

2023-01-01 Thread Mikhail Khludnev
Hello Anh, I was intrigued by your question. And I managed it to work somehow. see https://github.com/mkhludnev/likely/blob/eval-mulyw-syns/src/test/java/org/apache/lucene/playground/TestMultiPulty.java Beware, synonym files

Re: Question for SynonymQuery

2022-12-28 Thread Anh Dũng Bùi
Thanks everyone for the insight. I guess I'll use BooleanQuery then. There is also a caveat I noticed (not sure if it's an issue or not), which is slightly different from the mentioned thread. When I have a multi-word synonym, let say "wifi router" and "internet device". Then using

Re: Question for SynonymQuery

2022-12-28 Thread Michael Wechner
Hi Anh The following Stackoverflow link might help https://stackoverflow.com/questions/73240494/can-someone-assist-me-with-a-multi-word-synonym-problem-in-lucene The following thread seems to confirm, that escaping the space with a backslash does not help

Re: Question for SynonymQuery

2022-12-28 Thread Mikhail Khludnev
Hello. 1)Yes. That's the purpose. 2) I've skimmed through QueryBuilder.java. Conclusion is that it creates BQ.SHOULD (however, there should be something like DisjunctionMaxQuery) over PhraseQuery or MultiPhraseQuery (-ies). Good hack! On Wed, Dec 28, 2022 at 2:23 AM Anh Dũng Bùi wrote: > Hi