-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get file names from InMemoryDocumentStore #211
Comments
Hi @anirbansaha96,
You can use
You can use |
@tanaysoni The output for my command But when I'm searching
|
@tanaysoni, wanted to add some information in case it helps to pinpoint the issue. |
@tanaysoni Has there been changes made to |
Hi @anirbansaha96, With #217, you can now get file names using the ID for all document stores. Here's an example: from haystack.database.memory import InMemoryDocumentStore
document_store = InMemoryDocumentStore()
test_docs = [
{"name": "testing the finder 1", "text": "testing the finder with pyhton unit test 1", 'meta': {'url': 'url'}},
{"name": "testing the finder 2", "text": "testing the finder with pyhton unit test 2", 'meta': {'url': 'url'}},
{"name": "testing the finder 3", "text": "testing the finder with pyhton unit test 3", 'meta': {'url': 'url'}}
]
document_store.write_documents(test_docs)
print(document_store.get_document_by_id("e97e6fbebbc591fe7214e0bf26ec5dbf").meta["name"]) |
The issue is |
@tanaysoni There is still the same error,
|
@tanaysoni one update to pinpoint this issue:
|
Thank You #232 will solve this issue hopefully. |
Hi @anirbansaha96, thank you for raising the issue. It is now resolved with #232. |
Thank You, I've checked it. It works fine now. Thank You! |
Hi! I'm trying to use the elasticsearch retriever like this: However, the retriever.retrieve returns something like Thank you!! |
Hi @sophgit, you can use It seems you're using an earlier version of Haystack. With the current master branch, the representation of a document(in debugger/console, etc) is changed to be human-readable rather than the cryptic object notation. To upgrade to the laster master branch, you can follow the installation guide. |
aah, thank you @tanaysoni, it worked with the current master branch. |
I'm using InMemoryDocumentStore as my document_store. At a point, I'm using PDToTextConverter followed by writing them into the document store.
Is there any way to get a list of files in the InMemoryDocumentStore().
Also in my answer output, with the command
print_answers(prediction, details="all")
I'm getting a documentdoument_id
, is there any way to leverage this information to perhaps get the filename.The text was updated successfully, but these errors were encountered: