Re: MultiPhraseQuery or PhraseQuery to take the synonyms into account?

2018-09-22 Thread Michael McCandless
PhraseQuery can indeed be used to represent a multi-token synonym. In fact, I mis-spoke before: MultiPhraseQuery can also represent a multi-token synonym when the multiple tokens are all the same except in one spot. Mike McCandless http://blog.mikemccandless.com On Thu, Sep 20, 2018 at 2:32 PM

Re: MultiPhraseQuery or PhraseQuery to take the synonyms into account?

2018-09-20 Thread baris.kazar
i should have asked this way as Mike made clear for MultiPhraseQuery: is PhraseQuery ok to account for synonyms? Best > On Sep 20, 2018, at 2:02 PM, baris.ka...@oracle.com wrote: > > Hi,- > > should i use MultiPhraseQuery or PhraseQuery to take synonyms into account? > > Best regards > > bari

Re: MultiPhraseQuery

2018-09-18 Thread baris . kazar
Ok, Mike, that was very helpful. Now, i think i should use BooleanQuery with PhraseQueries but will PhraseQuery be able to handle all synonyms- multi or single term? What is the best way for this: i have multiple tokens and i want to be able to do a cheap fuzzy search. Best regards On 9/18

Re: MultiPhraseQuery

2018-09-18 Thread Michael McCandless
Yes, +1 for a patch to improve the docs! MultiPhraseQuery only works for single term synonyms, and is usually produced by query parsers when the incoming query text had single term synonyms matching, I think? The query parser will use other (span?) queries for multi token synonyms. I think the e

Re: MultiPhraseQuery

2018-09-18 Thread baris . kazar
FuzzyQuery seems also not suitable for me. PrefixQuery can be one token only, right? Best On 9/18/18 5:23 PM, baris.ka...@oracle.com wrote: Erick,-  i think the reason why MultiPhraseQuery was created was synonyms as far as i understood. am i right? i want to have a BooleanQuery or MultiPh

Re: MultiPhraseQuery

2018-09-18 Thread baris . kazar
Erick,-  i think the reason why MultiPhraseQuery was created was synonyms as far as i understood. am i right? i want to have a BooleanQuery or MultiPhraseQuery (i cant decide between these two) with an index which considers synonyms already. One disadvantage of MultiPhraseQuery is that it need

Re: MultiPhraseQuery

2018-09-18 Thread Erick Erickson
bq. i wish the Javadocs has examples like PhraseQuery Javadocs gave. This is where someone coming into the examples for the first time is invaluable, javadoc patches are most welcome! It can be hard to back off enough to remember what the confusing bits are when you wrote the code ;) On Tue, Sep 1

Re: MultiPhraseQuery

2018-09-18 Thread baris . kazar
Any suggestions please? Two main questions: - how do synonyms get utilized by MultiPhraseQuery? - how do we get second token "app" applied to the example on MultiPhraseQuery javadocs page? (and how do we get Terms[] array from Terms object?) Now three questions :) i wish the Javadocs has exam

Re: MultiPhraseQuery

2018-09-18 Thread baris . kazar
Trying to implement the example on https://lucene.apache.org/core/6_6_1/core/org/apache/lucene/search/MultiPhraseQuery.html // A generalized version of PhraseQuery, with the possibility of adding more than one term at the same position that are treated as a disjunction (OR). To use this class

Re: MultiPhraseQuery slowing down over time in Lucene 3.1

2011-05-04 Thread Michael McCandless
OK, phew :) Thanks for bringing closure... Mike http://blog.mikemccandless.com On Wed, May 4, 2011 at 6:52 AM, Tomislav Poljak wrote: > Hi, > seems there is a custom impl of MultiPhraseQuery used in the system, > which uses (and maybe misuses) Lucene's MultiPhraseQuery that could be > the reas

Re: MultiPhraseQuery slowing down over time in Lucene 3.1

2011-05-04 Thread Tomislav Poljak
Hi, seems there is a custom impl of MultiPhraseQuery used in the system, which uses (and maybe misuses) Lucene's MultiPhraseQuery that could be the reason of slowdown. I've tried running sample Lucene's MultiPhraseQuery in an infinite while loop printing out times for every 1000 executions and coul

Re: MultiPhraseQuery slowing down over time in Lucene 3.1

