lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pasha Bizhan" <lucene-l...@lucenedotnet.com>
Subject RE: "Advanced" query language
Date Sat, 03 Dec 2005 20:37:16 GMT
Hi, 

> From: markharw00d [mailto:markharw00d@yahoo.co.uk] 
> Re: MoreLikeThis queries.
> Yes, they can be usefully wrapped as queries (see attached simple 
> example). In fact it was  my attempts at bastardising QueryParser to 
> support them that brought home it's limitations. I ended up with a 
> subclass hack that (mis)used the field name to parse a query string 
> "like:123" where 123 was a doc id. With the QueryParser 
> syntax I was not  able to pass other parameters which MoreLikeThis could 
> usefully use to  control the behaviour of this query type eg choice of 
> fieldname(s) used,  max number of terms generated, minNumberShouldTerms to
match etc etc.

With the _current_ QP syntax. 

In refer to my previous letter about syntax handlers you would be able to
pass the parameters to handler.

	string query = "like(param1, param2,...): (bla-bla-bla)";

A syntax of parameters isn't signifant to QP. QP do not need to know
anything about parameter's syntax.

	string query="like(percentTermsToMatch="0.25f",docId="44",...):...
";
Or
	string query="like(0.25f,44): ..."


> This is not unusual, each query type has potentially multiple 
> optional 
> parameters that tweak it's behaviour. If I don't have a query 
> language 
> that names the parameters explicitly (say, XML) I end up having to 
> define what looks like a function with a long list of 
> parameters: "like 
> (123,,,4,,,)". Ack.
 
Exactly. 
 
Pasha Bizhan


---------------------------------------------------------------------
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