Noob question on parsing search results (how to rank?) #293
Unanswered
jasonpolites
asked this question in
Q&A
Replies: 2 comments 1 reply
-
You could change the initial JSON data structure before indexing it, into a shape which will fit with how you want to use the results.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
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
-
Hi folks,
First time using the lib.. so far it's awesome, but I'm not sure how to deal with duplicates in the search result set. My use case is indexing email (after it's been parsed). Here is the sample/demo app I tried:
Running this, the console prints:
This result looks "correct", but I'm not sure how to easily iterate the results without running into a bunch of duplicates. The goal here is to list matching docs, in this case there are 2, but the field-centric arrangements of the result schema means it doesn't seem easy to just naively iterate the result set to see matching documents.
Is the idea that, when displaying results, I should maintain a local hashmap of all documents in the result set? And if so, what is the recommendation for sort order? I feel like the challenge here is more one of sorting than just retrieval (?)
Updated
Still hoping for authoritative guidance, but in the meantime I implemented a hacky ranking function
Beta Was this translation helpful? Give feedback.
All reactions