fair-search / fairsearch-fair-for-elasticsearch

Fair search elasticsearch plugin
Apache License 2.0
14 stars 3 forks source link

FairRescoreBuilder: Queue construction for fair Rescore should be reviewed #38

Open tsuehr opened 6 years ago

tsuehr commented 6 years ago

int max = Math.min(topDocs.scoreDocs.length, rescoreContext.getWindowSize()); at line 277 in FairRescoreBuilder.java will fail at the following example: Docs in index =25 WindowSize = 10 k=10 Top 9 docs are nonprotected We will only have one protected element there for p= 0.8 and alpha = 0,1 we will need 6 protected elements

tsuehr commented 6 years ago

However, this can be seen as intended for very large indices.

Idea: for Index-size<400 execute a full index search for protected documents.