lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Solr query with more than one field
Date Thu, 01 Jun 2017 21:13:08 GMT
: I could have sworn I was paraphrasing _your_ presentation Hoss. I
: guess I did not learn my lesson well enough.
: Thank you for the correction.

Trust but verify! ... we're both wrong.

Boolean functions (like lt(), gt(), etc...) behave just like sum() -- they 
"exist" for a  document if and only if all the args exist for the document 
-- and that's what matters for wether a '{!func}' query considers a 
document a match. (if the function "exists" then the query "matches")

I think my second suggestion of using frange is the only thing that works 
-- you have to explicitly use 'frange' which will only match a document if 
the function "exists" *AND* if the resulting value is in the range...

	fq={!frange l=0}sub(value,cost)

what would be nice is the inverse of the "exists()" function ... that 
returns true/false depending on wether the function it wraps "exists" for 
a document -- but is always a "match" for every doc.  we need *something* 
that can wrap a function that returns a boolean and only "exists" if the 
boolean is true, otherwise it's considered a non-exists/match for the doc.

then you could do:  fq={!func}something(gt(value,cost))

of perhaps just a nomatch()/noexist() function that takes no args and does 
nothing but never exists/matches any doc .... then you could do...




View raw message