2011-05-03 Thread Michael McCandless
On Tue, May 3, 2011 at 7:43 AM, Tomislav Poljak wrote: > Hi, > > 2011/5/3 Michael McCandless : >> I feel like we are back to Basic ;) >> >> If you keep running line 40 over and over on the same memory index, do >> you see a slowdown? > > Yes. I've tested running same query list (~3,5 k queries) on

RE: MultiPhraseQuery slowing down over time in Lucene 3.1

2011-05-03 Thread Uwe Schindler
> Hi, > > 2011/5/3 Michael McCandless : > > I feel like we are back to Basic ;) > > > > If you keep running line 40 over and over on the same memory index, do > > you see a slowdown? > > Yes. I've tested running same query list (~3,5 k queries) on the same > MemoryIndex instance and after a while

Re: MultiPhraseQuery slowing down over time in Lucene 3.1

2011-05-03 Thread Tomislav Poljak
mergeSort being used >> in >> MultiPhraseQuery. >> >> Otis >> >> Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch >> Lucene ecosystem search :: http://search-lucene.com/ >> >> >> >> - Original Message >>&g

Re: MultiPhraseQuery slowing down over time in Lucene 3.1

2011-05-03 Thread Michael McCandless
inal Message >> From: Michael McCandless >> To: java-user@lucene.apache.org >> Sent: Mon, May 2, 2011 12:15:40 PM >> Subject: Re: MultiPhraseQuery slowing down over time in Lucene 3.1 >> >> By "slowing down over time" do you mean you use the same ind

Re: MultiPhraseQuery slowing down over time in Lucene 3.1

2011-05-02 Thread Otis Gospodnetic
Michael McCandless > To: java-user@lucene.apache.org > Sent: Mon, May 2, 2011 12:15:40 PM > Subject: Re: MultiPhraseQuery slowing down over time in Lucene 3.1 > > By "slowing down over time" do you mean you use the same index (no new > docs added) yet running the same M

Re: MultiPhraseQuery slowing down over time in Lucene 3.1

2011-05-02 Thread Michael McCandless
By "slowing down over time" do you mean you use the same index (no new docs added) yet running the same MPQ over and over you see it taking longer to execute over time? Mike http://blog.mikemccandless.com On Mon, May 2, 2011 at 12:00 PM, Tomislav Poljak wrote: > Hi, > after running tests on bot

RE: MultiPhraseQuery slowing down over time in Lucene 3.1

2011-05-02 Thread Uwe Schindler
Can you checkout latest 3.1 branch @ https://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_3_1 And test if it solves your issue. There was aproblem in PhraseQuery's internal sorting and quicksort. It does not slowdown over time, but with type of query (how many terms the phrase contains

Re: MultiPhraseQuery throws ArrayIndexOutOfBounds Exception

2010-07-30 Thread Michael McCandless
Nice catch -- thanks! I will fix. Mike On Fri, Jul 30, 2010 at 11:20 AM, jayendra patil wrote: > Working on the nightly build of solr and lucene - > > MultiPhraseQuery throws ArrayIndexOutOfBounds Exception for the words > defined as synonyms > > SEVERE: java.lang.ArrayIndexOutOfBoundsException

Re: MultiPhraseQuery

2006-03-07 Thread Erik Hatcher
On Mar 7, 2006, at 2:35 AM, Eric Jain wrote: Daniel Naber wrote: Please try to add this to MultiPhraseQuery and let us know if it helps: public List getTerms() { return termArrays; } That is indeed all I need (the list wouldn't have to be mutable though). Any chance this could be c

Re: MultiPhraseQuery

2006-03-06 Thread Eric Jain
Daniel Naber wrote: Please try to add this to MultiPhraseQuery and let us know if it helps: public List getTerms() { return termArrays; } That is indeed all I need (the list wouldn't have to be mutable though). Any chance this could be committed? Incidentally, would be helpful if th

Re: MultiPhraseQuery

2006-03-06 Thread Erik Hatcher
On Mar 6, 2006, at 4:43 PM, Daniel Naber wrote: On Sonntag 05 März 2006 19:03, Eric Jain wrote: I need to write a function that copies a MultiPhraseQuery and changes the field the query applies to. Unfortunately the API allows access to neither the contained terms nor the field! The other qu

Re: MultiPhraseQuery

2006-03-06 Thread Daniel Naber
On Sonntag 05 März 2006 19:03, Eric Jain wrote: > I need to write a function that copies a MultiPhraseQuery and changes > the field the query applies to. Unfortunately the API allows access to > neither the contained terms nor the field! The other query classes I > have so far dealt with all seem