You need to look at the documents and see what is being hit and returned.
If you have documents with no field, that would be the 8, maybe.
If you have 3 documents with 'Phi', then that would be the 3.
Once you have a positive clause, you can only remove documents with a '-',
so that would be the three.

But, it would matter what doc ids are getting returned and what fields are
being used against them to reverse engineer the query results.


On Mon, May 16, 2022 at 1:33 PM WU, Zhiqing <[email protected]> wrote:

> Hello,
> What is wrong with my following query?
> I have a Solr query:
> {
>   "query": X,
>   "sort":"prodAllGeneric_txt_sort asc"
> }
>
> (Note: prodAllGeneric_txt_sort is a field, X is the details of a query)
>
> If X is "(prodAllGeneric_txt_sort:\"Phi; \")", Solr finds 3 documents
> If X is "(-prodAllGeneric_txt_sort:*)", Solr finds 8 documents
> If X is "(prodAllGeneric_txt_sort:\"Phi; \") OR
> (-prodAllGeneric_txt_sort:*)", Solr only find 3 documents.
> What is wrong? I think Solr should find 11 documents. It seems OR does not
> work this time.
>
> Next I do a little change,
> If X is "(prodAllGeneric_txt_sort:\"Phi; \")", Solr finds 3 documents
> If X is "(prodAllGeneric_txt_sort:\"Chi; \")", Solr finds 9 documents
> If X is "(prodAllGeneric_txt_sort:\"Phi; \") OR
> (prodAllGeneric_txt_sort:\"Chi; \")", Solr finds 12 documents.
> It seems OR does work this time.
>
> Many thanks,
>
> Zhiqing
>

Reply via email to