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 farhanali <ar...@gmail.com> on 2008/01/16 12:14:18 UTC

Problem with dismax handler when searching Solr along with field

when i search the query for example 

http://localhost:8983/solr/select/?q=category&qt=dismax

it gives the results but when i want to search on the basis of field name
like

http://localhost:8983/solr/select/?q=maincategory:Cars&qt=dismax

it does not gives results however

http://localhost:8983/solr/select/?q=maincategory:Cars

return results of cars from field name "maincategory"


-- 
View this message in context: http://www.nabble.com/Problem-with-dismax-handler-when-searching-Solr-along-with-field-tp14878239p14878239.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Problem with dismax handler when searching Solr along with field

Posted by Mike Klaas <mi...@gmail.com>.
On 16-Jan-08, at 3:15 AM, farhanali wrote:

>
> when i search the query for example
>
> http://localhost:8983/solr/select/?q=category&qt=dismax
>
> it gives the results but when i want to search on the basis of  
> field name
> like
>
> http://localhost:8983/solr/select/?q=maincategory:Cars&qt=dismax
>
> it does not gives results however
>
> http://localhost:8983/solr/select/?q=maincategory:Cars
>
> return results of cars from field name "maincategory"
>
> Anyone have some idea???

The dismax handler does not allow you to use lucene query syntax.   
The qf parameter must be used to select the fields to query  
(alternatively, you can provide a lucene-style query in an fq filter).

See the documentation here:
http://wiki.apache.org/solr/DisMaxRequestHandler

-Mike