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 cnyee <ye...@gmail.com> on 2011/07/22 05:14:13 UTC

What is the different?

Hi,

I have two queries:

(1) q = (change management)
(2) q = (change management) AND domain_ids:(0^1.3 OR 1)

The purpose of the (2) is to boost the records with domain_ids=0.
In my database all records has domain_ids = 0 or 1, so domains_ids:(0 or 1)
will always returns the full database.

Now my questions is - query (2) returns 5000+ results, but query (1) returns
700+ results.

Can somebody enlighten me on what is the reasons behind such a vast
different in number of results?

Many thanks in advance.

Yee

--
View this message in context: http://lucene.472066.n3.nabble.com/What-is-the-different-tp3190278p3190278.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Logically equivalent queries but vastly different no of results?

Posted by Ahmet Arslan <io...@yahoo.com>.

> Yes - I am using edismax.... but the
> reason is not obvious to me can you give
> me a pointer?

Probably this it the be cause. See Hoss' explanation.

https://issues.apache.org/jira/browse/SOLR-2649

By the way if you want to boost docs (using lucene queries) with (e)dismax, bq is the way to go.  &bq=domain_ids:0^1.3

Re: Logically equivalent queries but vastly different no of results?

Posted by cnyee <ye...@gmail.com>.
Yes - I am using edismax.... but the reason is not obvious to me can you give
me a pointer?

Thanks
Yee

--
View this message in context: http://lucene.472066.n3.nabble.com/Logically-equivalent-queries-but-vastly-different-no-of-results-tp3190278p3199362.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Logically equivalent queries but vastly different no of results?

Posted by Michael Kuhlmann <so...@kuli.org>.
Am 22.07.2011 14:27, schrieb cnyee:
> I think I know what it is. The second query has higher scores than the first.
> 
> The additional condition "domain_ids:(0^1.3 OR 1)" which evaluates to true
> always - pushed up the scores and allows a LOT more records to pass.

This can't be, because the score doesn't affect the document count. Only
relative score values are relevant, not absolute ones.

Another guess: What's your query handler? If it's dismax, than the
reason is quite obvious.

-Kuli

Re: Logically equivalent queries but vastly different no of results?

Posted by cnyee <ye...@gmail.com>.
I think I know what it is. The second query has higher scores than the first.

The additional condition "domain_ids:(0^1.3 OR 1)" which evaluates to true
always - pushed up the scores and allows a LOT more records to pass.

Is there a better way of doing this?

Regards,
Yee

--
View this message in context: http://lucene.472066.n3.nabble.com/Logically-equivalent-queries-but-vastly-different-no-of-results-tp3190278p3191211.html
Sent from the Solr - User mailing list archive at Nabble.com.

RE: What is the different?

Posted by Pierre GOSSE <pi...@arisem.com>.
Hi,

Have you check the queries by using the debugQuery=true parameter ? This could give some hints of what is searched in both cases.

Pierre

-----Message d'origine-----
De : cnyee [mailto:yeechut@gmail.com] 
Envoyé : vendredi 22 juillet 2011 05:14
À : solr-user@lucene.apache.org
Objet : What is the different?

Hi,

I have two queries:

(1) q = (change management)
(2) q = (change management) AND domain_ids:(0^1.3 OR 1)

The purpose of the (2) is to boost the records with domain_ids=0.
In my database all records has domain_ids = 0 or 1, so domains_ids:(0 or 1)
will always returns the full database.

Now my questions is - query (2) returns 5000+ results, but query (1) returns
700+ results.

Can somebody enlighten me on what is the reasons behind such a vast
different in number of results?

Many thanks in advance.

Yee

--
View this message in context: http://lucene.472066.n3.nabble.com/What-is-the-different-tp3190278p3190278.html
Sent from the Solr - User mailing list archive at Nabble.com.