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 Chamnap Chhorn <ch...@gmail.com> on 2010/07/20 07:01:27 UTC

dismax request handler without q

I wonder how could i make a query to return only *all books* that has
keyphrase "web development" using dismax handler? A book has multiple
keyphrases (keyphrase is multivalued column). Do I have to pass q parameter?


Is it the correct one?
http://locahost:8081/solr/select?&q=hotel&fq=keyphrase:%20hotel

-- 
Chhorn Chamnap
http://chamnapchhorn.blogspot.com/

Re: dismax request handler without q

Posted by Joe Calderon <ca...@gmail.com>.
try something like this:
q.alt=*:*&fq=keyphrase:hotel

though if you dont need to query across multiple fields, dismax is
probably not the best choice

On Tue, Jul 20, 2010 at 4:57 AM, olivier sallou
<ol...@gmail.com> wrote:
> q will search in defaultSearchField if no field name is set, but you can
> specify in your "q" param the fields you want to search into.
>
> Dismax is a handler where you can specify to look in a number of fields for
> the input query. In this case, you do not specify the fields and dismax will
> look in the fields specified in its configuration.
> However, by default, dismax is not used, it needs to be called help with the
> query type parameter (qt=dismax).
>
> In default solr config, you can call ...solr/select?q=keyphrase:hotel if
> keyphrzase is a declared field in your schema
>
> 2010/7/20 Chamnap Chhorn <ch...@gmail.com>
>
>> I can't put q=keyphrase:hotel in my request using dismax handler. It
>> returns
>> no result.
>>
>> On Tue, Jul 20, 2010 at 1:19 PM, Chamnap Chhorn <chamnapchhorn@gmail.com
>> >wrote:
>>
>> > There are some default configuration on my solrconfig.xml that I didn't
>> > show you. I'm a little confused when reading
>> > http://wiki.apache.org/solr/DisMaxRequestHandler#q. I think q is for
>> plain
>> > user input query.
>> >
>> >
>> > On Tue, Jul 20, 2010 at 12:08 PM, olivier sallou <
>> olivier.sallou@gmail.com
>> > > wrote:
>> >
>> >> Hi,
>> >> this is not very clear, if you need to query only keyphrase, why don't
>> you
>> >> query directly it? e.g. q=keyphrase:hotel ?
>> >> Furthermore, why dismax if only keyphrase field is of interest? dismax
>> is
>> >> used to query multiple fields automatically.
>> >>
>> >> At least dismax do not appear in your query (using query type). It is
>> set
>> >> in
>> >> your config for your default request handler?
>> >>
>> >> 2010/7/20 Chamnap Chhorn <ch...@gmail.com>
>> >>
>> >> > I wonder how could i make a query to return only *all books* that has
>> >> > keyphrase "web development" using dismax handler? A book has multiple
>> >> > keyphrases (keyphrase is multivalued column). Do I have to pass q
>> >> > parameter?
>> >> >
>> >> >
>> >> > Is it the correct one?
>> >> > http://locahost:8081/solr/select?&q=hotel&fq=keyphrase:%20hotel
>> >> >
>> >> > --
>> >> > Chhorn Chamnap
>> >> > http://chamnapchhorn.blogspot.com/
>> >> >
>> >>
>> >
>> >
>> >
>> > --
>> > Chhorn Chamnap
>> > http://chamnapchhorn.blogspot.com/
>> >
>>
>>
>>
>> --
>> Chhorn Chamnap
>> http://chamnapchhorn.blogspot.com/
>>
>

Re: dismax request handler without q

Posted by olivier sallou <ol...@gmail.com>.
q will search in defaultSearchField if no field name is set, but you can
specify in your "q" param the fields you want to search into.

Dismax is a handler where you can specify to look in a number of fields for
the input query. In this case, you do not specify the fields and dismax will
look in the fields specified in its configuration.
However, by default, dismax is not used, it needs to be called help with the
query type parameter (qt=dismax).

In default solr config, you can call ...solr/select?q=keyphrase:hotel if
keyphrzase is a declared field in your schema

2010/7/20 Chamnap Chhorn <ch...@gmail.com>

