Document db metadata filtering #29001
Unanswered
kartiksonaghela
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Checked other resources
Commit to Help
Example Code
Description
My metadata filtering is not working do you have any solution for this when i perform normal text search using query in that case it is working
text_search_results = collection.find({"$text": {"$search": "corn"}})
but while perfomring metadatafiltering with langchain there is a problem
so how do is solve this problem please help thanks
This are my search indexes
{'id': {'v': 4, 'key': [('_id', 1)], 'ns': 'test.agronomy_product'},
'vector': {'v': 4,
'key': [('vectorContent', 'vector')],
'vectorOptions': SON([('type', 'hnsw'), ('dimensions', 1536), ('similarity', 'cosine'), ('m', 16), ('efConstruction', 64)]),
'ns': 'test.agronomy_product'},
'text_index': {'v': 1,
'key': [('_fts', 'text'), ('_ftsx', 1)],
'ns': 'test.agronomy_product',
'default_language': 'english',
'weights': SON([('crop name', 1.0), ('product name', 1.0), ('seed product name', 1.0), ('product category', 1.0)]),
'textIndexVersion': 1}}
System Info
langchain==0.1.14
langchain_community==0.0.31
langchain_openai==0.1.1
langcodes==3.3.0
openai python-dotenv==1.0.1
language_data==1.1
pymongo==4.7.3
Beta Was this translation helpful? Give feedback.
All reactions