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 s d <s....@gmail.com> on 2008/01/08 20:40:56 UTC
DisMax Syntax
User Query: x1 x2
Desired query (Lucene): field:x1 x2 field:"x1 x2"~a^b
In the standard handler the only way i saw how to make this work was:
field:x1 field:x2 field:"x1 x2"!a^b
Now that i want to try the DisMax is there a way to implement this without
having duplicate fields? i.e. since the fields and the terms are separated
in the DisMax how do i achieve the same query ?
Thanks
Re: DisMax Syntax
Posted by Yonik Seeley <yo...@apache.org>.
Please see http://wiki.apache.org/solr/DisMaxRequestHandler
-Yonik
On Jan 8, 2008 2:40 PM, s d <s....@gmail.com> wrote:
> User Query: x1 x2
> Desired query (Lucene): field:x1 x2 field:"x1 x2"~a^b
>
> In the standard handler the only way i saw how to make this work was:
> field:x1 field:x2 field:"x1 x2"!a^b
>
> Now that i want to try the DisMax is there a way to implement this without
> having duplicate fields? i.e. since the fields and the terms are separated
> in the DisMax how do i achieve the same query ?
>
> Thanks
>
Re: DisMax Syntax
Posted by Chris Hostetter <ho...@fucit.org>.
: I may be mistaken, but this is not equivalent to my query.In my query i have
: matches for x1, matches for x2 without slope and/or boosting and then match
: to "x1 x2" (exact match) with slope (~) a and boost (b) in order to have
: results with exact match score better.
: The total score is the sum of all the above.
: Your query seems diff
the structure of the query will look different in debugging, and the
scores won't be exactly the same, but the concept is the same.
-Hoss
Re: DisMax Syntax
Posted by s d <s....@gmail.com>.
I may be mistaken, but this is not equivalent to my query.In my query i have
matches for x1, matches for x2 without slope and/or boosting and then match
to "x1 x2" (exact match) with slope (~) a and boost (b) in order to have
results with exact match score better.
The total score is the sum of all the above.
Your query seems diff
On Jan 8, 2008 11:56 AM, Chris Hostetter <ho...@fucit.org> wrote:
>
> : User Query: x1 x2
> : Desired query (Lucene): field:x1 x2 field:"x1 x2"~a^b
> :
> : In the standard handler the only way i saw how to make this work was:
> : field:x1 field:x2 field:"x1 x2"!a^b
> :
> : Now that i want to try the DisMax is there a way to implement this
> without
> : having duplicate fields? i.e. since the fields and the terms are
> separated
> : in the DisMax how do i achieve the same query ?
>
> i'm not sure what you mean by "without duplicate fields" but assuming i
> understand your goal, this seems trivial...
>
> q = x1 x2
> qf = field
> pf = field^b
> ps = a
>
>
> -Hoss
>
>
Re: DisMax Syntax
Posted by Chris Hostetter <ho...@fucit.org>.
: User Query: x1 x2
: Desired query (Lucene): field:x1 x2 field:"x1 x2"~a^b
:
: In the standard handler the only way i saw how to make this work was:
: field:x1 field:x2 field:"x1 x2"!a^b
:
: Now that i want to try the DisMax is there a way to implement this without
: having duplicate fields? i.e. since the fields and the terms are separated
: in the DisMax how do i achieve the same query ?
i'm not sure what you mean by "without duplicate fields" but assuming i
understand your goal, this seems trivial...
q = x1 x2
qf = field
pf = field^b
ps = a
-Hoss