Which is returned in the graphql client as a datetime: "published_at": "2024-04-22T08:16:47Z",
In my index I may have some published_at times that are in the future that I don’t want to retrieve. I would like to filter less than or equal to today’s date (or less than tomorrow’s date).
May be worth adding something to the docs, as currently the only datetime filtering in the docs is displaying how to filter on weaviate’s meta timestamps, not user-defined ones (unless I missed it).
The only point I was making was the only example of datetime filtering in the docs is using a built-in method specifically for the meta properties - by_creation_time - from the first link: filters=wvc.query.Filter.by_creation_time().greater_or_equal(year2k)
Unless I missed it, I didn’t see anywhere explaining filtering user defined datetimes. Perhaps it’s implied since you can do value comparison with datetimes already in python (just like using less than for strings works also).
Just my experience that I didn’t find it clear. Up to you if you want to act on that.
I am having issues trying to filter results by date here.
I want to filter out documents that are earlier than 2024-07-11, but somehow documents are not filtered. When I printed the response, I can see dates earlier than 2024-07-11 are still appearing.
Expected retrieved documents should be only be 2024-07-11 or later.
Please let me know if there is a straightforward way to do this:
I’m currently inserting data using LlamaIndex and I assumed I could use node.metadata to filter by dates.
for obj in response.objects:
print(obj.properties.keys())
# dict_keys([_node_type', 'content', 'page_label', 'last_modified_date', ..., 'creation_date', ... ])
Is there really no way to use this metadata for filtering? My users have inserted a significant number of documents, and I’d prefer not to delete the collection and ingest the data again.
Although this have resolved my issue with integration, but still does not give me an idea how to query direct with Weaviate using the node.metadata['last_modified_date] | obj.properties['last_modified_date'].