incubator-lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Wellnhofer <wellnho...@aevum.de>
Subject [lucy-dev] Re: [KinoSearch] Stopwords and AND queries
Date Wed, 15 Dec 2010 15:28:54 GMT
On 15/12/2010 01:04, Marvin Humphrey wrote:
> It seems to me that the best way to have Expand_Leaf() communicate to Expand()
> that a clause is optional is to return NULL.  That's a little confusing,
> because when compiling a Query to a Matcher, a NULL Matcher is synonymous with
> "fails to match".  But the only other way I can think of to deal with it would
> be to introduce a new class, e.g. "VoidQuery", to carry that information.

I only had a cursory glance at the code and it seems that returning NULL 
is the easiest approach though it looks a bit hackish. Introducing a new 
VoidQuery class is probably the cleanest solution but I guess it 
requires a lot more additional code.

Another solution might be to prune stop words in a separate pass over 
the query string.

Nick

Mime
View raw message