Is it possible to apply a regex for a filter parameter in the "/documents/get_by_filters" endpoint? #5168
-
I'm trying to make a document retrieval request that searches documents for the entered search text in either their content OR their filename If I make the filter like that It looks for files containing the text correctly but the filename has to be an exact match. How can I apply such a regex to the 'name' parameter or another meta property? For example I want to be able to match the following documents when I enter the word "cookies":
Note that I can achieve this directly with Opensearch using the following query: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
For now unfortunately metadata filtering supports only exact matches. If that makes sense in your scenario, you may consider adding some more metadata with the keywords you're interested in querying, like |
Beta Was this translation helpful? Give feedback.
For now unfortunately metadata filtering supports only exact matches. If that makes sense in your scenario, you may consider adding some more metadata with the keywords you're interested in querying, like
{'category': 'cookies'}
. Otherwise I'm afraid you'll have to implement this feature separately.