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
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?
&g
Hi,-
should i use MultiPhraseQuery or PhraseQuery to take synonyms into
account?
Best regards
baris
-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h
/18/18 5:28 PM, Michael McCandless wrote:
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
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
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
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
18, 2018 at 1:56 PM wrote:
>
> 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
&g
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 Ja
;app" then iterating and collecting
terms until there is no longer that prefix,
// and finally use MultiPhraseQuery.Builder.add(Term[]) to add them.
MultiPhraseQuery.Builder.build() returns the fully constructed (and
immutable) MultiPhraseQuery.
IndexSearcher is = new IndexSearcher(indexRe
Hi,-
how does MultiPhraseQuery treat synonyms?
is the following possible?
... (created index with synonyms and indexReader object has the index)
IndexSearcher is = new IndexSearcher(indexReader);
MultiPhraseQuery.Builder builder = new MultiPhraseQuery.Builder();
builder.add(new Term("
Thought I would try some thread necromancy here, because nobody
replied about this a year ago.
Now we're on 5.4.1 and the numbers changed a bit again. Recording best
times for each operation.
Indexing: 5.723 s
SpanQuery: 25.13 s
MultiPhraseQuery: (waited 10 minutes and it hasn't
, but benchmarks tend to be like that.
Times for Lucene 3.6:
Indexing: 3.365 s
SpanQuery: 20.48 s
MultiPhraseQuery: 9.641 s
Times for Lucene 5.2:
Indexing: 4.423 s
SpanQuery: 31.94 s
MultiPhraseQuery: (never completes due to OOME)
An aside which is totally a red herring
There is a MultiPhraseQuery we use which looks a bit like:
MultiPhraseQuery query = new MultiPhraseQuery();
query.add(new Term[] { first });
query.add(new Term[] { second1, second2, ... });
The actual number of terms in this particular case is 207087. The size
of the index itself
Someone asked if it was possible to do a SpanNearQuery between a
TermQuery and a MultiPhraseQuery.
Sadly, you can only use SpanNearQuery with other instances of
SpanQuery, so we have a gigantic method where we rewrite as many
queries as possible to SpanQuery. For instance, TermQuery can
trivially
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
OK, phew :) Thanks for bringing closure...
Mike
http://blog.mikemccandless.com
On Wed, May 4, 2011 at 6:52 AM, Tomislav Poljak tpol...@gmail.com wrote:
Hi,
seems there is a custom impl of MultiPhraseQuery used in the system,
which uses (and maybe misuses) Lucene's MultiPhraseQuery
are MultiPhraseQueries. This is even with with mergeSort being used
in
MultiPhraseQuery.
Otis
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Lucene ecosystem search :: http://search-lucene.com/
- Original Message
From: Michael McCandless luc...@mikemccandless.com
To: java-user
a while iterations get slower and
slower. Same thing happens when running queries on the same instance
of RAMDir based index holding only one doc. But, if I remove
MultiPhraseQuery type of queries from the query list then speed of
execution is the same, meaning execution time for other queries
and after a while iterations get slower and slower.
Same thing happens when running queries on the same instance of RAMDir
based index holding only one doc. But, if I remove MultiPhraseQuery type
of
queries from the query list then speed of execution is the same, meaning
execution time for other
related to the MultiPhraseQuery in Lucene 3.1
which could lead to this performance drop?
Tomislav
-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org
Poljak [mailto:tpol...@gmail.com]
Sent: Monday, May 02, 2011 6:01 PM
To: java-user@lucene.apache.org
Subject: MultiPhraseQuery slowing down over time in Lucene 3.1
Hi,
after running tests on both MemoryIndex and RAMDirectory based index in
Lucene 3.1, seems MultiPhraseQueries are slowing down
to the MultiPhraseQuery in Lucene 3.1
which could lead to this performance drop?
Tomislav
-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org
-- if some of the
queries are MultiPhraseQueries. This is even with with mergeSort being used in
MultiPhraseQuery.
Otis
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Lucene ecosystem search :: http://search-lucene.com/
- Original Message
From: Michael McCandless luc
More likely to be a bug in your code rather than in lucene. I suggest
you post the smallest possible self-contained program or test case
that demonstrates the problem.
--
Ian.
On Thu, Dec 16, 2010 at 1:56 AM, Mike Cawson mike.caw...@yahoo.co.uk wrote:
I'm using MultiPhraseQuery to implement
I'm using MultiPhraseQuery to implement a fuzzy phrase query.
E.g. user enters blue lorry and I expand 'blue' to 'turquoise', and 'glue'
and
'lorry' to 'truck', 'van', 'lory' and 'lorrie'. I can then construct a
MultiPhraseQuery with those lists of terms.
The search works correctly
Working on the nightly build of solr and lucene -
MultiPhraseQuery throws ArrayIndexOutOfBounds Exception for the words
defined as synonyms
SEVERE: java.lang.ArrayIndexOutOfBoundsException: 5
at
org.apache.lucene.search.MultiPhraseQuery$MultiPhraseWeight.scorer(MultiPhraseQuery.java:191
Nice catch -- thanks! I will fix.
Mike
On Fri, Jul 30, 2010 at 11:20 AM, jayendra patil
jayendra.pa...@gmail.com wrote:
Working on the nightly build of solr and lucene -
MultiPhraseQuery throws ArrayIndexOutOfBounds Exception for the words
defined as synonyms
SEVERE
Hello,
I am a bit confused by the two.
Is there a fundamental difference between
PhraseQuery query = new PhraseQuery();
query.add(term1, 0);
query.add(term2, 0);
and
MultiPhraseQuery query = new MultiPhraseQuery();
query.add( new Term[] { term1, term2 } );
The only different I could think
Is there a fundamental difference between
PhraseQuery query = new PhraseQuery();
query.add(term1, 0);
query.add(term2, 0);
and
MultiPhraseQuery query = new MultiPhraseQuery();
query.add( new Term[] { term1, term2 } );
The only different I could think of is that MPQ somehow
does
I can't invoke MultiPhraseQuery. It produces the error:
com.sun.jdi.InvocationException occurred invoking method
Here is the code:
MultiPhraseQuery mpq = new MultiPhraseQuery();
In the eclipse debugger when I try to inspect mpq after instantiating it shows
the error.
I'm on Lucene 2.9.1
the Lucene jars on your machine and
delete (or move) any old ones.
And if none of this helps, can you post the entire stack trace?
HTH
Erick
On Tue, Jan 12, 2010 at 1:28 PM, Woolf, Ross ross_wo...@bmc.com wrote:
I can't invoke MultiPhraseQuery. It produces the error
but it is not catchable. I only get the
invocation exception displayed and can't inspect mpq.
-Original Message-
From: Erick Erickson [mailto:erickerick...@gmail.com]
Sent: Tuesday, January 12, 2010 11:49 AM
To: java-user@lucene.apache.org
Subject: Re: Exception invoking MultiPhraseQuery
Using Lucene 2.3.0 I'm seeing an ArrayIndexOutOfBoundsException: 0 at
line 291 of MultiPhraseQuery.
A test should be added for (terms.length == 0).
I'm checking to see why the terms array is 0.
Bob Hastings
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
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
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
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
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 to allow access to the contained query terms
39 matches
Mail list logo