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 "Raleraskar, Mayur" <mr...@ebay.com> on 2016/08/09 17:10:23 UTC

Help for -- Filter in the text field + highlight + no affect on boosting(if done with q instead of fq)

Hi All,
I am using Solr for search functionality here @ eBay reviews team.

I need to implement search functionality with q parameter but do not want it, to affect boosting or relevancy. How can I achieve that? Effectively I want it perform just like a filter.
My query is like
SolrIp:Port/select?defType=edismax&q=text%3Agood&boost=max%28relevanceScore_dx%2C+0.1%29&boost=recip%28abs%28ms%28NOW%2FYEAR%2B1YEAR%2ClastEditedDate_dt%29%29%2C+3.16e-11%2C1%2C1%29&start=0&rows=5&facet=true&facet.field=%7B%21ex%3Dlab_ix%2Clocale_sx%7Drating_ix&facet.field=%7B%21ex%3Dlab_ix%7Dlabel_ix&facet.sort=count&facet.mincount=0&facet.limit=100&facet.offset=0&fq=status_ix%3A1&fq=%7B%21tag%3Dlab_ix%7Dlabel_ix%3A2&fq=siteId_ix%3A0&fq=subjectReferenceId_lx%3A1040409165+AND+subjectType_sx%3AP&wt=json&indent=true&fl=id&debugQuery=true<http://raptorslr.vip.lvs.ebay.com/raptorslrweb/solr/reviewshard/select?defType=edismax&q=text%3Agood&boost=max%28relevanceScore_dx%2C+0.1%29&boost=recip%28abs%28ms%28NOW%2FYEAR%2B1YEAR%2ClastEditedDate_dt%29%29%2C+3.16e-11%2C1%2C1%29&start=0&rows=5&facet=true&facet.field=%7B%21ex%3Dlab_ix%2Clocale_sx%7Drating_ix&facet.field=%7B%21ex%3Dlab_ix%7Dlabel_ix&facet.sort=count&facet.mincount=0&facet.limit=100&facet.offset=0&fq=status_ix%3A1&fq=%7B%21tag%3Dlab_ix%7Dlabel_ix%3A2&fq=siteId_ix%3A0&fq=subjectReferenceId_lx%3A1040409165+AND+subjectType_sx%3AP&wt=json&indent=true&fl=id&debugQuery=true>

OR
I can search/filter with fq parameter but I need to highlight words which are filtered by fq. Just the words in the text, which matches fq regex....not the entire text field.
My query is like
SolrIp:Port/select?defType=edismax&q=*%3A*&boost=max%28relevanceScore_dx%2C+0.1%29&boost=recip%28abs%28ms%28NOW%2FYEAR%2B1YEAR%2ClastEditedDate_dt%29%29%2C+3.16e-11%2C1%2C1%29&start=0&rows=50&facet=true&facet.field=%7B%21ex%3Dlab_ix%2Clocale_sx%7Drating_ix&facet.field=%7B%21ex%3Dlab_ix%7Dlabel_ix&facet.sort=count&facet.mincount=0&facet.limit=100&facet.offset=0&fq=status_ix%3A1&fq=%7B%21tag%3Dlab_ix%7Dlabel_ix%3A2&fq=siteId_ix%3A0&fq=subjectReferenceId_lx%3A1040409165+AND+subjectType_sx%3AP&fq=text%3Agood&wt=json&indent=true&fl=id<http://raptorslr.vip.lvs.ebay.com/raptorslrweb/solr/reviewshard/select?defType=edismax&q=*%3A*&boost=max%28relevanceScore_dx%2C+0.1%29&boost=recip%28abs%28ms%28NOW%2FYEAR%2B1YEAR%2ClastEditedDate_dt%29%29%2C+3.16e-11%2C1%2C1%29&start=0&rows=50&facet=true&facet.field=%7B%21ex%3Dlab_ix%2Clocale_sx%7Drating_ix&facet.field=%7B%21ex%3Dlab_ix%7Dlabel_ix&facet.sort=count&facet.mincount=0&facet.limit=100&facet.offset=0&fq=status_ix%3A1&fq=%7B%21tag%3Dlab_ix%7Dlabel_ix%3A2&fq=siteId_ix%3A0&fq=subjectReferenceId_lx%3A1040409165+AND+subjectType_sx%3AP&fq=text%3Agood&wt=json&indent=true&fl=id>


Thanks in advance,
Mayur


Re: Help for -- Filter in the text field + highlight + no affect on boosting(if done with q instead of fq)

Posted by Emir Arnautovic <em...@sematext.com>.
Hi Mayur,