> I can't put q=keyphrase:hotel in my request using dismax handler. It
> returns
> no result.
>
> On Tue, Jul 20, 2010 at 1:19 PM, Chamnap Chhorn <chamnapchhorn@gmail.com
> >wrote:
>
> > There are some default configuration on my solrconfig.xml that I didn't
> > show you. I'm a little confused when reading
> > http://wiki.apache.org/solr/DisMaxRequestHandler#q. I think q is for
> plain
> > user input query.
> >
> >
> > On Tue, Jul 20, 2010 at 12:08 PM, olivier sallou <
> olivier.sallou@gmail.com
> > > wrote:
> >
> >> Hi,
> >> this is not very clear, if you need to query only keyphrase, why don't
> you
> >> query directly it? e.g. q=keyphrase:hotel ?
> >> Furthermore, why dismax if only keyphrase field is of interest? dismax
> is
> >> used to query multiple fields automatically.
> >>
> >> At least dismax do not appear in your query (using query type). It is
> set
> >> in
> >> your config for your default request handler?
> >>
> >> 2010/7/20 Chamnap Chhorn <ch...@gmail.com>
> >>
> >> > I wonder how could i make a query to return only *all books* that has
> >> > keyphrase "web development" using dismax handler? A book has multiple
> >> > keyphrases (keyphrase is multivalued column). Do I have to pass q
> >> > parameter?
> >> >
> >> >
> >> > Is it the correct one?
> >> > http://locahost:8081/solr/select?&q=hotel&fq=keyphrase:%20hotel
> >> >
> >> > --
> >> > Chhorn Chamnap
> >> > http://chamnapchhorn.blogspot.com/
> >> >
> >>
> >
> >
> >
> > --
> > Chhorn Chamnap
> > http://chamnapchhorn.blogspot.com/
> >
>
>
>
> --
> Chhorn Chamnap
> http://chamnapchhorn.blogspot.com/
>

Re: dismax request handler without q

Posted by Chamnap Chhorn <ch...@gmail.com>.
I can't put q=keyphrase:hotel in my request using dismax handler. It returns
no result.

On Tue, Jul 20, 2010 at 1:19 PM, Chamnap Chhorn <ch...@gmail.com>wrote:

> There are some default configuration on my solrconfig.xml that I didn't
> show you. I'm a little confused when reading
> http://wiki.apache.org/solr/DisMaxRequestHandler#q. I think q is for plain
> user input query.
>
>
> On Tue, Jul 20, 2010 at 12:08 PM, olivier sallou <olivier.sallou@gmail.com
> > wrote:
>
>> Hi,
>> this is not very clear, if you need to query only keyphrase, why don't you
>> query directly it? e.g. q=keyphrase:hotel ?
>> Furthermore, why dismax if only keyphrase field is of interest? dismax is
>> used to query multiple fields automatically.
>>
>> At least dismax do not appear in your query (using query type). It is set
>> in
>> your config for your default request handler?
>>
>> 2010/7/20 Chamnap Chhorn <ch...@gmail.com>
>>
>> > I wonder how could i make a query to return only *all books* that has
>> > keyphrase "web development" using dismax handler? A book has multiple
>> > keyphrases (keyphrase is multivalued column). Do I have to pass q
>> > parameter?
>> >
>> >
>> > Is it the correct one?
>> > http://locahost:8081/solr/select?&q=hotel&fq=keyphrase:%20hotel
>> >
>> > --
>> > Chhorn Chamnap
>> > http://chamnapchhorn.blogspot.com/
>> >
>>
>
>
>
> --
> Chhorn Chamnap
> http://chamnapchhorn.blogspot.com/
>



-- 
Chhorn Chamnap
http://chamnapchhorn.blogspot.com/

Re: dismax request handler without q

Posted by Chamnap Chhorn <ch...@gmail.com>.
There are some default configuration on my solrconfig.xml that I didn't show
you. I'm a little confused when reading
http://wiki.apache.org/solr/DisMaxRequestHandler#q. I think q is for plain
user input query.

On Tue, Jul 20, 2010 at 12:08 PM, olivier sallou
<ol...@gmail.com>wrote:

> Hi,
> this is not very clear, if you need to query only keyphrase, why don't you
> query directly it? e.g. q=keyphrase:hotel ?
> Furthermore, why dismax if only keyphrase field is of interest? dismax is
> used to query multiple fields automatically.
>
> At least dismax do not appear in your query (using query type). It is set
> in
> your config for your default request handler?
>
> 2010/7/20 Chamnap Chhorn <ch...@gmail.com>
>
> > I wonder how could i make a query to return only *all books* that has
> > keyphrase "web development" using dismax handler? A book has multiple
> > keyphrases (keyphrase is multivalued column). Do I have to pass q
> > parameter?
> >
> >
> > Is it the correct one?
> > http://locahost:8081/solr/select?&q=hotel&fq=keyphrase:%20hotel
> >
> > --
> > Chhorn Chamnap
> > http://chamnapchhorn.blogspot.com/
> >
>



-- 
Chhorn Chamnap
http://chamnapchhorn.blogspot.com/

Re: dismax request handler without q

Posted by olivier sallou <ol...@gmail.com>.
Hi,
this is not very clear, if you need to query only keyphrase, why don't you
query directly it? e.g. q=keyphrase:hotel ?
Furthermore, why dismax if only keyphrase field is of interest? dismax is
used to query multiple fields automatically.

At least dismax do not appear in your query (using query type). It is set in
your config for your default request handler?

2010/7/20 Chamnap Chhorn <ch...@gmail.com>

> I wonder how could i make a query to return only *all books* that has
> keyphrase "web development" using dismax handler? A book has multiple
> keyphrases (keyphrase is multivalued column). Do I have to pass q
> parameter?
>
>
> Is it the correct one?
> http://locahost:8081/solr/select?&q=hotel&fq=keyphrase:%20hotel
>
> --
> Chhorn Chamnap
> http://chamnapchhorn.blogspot.com/
>