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 Aman Tandon <am...@gmail.com> on 2014/06/24 05:27:33 UTC

Re: Problem : limit results when using edismax way .

Can you please paste the whole query url here.

With Regards
Aman Tandon


On Tue, Jun 24, 2014 at 8:48 AM, xiaoqi <be...@gmail.com> wrote:

>
> when user input keywords like "white T shirt" to search products, i want to
> list all T shirt with white colour , so i using edismax like
> item_category^1.4 item_colour^0.5 , but the result still come out some
> other
> products which is not T shirt but white.
>
> is any way to limit result only T shirt then think about colour by solr  ?
>
> by solr version is : 3.5
>
> thanks !!!
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Problem-limit-results-when-using-edismax-way-tp4143601.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Problem : limit results when using edismax way .

Posted by Walter Underwood <wu...@wunderwood.org>.
The edismax query handler will match the best field, not all fields. So for some documents it matches "t-shirt" and for some it matches "white".

Try creating a single field with all the description information. That field will have both "white" and "t-shirt". Then add pf2, pf3, and pf config lines. Those will improve phrase matches. It might look like this:

<str name="qf">item_desc item_category item_color</str>
<str name="pf2">item_desc^2 item_category^2 item_color^2</str>
<str name="pf3">item_desc^2 item_category^2 item_color^2</str>
<str name="pf">item_desc^4 item_category^4 item_color^4</str>

wunder

On Jun 23, 2014, at 9:08 PM, Aman Tandon <am...@gmail.com> wrote:

> I translated your query string(白色帽子) in which is in japanese i guess to
> English, it shows me the meaning of string is white hat, may be that's why
> you is getting the all records containing white only. Your query looks fine
> to me in case if you pass the white T shirt as well.
> 
> And i am not wrong here then if your are searching with double quotes
> "white T shirt" then your df fields also not be tokenized.
> 
> Anybody please correct me if i am wrong here. I am just a beginner in solr
> :)
> 
> With Regards
> Aman Tandon
> 
> 
> On Tue, Jun 24, 2014 at 9:27 AM, xiaoqi <be...@gmail.com> wrote:
> 
>> 
>> http://localhost:7080/solr/select?l=*,score&start=0&q=%E7%99%BD%E8%89%B2%E5%B8%BD%E5%AD%90&qf=item_category
>> ^1.4+item_colour^0.5&bf=mul(ctr,2.5)&wt=xml&fq=item_id:[0+TO+*]&fq=&rows=60&defType=edismax&version=2&debugQuery=on
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/Problem-limit-results-when-using-edismax-way-tp4143601p4143606.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>> 

--
Walter Underwood
wunder@wunderwood.org




Re: Problem : limit results when using edismax way .

Posted by Aman Tandon <am...@gmail.com>.
I translated your query string(白色帽子) in which is in japanese i guess to
English, it shows me the meaning of string is white hat, may be that's why
you is getting the all records containing white only. Your query looks fine
to me in case if you pass the white T shirt as well.

And i am not wrong here then if your are searching with double quotes
"white T shirt" then your df fields also not be tokenized.

Anybody please correct me if i am wrong here. I am just a beginner in solr
:)

With Regards
Aman Tandon


On Tue, Jun 24, 2014 at 9:27 AM, xiaoqi <be...@gmail.com> wrote:

>
> http://localhost:7080/solr/select?l=*,score&start=0&q=%E7%99%BD%E8%89%B2%E5%B8%BD%E5%AD%90&qf=item_category
> ^1.4+item_colour^0.5&bf=mul(ctr,2.5)&wt=xml&fq=item_id:[0+TO+*]&fq=&rows=60&defType=edismax&version=2&debugQuery=on
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Problem-limit-results-when-using-edismax-way-tp4143601p4143606.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Problem : limit results when using edismax way .

Posted by xiaoqi <be...@gmail.com>.
http://localhost:7080/solr/select?l=*,score&start=0&q=%E7%99%BD%E8%89%B2%E5%B8%BD%E5%AD%90&qf=item_category^1.4+item_colour^0.5&bf=mul(ctr,2.5)&wt=xml&fq=item_id:[0+TO+*]&fq=&rows=60&defType=edismax&version=2&debugQuery=on



--
View this message in context: http://lucene.472066.n3.nabble.com/Problem-limit-results-when-using-edismax-way-tp4143601p4143606.html
Sent from the Solr - User mailing list archive at Nabble.com.