It sounds as if what you have done is to index sales events (with fields
customer, product, and date), and now you want to retrieve customers,
which are not documents. The most natural way to handle this is to
index customers as documents (with fields cust id, last sale date).
Whenever a new s
Hi,
Oh, how I wish it was as simple as that! :-)
The tricky ingredient in the use case is to exclude all documents (from any
'saledate') if there's a "recent" 'product' match (e.g. last month).
So, essentially you have to somehow build a query that looks at 2 different
criteria for the same field
Can you not calculate on the fly when the date which is one month before the
current is and use that as your upper limit?
e.g. taking today as an example your upper limit would be 20011-02-04T00:00:00Z
and so your query would be something like:
q=products:Dog AND saledate:[* TO 20011-02-04T00:00:0
Hello,
I've been wrestling with a query use case, perhaps someone has done this
already?
Is it possible to write a query that excludes results based on another
query?
Scenario:
I have an index that holds:
'customer' (textgen)
'product' (textgen)
'saledate' (date)
I'm looking to ret