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

get -1 unique terms in index stats #236

Closed
qguo96 opened this issue Sep 27, 2020 · 1 comment
Closed

get -1 unique terms in index stats #236

qguo96 opened this issue Sep 27, 2020 · 1 comment

Comments

@qguo96
Copy link
Contributor

qguo96 commented Sep 27, 2020

For indexes ms-marco-passage and ms-marco-doc:
When index_reader.stats() is executed, we get unique terms is -1.
There might be an issue with an underlying method.

@lintool
Copy link
Member

lintool commented Jan 3, 2021

This isn't a bug, as I explain here: https://github.com/castorini/pyserini/blob/master/docs/usage-indexreader.md#how-do-i-access-basic-index-statistics

Unless the index has been "optimized", i.e., merged into a single segment, the number of unique terms is not available.

@lintool lintool closed this as completed Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants