lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Walter Underwood <wun...@wunderwood.org>
Subject Re: questions about default operator within solr query string
Date Mon, 05 Jan 2015 15:46:16 GMT
You may want to put the slug portion of the query in filter queries (fq).

Do you rank on slug or only use them for filtering? Asked another way, are some slugs more
important than others or do you want them all to score the same?

It would look like this:

  &fl=id,headline,slug&fq=slug:variety&fq=slug:entertainment&q=headline:entertainment

Do you really want "&sort=score%20asc”? That shows the least relevant items (lowest
score) first.

wunder
Walter Underwood
wunder@wunderwood.org
http://observer.wunderwood.org/


On Jan 5, 2015, at 3:30 AM, Otis Gospodnetic <otis.gospodnetic@gmail.com> wrote:

> Hi Chun,
> 
> Something like:
> +slug:variety +slug:entertainment headline:entertainment should work.
> 
> But you may also want to use function queries for slug filtering:
> http://search-lucene.com/?q=fq&fc_project=Solr
> https://cwiki.apache.org/confluence/display/solr/Common+Query+Parameters#CommonQueryParameters-Thefq(FilterQuery)Parameter
> 
> Otis
> --
> Monitoring * Alerting * Anomaly Detection * Centralized Log Management
> Solr & Elasticsearch Support * http://sematext.com/
> 
> 
> On Mon, Jan 5, 2015 at 6:11 AM, <chun.shang@thomsonreuters.com> wrote:
> 
>> Hi,
>> 
>>     Nice to have a chance to discuss with solr experts!
>> 
>>      We are using solr as our search solution. But now we have a
>> requirement that we don't know how to handle, even after we have looked
>> through the Solr documentation.
>> 
>>      The solr version we used is 4.10.1.
>> 
>>      For the question, please refer to the following example url:
>> 
>> 
>> http://10.90.44.33/solr/searcher/select?start=0&rows=24&fl=id,headline,slug&q=slug:variety-entertainment%20headline:entertainment&sort=score%20asc&debug=true
>> 
>> 
>>      With our default operator(q.op) is configured as "OR", the parsed
>> query is:
>> 
>>               slug:variety slug:entertainment headline:entertainment
>> 
>> 
>>  But what we really want is as follows:
>> 
>>              +slug:variety+slug:entertainment headline:entertainment
>> 
>> 
>>  So, the question is:
>> 
>>              When searching , is there any way  to configure the applied
>> operator between the terms from the field "slug" to be "AND" and the
>> operator between the fields "slug" and "headline" is "OR"?
>> 
>>             If no, could you please advise on how to handle this
>> requirement in other ways?
>> 
>> 
>> Thanks in advance
>> 
>> 
>> Chun
>> 


Mime
View raw message