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 Norgorn <ls...@mail.ru> on 2014/12/19 09:49:07 UTC

SOLR complex queries misunderstanding

I'm trying to implement specifying queries - we have some results and need to
search over them.
But query, I constructed, returns some strange results. 

q=(text:(specific) OR title:(specific)) AND (text:(first long query) OR
title:(first long query))

This query returns something, which contains "specific", but not  "first
long query", but result differs a lot from simple "q=(text:(specific) OR
title:(specific))".

I tried the following with same results:
q=(text:(specific) OR title:(specific)) +(text:(first long query) OR
title:(first long query))
q=(text:(specific) OR title:(specific)) AND _query_:"(text:(first long
query) OR title:(first long query))"

I'm sure, that this is the real query, going to SOLR, cause I checked it
before sending (SolrQuery.toString())

I can't find out what exactly am I misunderstanding (and what results am I
getting - they are really strange).




--
View this message in context: http://lucene.472066.n3.nabble.com/SOLR-complex-queries-misunderstanding-tp4175188.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: SOLR complex queries misunderstanding

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
Hello Nick,

First of all, if you don't understand the results ask Solr to explain by
debugQuery=true. The output is reeeeaally verbose and puzzling. That is.
Then, I guess you tries to implement something like 'refinement', filtering
aka faceted navigation. Try to supply the filtering clause via fq=.. .
Filter queries don't influence scoring. eg fq=(text:(specific) OR
title:(specific))&q=(text:(first long query) OR
title:(first long query))
If I get your question right, you are puzzled by the
weighting/normalization, which works pretty puzzling for multiple clauses
queries with deep nesting. That is.




On Fri, Dec 19, 2014 at 11:49 AM, Norgorn <ls...@mail.ru> wrote:
>
> I'm trying to implement specifying queries - we have some results and need
> to
> search over them.
> But query, I constructed, returns some strange results.
>
> q=(text:(specific) OR title:(specific)) AND (text:(first long query) OR
> title:(first long query))
>
> This query returns something, which contains "specific", but not  "first
> long query", but result differs a lot from simple "q=(text:(specific) OR
> title:(specific))".
>
> I tried the following with same results:
> q=(text:(specific) OR title:(specific)) +(text:(first long query) OR
> title:(first long query))
> q=(text:(specific) OR title:(specific)) AND _query_:"(text:(first long
> query) OR title:(first long query))"
>
> I'm sure, that this is the real query, going to SOLR, cause I checked it
> before sending (SolrQuery.toString())
>
> I can't find out what exactly am I misunderstanding (and what results am I
> getting - they are really strange).
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/SOLR-complex-queries-misunderstanding-tp4175188.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
<mk...@griddynamics.com>