lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: "Advanced" query language
Date Tue, 06 Dec 2005 10:02:16 GMT

On Dec 5, 2005, at 9:18 PM, Yonik Seeley wrote:

>> If we go with XML, I think this must be solved (or else we are at the
>> point where we can only represent a subset of queries that lucene can
>> handle again).
> Hmmm, maybe it's not quite so serious if the XML represents a
> pre-analyzed query vs post-analyzed.
> This doesn't appear quite as simple as serialization of Query objects
> as XML any more.  The analysis phase still needs to be done, right?
> Still doable, but much of the QueryParser logic needs to be
> duplicated.

I started to post that I was confused by what you mean by pre and  
post analyzed queries, but I think I understand after some pondering.

Suppose a user of the Swing or RoR client enters "some phrase", who  
is responsible for analyzing that phrase so that it is suitable for  
PhraseQuery.add()?  Right?

That's a great question, and to be honest one I hadn't considered.   
I'm currently thinking that we want to support both the client and  
the server having this option.  A client definitely must be able to  
construct a phrase query in XML precisely with each term (all XML  
just for example, no endorsement implied):

	<PhraseQuery slop="3">
		<Term field="fieldname" value="some"/>
		<Term field="fieldname" value="phrase"/>

but we should also allow for the client to push the analysis  
responsibility to the server:

	<PhraseQuery slop="3">
		<Phrase analyzer="StandardAnalyzer">some phrase</Phrase>

Interesting topic, even if this isn't what you originally meant Yonik :)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message