Not sure if I get your case completely, but if you need query but not 
sorted by score, you can use boost factors 0 in your edismax definition 
(e.g. qf=title^0) or you can order by doc id (sort= _docid_ asc)

HTH,
Emir

-- 
Monitoring * Alerting * Anomaly Detection * Centralized Log Management
Solr & Elasticsearch Support * http://sematext.com/

On 09.08.2016 19:10, Raleraskar, Mayur wrote:
> Hi All,
> I am using Solr for search functionality here @ eBay reviews team.
>
> I need to implement search functionality with q parameter but do not want it, to affect boosting or relevancy. How can I achieve that? Effectively I want it perform just like a filter.
> My query is like
> SolrIp:Port/select?defType=edismax&q=text%3Agood&boost=max%28relevanceScore_dx%2C+0.1%29&boost=recip%28abs%28ms%28NOW%2FYEAR%2B1YEAR%2ClastEditedDate_dt%29%29%2C+3.16e-11%2C1%2C1%29&start=0&rows=5&facet=true&facet.field=%7B%21ex%3Dlab_ix%2Clocale_sx%7Drating_ix&facet.field=%7B%21ex%3Dlab_ix%7Dlabel_ix&facet.sort=count&facet.mincount=0&facet.limit=100&facet.offset=0&fq=status_ix%3A1&fq=%7B%21tag%3Dlab_ix%7Dlabel_ix%3A2&fq=siteId_ix%3A0&fq=subjectReferenceId_lx%3A1040409165+AND+subjectType_sx%3AP&wt=json&indent=true&fl=id&debugQuery=true<http://raptorslr.vip.lvs.ebay.com/raptorslrweb/solr/reviewshard/select?defType=edismax&q=text%3Agood&boost=max%28relevanceScore_dx%2C+0.1%29&boost=recip%28abs%28ms%28NOW%2FYEAR%2B1YEAR%2ClastEditedDate_dt%29%29%2C+3.16e-11%2C1%2C1%29&start=0&rows=5&facet=true&facet.field=%7B%21ex%3Dlab_ix%2Clocale_sx%7Drating_ix&facet.field=%7B%21ex%3Dlab_ix%7Dlabel_ix&facet.sort=count&facet.mincount=0&facet.limit=100&facet.offset=0&fq=status_ix%3A1&fq=%7B%21tag%3Dlab_ix%7Dlabel_ix%3A2&fq=siteId_ix%3A0&fq=subjectReferenceId_lx%3A1040409165+AND+subjectType_sx%3AP&wt=json&indent=true&fl=id&debugQuery=true>
>
> OR
> I can search/filter with fq parameter but I need to highlight words which are filtered by fq. Just the words in the text, which matches fq regex....not the entire text field.
> My query is like
> SolrIp:Port/select?defType=edismax&q=*%3A*&boost=max%28relevanceScore_dx%2C+0.1%29&boost=recip%28abs%28ms%28NOW%2FYEAR%2B1YEAR%2ClastEditedDate_dt%29%29%2C+3.16e-11%2C1%2C1%29&start=0&rows=50&facet=true&facet.field=%7B%21ex%3Dlab_ix%2Clocale_sx%7Drating_ix&facet.field=%7B%21ex%3Dlab_ix%7Dlabel_ix&facet.sort=count&facet.mincount=0&facet.limit=100&facet.offset=0&fq=status_ix%3A1&fq=%7B%21tag%3Dlab_ix%7Dlabel_ix%3A2&fq=siteId_ix%3A0&fq=subjectReferenceId_lx%3A1040409165+AND+subjectType_sx%3AP&fq=text%3Agood&wt=json&indent=true&fl=id<http://raptorslr.vip.lvs.ebay.com/raptorslrweb/solr/reviewshard/select?defType=edismax&q=*%3A*&boost=max%28relevanceScore_dx%2C+0.1%29&boost=recip%28abs%28ms%28NOW%2FYEAR%2B1YEAR%2ClastEditedDate_dt%29%29%2C+3.16e-11%2C1%2C1%29&start=0&rows=50&facet=true&facet.field=%7B%21ex%3Dlab_ix%2Clocale_sx%7Drating_ix&facet.field=%7B%21ex%3Dlab_ix%7Dlabel_ix&facet.sort=count&facet.mincount=0&facet.limit=100&facet.offset=0&fq=status_ix%3A1&fq=%7B%21tag%3Dlab_ix%7Dlabel_ix%3A2&fq=siteId_ix%3A0&fq=subjectReferenceId_lx%3A1040409165+AND+subjectType_sx%3AP&fq=text%3Agood&wt=json&indent=true&fl=id>
>
>
> Thanks in advance,
> Mayur
>
>