The last way to solve this for me is to ask StackOverflow.
I am trying to create a Solr request to get documents that have a specific value in one of their fields, or that does not matter ...
Theoretically, this request should work.
Here is some info:
Query: (name: john) β Number of results: 15383 // Johns
Query: (name: {* TO *}) β Number of results: 61013 // People who have a name
Request: - (name: {* TO *}) β Result counter: 216888 // People who do not have a name
Now, when I use the first and third query in the same query with the OR operator, I expect to get the results (216888 + 15383). But SOLR gives the results of 15383, it simply ignores the effect of the third query:
Request: + ((name: john) (- (name: {* TO *}))) // This is the request I used.
Is this a Solr error or am I mistaken in the request? Combining the two query results is an additional solution, but I donβt want to do additional implementation of the code if I could do it with a simple query.
Any help would be appreciated.
solr result sql-null
emregecer
source share