lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <paul.elsc...@xs4all.nl>
Subject Re: Unexpected: ordered
Date Tue, 05 Jul 2005 07:48:42 GMT
On Monday 04 July 2005 22:51, Dave Kor wrote:
> *chuckles* It seems I can post to this list without subscribing to it. :)
> 
> > I had another look at the code, and my guess now is that this is
> > related to the spanNear with the single argument.
> >
> > It rings some bells. One of them is that I would have preferred
> > to split the SpanNear class into ordered/unordered after the fix,
> > but that I gave up because it would take too much time.
> > The current SpanNear class is too complex for easy maintenance.
> >
> > Perhaps the quick fix is to verify in the constructor of SpanNearQuery
> > that the number of clauses is at least 2, and to throw an illegal arg
> > exception otherwise.
> 
> Alright, I'll add code to ensure that I do not generate SpanNearQueries that
> contain only a single sub-query and see what happens, I hope this solves my
> problem!
> 
> Earlier, I went back to have a more in-depth look at the queries that were
> throwing these exceptions. My system, an experimental query expansion 
module,
> had generated over 900+ queries and out of those, 50-60 queries cause the 
RTE.
> 
> From these queries, I can find many repeated multi-term SpanNearQueries that
> also throws the same RTE. Here are some examples where the bracket shows how
> the terms are grouped in a SpanNearQuery:
> 
> ((the (regent hotel)) (the (regent hotel) to))
> (((elton john)) ((elton john) and))
> (((the who) is) ((the who) of))
> ((is) (the (the band nirvana) band))
> (((united states)) (united states president is the))
> (((academy awards) of) ((academy awards) is))

In all these cases overlap between two matches can occur because they have
an equal subquery. The conclusion is that the current span code is not capable
of handling such cases. It probably chokes at the moment the matches for
such subqueries concur.

The question is whether you would consider such a concurrence to be a match
for the query.
If so, the fix might be to return true instead of throwing the exception.

Regards,
Paul Elschot


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message