Replies: 1 comment
-
Hi, I ran the code you provided and the retrieval works. Could you share more information? What version are you on? Did the prebuilt index download successfully? If it did, there should've been some messages printed to console and it should've taken some time. Could you check the type of the variable 'searcher' after you try to initialize it with On another note, after retrieval, your code for printing doesn't work because DenseSearchResult doesn't have the attribute raw. Instead, to print out results, you can use for i in range(5):
print(f'{i+1}: {hits[i].docid} - {hits[i].score:.2f}')
doc = searcher.doc(hits[i].docid)
print(doc.raw())
print() |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I wrote the following code according to the document, but encountered errors, and I don't know why, the content of the document seems not to be the latest.
I request the latest code for a practical pre-built index for DPR retrieval.
Error Log:
Beta Was this translation helpful? Give feedback.
All reactions