DisMax Question.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

DisMax Question.

shai deljo
Hi,
I am trying to use DisMax handler in order to search multiple fields
but i don't get results back.

Assume the fields i want to search on are "abc", "def", "ghi" and
"jkl" then i changed solrconfig.xml to this:
<requestHandler name="dismax" class="solr.DisMaxRequestHandler" >
    <lst name="defaults">
     <str name="echoParams">explicit</str>
     <float name="tie">0.01</float>
     <str name="qf">
        abc^2 def ghi^0.1 jkl
     </str>
    </lst>
  </requestHandler>

When i run my query with qt=dismax i don't get results:

/solr/select/?qt=dismax&q=blablabla%3BRelevanc
+desc&version=2.2&start=0&rows=1&indent=on&fl=*,score

when i remove the qt=dismax i do get result back:

/solr/select/?q=blablabla%3BRelevanc
+desc&version=2.2&start=0&rows=1&indent=on&fl=*,score

What am i doing wrong ?
Thanks,
S
Reply | Threaded
Open this post in threaded view
|

Re: DisMax Question.

Chris Hostetter-3

: When i run my query with qt=dismax i don't get results:
:
: /solr/select/?qt=dismax&q=blablabla%3BRelevanc
: +desc&version=2.2&start=0&rows=1&indent=on&fl=*,score
:
: when i remove the qt=dismax i do get result back:
:
: /solr/select/?q=blablabla%3BRelevanc
: +desc&version=2.2&start=0&rows=1&indent=on&fl=*,score

dismax does not use hte ";" syntax for sorting .. this is the one usefull
piece of documetnation i ever manged to put in the wiki about dismax...

        http://wiki.apache.org/solr/DisMaxRequestHandler

...if you add debugQuery=true to your URL it will give you a bunch of
great debugging info thta would have pointed out you were actually geting
a query for the terms "blablabla;Relevanc" and "desc" across all of those
fields.

..also is "Relevanc" the name of a field you have, because if you are
trying to sort by score that's not right for either handler ... you need
"score desc", either after the ";" for standard, or in the "sort" param
for dismax.


-Hoss

Reply | Threaded
Open this post in threaded view
|

Re: DisMax Question.

shai deljo
Thanks, that did the trick but now i have another problem (the
documentation is very little).
It fails when i try to boost terms in the query, i.e.
I get results for :

qt=dismax&q=blabla&version=2.2&start=0&rows=1&indent=on&fl=*,score&debugQuery=true&sort=length_seconds+desc

but no results for:
qt=dismax&q= blabla
^1.5&version=2.2&start=0&rows=1&indent=on&fl=*,score&debugQuery=true&sort=length_seconds+desc

doesn't DisMax support term boosting?

What is the alternative to DisMax then? something like this :

q=field1:bla^0.1 fo OR
field2:blabla^3;score+desc&version=2.2&start=0&rows=170&indent=on&fl=*,score&debugQuery=on

?

On 3/14/07, Chris Hostetter <[hidden email]> wrote:

>
> : When i run my query with qt=dismax i don't get results:
> :
> : /solr/select/?qt=dismax&q=blablabla%3BRelevanc
> : +desc&version=2.2&start=0&rows=1&indent=on&fl=*,score
> :
> : when i remove the qt=dismax i do get result back:
> :
> : /solr/select/?q=blablabla%3BRelevanc
> : +desc&version=2.2&start=0&rows=1&indent=on&fl=*,score
>
> dismax does not use hte ";" syntax for sorting .. this is the one usefull
> piece of documetnation i ever manged to put in the wiki about dismax...
>
>         http://wiki.apache.org/solr/DisMaxRequestHandler
>
> ...if you add debugQuery=true to your URL it will give you a bunch of
> great debugging info thta would have pointed out you were actually geting
> a query for the terms "blablabla;Relevanc" and "desc" across all of those
> fields.
>
> ..also is "Relevanc" the name of a field you have, because if you are
> trying to sort by score that's not right for either handler ... you need
> "score desc", either after the ";" for standard, or in the "sort" param
> for dismax.
>
>
> -Hoss
>
>
Reply | Threaded
Open this post in threaded view
|

Re: DisMax Question.

Chris Hostetter-3
: but no results for:
: qt=dismax&q= blabla
: ^1.5&version=2.2&start=0&rows=1&indent=on&fl=*,score&debugQuery=true&sort=length_seconds+desc
:
: doesn't DisMax support term boosting?

the dismax syntax is specifically very limited to match the common
assumptions end users have about search input ... it understands + and -
and "quotes" but none of hte other lucene query syntax ... boost info can
be specified per field, or using the "bq" param.

the DisMax wiki links tohte DisMax javadocs where all of hte request
params are listed in detail ... there are also good examples of what types
of values can be specifie for each param in the defaults and invarients
for hte various DisMaxRequestHandler instances in the example
solrconfig.xml



-Hoss