There’s another possibility if the person I _should_ shoot who
wrote the query can’t change it; add cost=101 and turn it
into a post-filter. It’s not clear to me how much difference
that’d make, but it might be worth a shot, see:
https://yonik.com/advanced-filter-caching-in-solr-2/
Best,
Erick
>
> Well, they’ll be exactly the same if (and only if) every document has a
> tag. Otherwise, the
> first one will exclude a doc that has no tag and the second one will
> include it.
That's a good point/catch.
How slow is “very slow”?
>
Well, in the case I was looking at it was about 10x
Yeah, there are optimizations there. BTW, these two queries are subtly
different.
Well, they’ll be exactly the same if (and only if) every document has a tag.
Otherwise, the
first one will exclude a doc that has no tag and the second one will include it.
How slow is “very slow”?
The second
Hi Chris,
tag:* is a wildcard query while *:* is match all query. I believe that
adjusting pure negative is turned on by default so you can safely just use
-tag:email and it’ll be translated to *:* -tag:email.
HTH,
Emir
--
Monitoring - Log Management - Alerting - Anomaly Detection
Solr &
I'm trying to understand the difference between something like
fq={!cache=false}(tag:* -tag:email) which is very slow compared to
fq={!cache=false}(*:* -tag:email) on Solr 7.7.1.
I believe in the case of `tag:*` Solr spends some effort to gather all of
the documents that have a value for `tag`