Closed fer-git closed 5 years ago
When I run your Python sample against one of our indexes, I get back a slightly different structure:
{'_index': 'gigaword', '_type': 'texts', '_id': 'NYT_ENG_2000', '_score': 1.0, '_source': {'doc': {'text': "..."}, 'metadata': {'id': 'NYT_ENG_2000', 'language': 'en', 'source': '', 'timestamp': 'Tue Mar 05 14:45:10 CET 2019', 'uri': ''}}}
In particular there is a doc
JSON element around the text
- and I think that is why you do not get back any results in your case, because INCEpTION's query code right now explicitly requests the field doc.text
:
highlightNode.putPOJO("fields", mapper.createObjectNode()
.putPOJO("doc.text", emptyNode));
I guess that might be an additional setting we should add to the configuration?
I just modify the document structure in ElasticSearch from:
{"text":...}
into:
{"doc": {"text": ...}}
I can confirm I get the result from query. I would suggest you to add documentation on the recommended document structure / make it more flexible on which field should be searched.
Thanks for quick response.
Yep, we'll add this to the docs. Thanks for prodding us :)
Describe the bug I would like to use ElasticSearch as Document Repositories. I enable it through setting but when I query for some words on the search page, I cannot get any result.
Currently, I have both Inception version 0.8.3 and ElasticSearch version 6.7.0 on my local computer.
My Document Repositories setup: Remote URL: http://localhost:9200 Index Name: finance Search Path: _search Object Type: para
I am able to query the documents through python api,
I got:
Is there specific setup that I need to follow?