Hi,
> From: markharw00d [mailto:[EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]