You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Walter Underwood <wu...@netflix.com> on 2008/04/15 01:29:04 UTC
Fuzzy queries in dismax specs?
I've started implementing something to use fuzzy queries for selected fields
in dismax. The request handler spec looks like this:
exact~0.7^4.0 stemmed^2.0
If anyone has already done this, I'd be glad to use it.
I'm working with an older version of Solr, so I won't have a 1.2 patch
right away.
wunder
Re: Fuzzy queries in dismax specs?
Posted by Walter Underwood <wu...@netflix.com>.
On 4/28/08 10:20 AM, "Chris Hostetter" <ho...@fucit.org> wrote:
> the recursive mapping was something i put in the DismaxQueryParser because
> it was easy. The param syntax of the DismaxRequestHandler has never
> supported it, but it's possible someone out there has a subclass that
> takes advantage of it.
Seems like a distant possibility. Recursive mapping for non-fuzzy fields
will still work, though.
> if you're writing a new dismax parser that gets boosts and fuzzy values in
> a different way it it could easily just be a new parser (one of the things
> on my "if only i had more time" list would be to write a new parser from
> scrath that didn't have the weird hacks to get arround the baggage of
> Lucene's QueryParser)
I'm making minimal changes on top of 1.1. Store the fuzzy fields in a Map,
then call getFuzzyQuery instead of getFieldQuery.
I've done the "write a query parser then toss it and write a good one",
but I'm not planning on it this time.
wunder
Re: Fuzzy queries in dismax specs?
Posted by Chris Hostetter <ho...@fucit.org>.
: It is working, but I disabled recursive field aliasing. Two questions:
:
: * Is it possible to do recursive field aliasing from solrconfig.xml?
: * If not, do we want to preserve this speculative feature?
:
: I think the answers are "no" and "no", but I'd like a second opinion.
the recursive mapping was something i put in the DismaxQueryParser because
it was easy. The param syntax of the DismaxRequestHandler has never
supported it, but it's possible someone out there has a subclass that
takes advantage of it.
if you're writing a new dismax parser that gets boosts and fuzzy values in
a different way it it could easily just be a new parser (one of the things
on my "if only i had more time" list would be to write a new parser from
scrath that didn't have the weird hacks to get arround the baggage of
Lucene's QueryParser)
-Hoss
Re: Fuzzy queries in dismax specs?
Posted by Walter Underwood <wu...@netflix.com>.
It is working, but I disabled recursive field aliasing. Two questions:
* Is it possible to do recursive field aliasing from solrconfig.xml?
* If not, do we want to preserve this speculative feature?
I think the answers are "no" and "no", but I'd like a second opinion.
wunder
On 4/15/08 10:23 AM, "Chris Hostetter" <ho...@fucit.org> wrote:
>
> : I've started implementing something to use fuzzy queries for selected fields
> : in dismax. The request handler spec looks like this:
> :
> : exact~0.7^4.0 stemmed^2.0
>
> that's a pretty cool idea ... usually when people talk about adding
> support for other querytypes in dismax they mean to the query sytnax, but
> you are adding more info to the qf to specify how hte field should be
> handled in general -- i like it.
>
> i think if i had it to do over again (now that dismax supports multiple
> param values, and per field overrides) i would have made qf and pf
> multivalued params containing just the field names, and gotten the boost
> value from a per field overridable fieldBoost param, so adding a
> fuzzyDistance param would also be trivial 9without needing to parse crazy
> syntax)
>
> (hmmm... ps could be a per field overridable field too ... dismax v2.0
> maybe)
>
>
> -Hoss
Re: Fuzzy queries in dismax specs?
Posted by Chris Hostetter <ho...@fucit.org>.
: I've started implementing something to use fuzzy queries for selected fields
: in dismax. The request handler spec looks like this:
:
: exact~0.7^4.0 stemmed^2.0
that's a pretty cool idea ... usually when people talk about adding
support for other querytypes in dismax they mean to the query sytnax, but
you are adding more info to the qf to specify how hte field should be
handled in general -- i like it.
i think if i had it to do over again (now that dismax supports multiple
param values, and per field overrides) i would have made qf and pf
multivalued params containing just the field names, and gotten the boost
value from a per field overridable fieldBoost param, so adding a
fuzzyDistance param would also be trivial 9without needing to parse crazy
syntax)
(hmmm... ps could be a per field overridable field too ... dismax v2.0
maybe)
-Hoss