【发布时间】:2022-11-12 07:05:36
【问题描述】:
我一直在通过将查询作为参数传递给.search() 方法来搜索marqo 中的文档,但这会返回从最佳匹配到最不匹配的文档列表。我想从文档中传递一个关键字,我应该只获取具有这些关键字的文档
这就是我目前搜索的方式:
results = mq.index("my-index").search(
q="keyword"
)
这是输出的样子:
{'hits': [{'Description': "document_1_description",
'Title': 'document_1_title',
'_highlights': best_match,
'_id': 'd65454db-680c-4f77-8c82-f9aaea66efa1',
'_score': 0.5562359},
{'Description': 'document_2_description',
'Title': 'document_2_title',
'_highlights': best_match},
'_id': 'article_591',
'_score': 0.5176503}],
'limit': 10,
'processingTimeMs': 107,
'query': 'keyword'}
【问题讨论】:
标签: python python-3.x machine-learning