💡 Results: how to get indices matching original data? #486
Unanswered
maxcorbeau
asked this question in
Q&A
Replies: 1 comment
-
This example in the docs shows that you can obtain In the example, the |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
🗺️ context: I want to use
tantivy
to perform a search and return a list of indices corresponding to original data I use to feed the docs, so after the search I can continue working with that original data and not withtantivy
docsSo far: all the examples I have seen for retrieving the results are long the line of
with:
doc_address
of type DocAddress with.segment_ord
and.doc
and none of these 2 properties seem to match the original data.segment_ord
: I get some index which doesn't match original data nor doc_id when I provide it.doc
: seems always set to 0doc
of type Document which is some custom representation of the data in tantivy format (e.g. the value for a given field is turned into a list)🔴 Problem: none of this helps me easily work back with my original data
💡 Question: what's the easiest way from
searcher.search(query, 3)
to just get an ordered list of indices (from most to least relevant) corresponding to the original data I used to feed docs into tantivy?Beta Was this translation helpful? Give feedback.
All reactions