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 Joe Obernberger <jo...@gmail.com> on 2020/04/07 21:27:51 UTC

Query confusion - solr cloud 8.2.0

I'm running the following query:

id:COLLECT2601697594_T496 AND (person:[80 TO 100])
That returns 1 hit.

The following query also returns the same hit:

id:COLLECT2601697594_T496 AND ((POP16_Rez1:blue_Sky AND POP16_Sc1:[80 TO 
100]) OR (POP16_Rez2:blue_Sky AND POP16_Sc2:[80 TO 100]) OR 
(POP16_Rez3:blue_Sky AND POP16_Sc3:[80 TO 100]) OR (POP19_Rez1:blue_Sky 
AND POP19_Sc1:[80 TO 100]) OR (POP19_Rez2:blue_Sky AND POP19_Sc2:[80 TO 
100]) OR (POP19_Rez3:blue_Sky AND POP19_Sc3:[80 TO 100]) OR 
(ResN_Rez1:blue_Sky AND ResN_Sc1:[80 TO 100]) OR (ResN_Rez2:blue_Sky AND 
ResN_Sc2:[80 TO 100]) OR (ResN_Rez3:blue_Sky AND ResN_Sc3:[80 TO 100]))

but AND'ing the two together returns 0 hits.  What am I missing?

id:COLLECT2601697594_T496 AND ((POP16_Rez1:blue_Sky AND POP16_Sc1:[80 TO 
100]) OR (POP16_Rez2:blue_Sky AND POP16_Sc2:[80 TO 100]) OR 
(POP16_Rez3:blue_Sky AND POP16_Sc3:[80 TO 100]) OR (POP19_Rez1:blue_Sky 
AND POP19_Sc1:[80 TO 100]) OR (POP19_Rez2:blue_Sky AND POP19_Sc2:[80 TO 
100]) OR (POP19_Rez3:blue_Sky AND POP19_Sc3:[80 TO 100]) OR 
(ResN_Rez1:blue_Sky AND ResN_Sc1:[80 TO 100]) OR (ResN_Rez2:blue_Sky AND 
ResN_Sc2:[80 TO 100]) OR (ResN_Rez3:blue_Sky AND ResN_Sc3:[80 TO 100])) 
AND (person:[80 TO 100])

Thank you!

-Joe


Re: Query confusion - solr cloud 8.2.0

Posted by Erick Erickson <er...@gmail.com>.
The easiest way to answer questions like this is an under-appreciated parameter “explainOther” when submitted with “debug=true”. It’ll return an explanation of how the doc identified by the “explainOther” parameter was scored.

See: https://lucene.apache.org/solr/guide/8_1/common-query-parameters.html

Best,
Erick

> On Apr 7, 2020, at 5:27 PM, Joe Obernberger <jo...@gmail.com> wrote:
> 
> I'm running the following query:
> 
> id:COLLECT2601697594_T496 AND (person:[80 TO 100])
> That returns 1 hit.
> 
> The following query also returns the same hit:
> 
> id:COLLECT2601697594_T496 AND ((POP16_Rez1:blue_Sky AND POP16_Sc1:[80 TO 100]) OR (POP16_Rez2:blue_Sky AND POP16_Sc2:[80 TO 100]) OR (POP16_Rez3:blue_Sky AND POP16_Sc3:[80 TO 100]) OR (POP19_Rez1:blue_Sky AND POP19_Sc1:[80 TO 100]) OR (POP19_Rez2:blue_Sky AND POP19_Sc2:[80 TO 100]) OR (POP19_Rez3:blue_Sky AND POP19_Sc3:[80 TO 100]) OR (ResN_Rez1:blue_Sky AND ResN_Sc1:[80 TO 100]) OR (ResN_Rez2:blue_Sky AND ResN_Sc2:[80 TO 100]) OR (ResN_Rez3:blue_Sky AND ResN_Sc3:[80 TO 100]))
> 
> but AND'ing the two together returns 0 hits.  What am I missing?
> 
> id:COLLECT2601697594_T496 AND ((POP16_Rez1:blue_Sky AND POP16_Sc1:[80 TO 100]) OR (POP16_Rez2:blue_Sky AND POP16_Sc2:[80 TO 100]) OR (POP16_Rez3:blue_Sky AND POP16_Sc3:[80 TO 100]) OR (POP19_Rez1:blue_Sky AND POP19_Sc1:[80 TO 100]) OR (POP19_Rez2:blue_Sky AND POP19_Sc2:[80 TO 100]) OR (POP19_Rez3:blue_Sky AND POP19_Sc3:[80 TO 100]) OR (ResN_Rez1:blue_Sky AND ResN_Sc1:[80 TO 100]) OR (ResN_Rez2:blue_Sky AND ResN_Sc2:[80 TO 100]) OR (ResN_Rez3:blue_Sky AND ResN_Sc3:[80 TO 100])) AND (person:[80 TO 100])
> 
> Thank you!
> 
> -Joe
>