Null / Falsy Field Search in Filter DSL

Given the marqo specific querying DSL Query Filtering - Marqo Docs

Is there a way to filter on null / falsy fields if I have one that’s omitted from my document?

I have this filter


eventSourceType IN (EVS) AND  eventSourceId IN (6ca425f5-88d3-463a-b4b2-41dd2f5defc0) AND  (startTime:[1738853935 TO *] AND (endTime:[* TO 4070908800] OR endTime:[0 TO *])) AND long:[* TO 7177.926084] AND long:[-7375.085084 TO *] AND lat:[* TO 5627.946368] AND lat:[-5548.289768 TO *]

And the OR endTime:[0 TO *] portion is my failed attempt to find an empty numeric endTime field and include it in my filter

Hey Brian, for the time filter you can do something like this:

(endTime:[* TO 4070908800] OR endTime:[* TO 100000000000000])).

This will match these criteria:

  • endTime <= 4070908800
  • endTime is NOT below 100000000000000, which is equivalent to not existing. Just make sure that this arbitrarily large number is greater than all other endTimes you expect to have.

Thanks! I think “you can filter by just putting things out of range” is what I was looking for, wasn’t sure if there was a special handling for fields totally absent if they are typed to integer