Skip to content
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

Facet Collector is deterministic but in presence of a tie, choses the top facet using a non-trivial rule. #357

Closed
fulmicoton opened this issue Jul 30, 2018 · 1 comment

Comments

@fulmicoton
Copy link
Collaborator

low priority bug. (yeah those are rare)

When collection top K facets and in presence of a tie, we rely on the fact that facets are appended sorted by their "facet path" to solve ties elegantly : the first element of a tie with the tie count wins.

The problems with this method is that if the tie happens within the first k elements, (10, /facet/a) vs (10, /facet/b), 10 ends being the min count, and we happen an element with higher count (11, /facet/c), the logic that decides whether /facet/a or /facet/b will be removed from the top K, while deterministic, might remove either /facet/a or /facet/b. From the user perspective, we would like to keep /facet/a to keep the well-defined logic :
we return the top 10 facets, and in case of tie we keep the first according to the lexicographical order.

@fulmicoton fulmicoton changed the title Facet Collector is deterministic but choses the top facet using a non-trivial rule. Facet Collector is deterministic but in presence of a tie, choses the top facet using a non-trivial rule. Jan 25, 2019
@hardikpnsp
Copy link
Contributor

I am a bit new to Rust, would like to contribute to this issue. seems like I can change the implementation of Ord trait of Hit in order to support order by count and in case of a tie - order by facet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants