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

add interface for inverted index #520

Merged
merged 1 commit into from
Jan 23, 2023
Merged

add interface for inverted index #520

merged 1 commit into from
Jan 23, 2023

Conversation

stefanhengl
Copy link
Member

@stefanhengl stefanhengl commented Jan 18, 2023

We already have two implementations, combinedNgramOffset and binarySearchNgram, for the inverted index from ngrams to posting lists. With the btree I am working on, a third implementation will follow soon.

The current apporach guarantees a zero-value that won't panic in the tests, however, I don't think we should pile on top of that for the third implementation, but rather handle nil in the code and return an error where it makes sense.

We already have two implementations, comninedNgramOffset and
binarySearchNgram, for the inverted index from ngrams to posting lists.
With the btree I am working on, a third implementation will follow soon.

The current apporach guarantees a zero-value that won't panic in the
tests, however, I don't think we should pile on top of that for the
third implementation, but rather handle nil in the code and return an
error where it makes sense.
@stefanhengl stefanhengl merged commit 5f79575 into main Jan 23, 2023
@stefanhengl stefanhengl deleted the sh/ngrams-if branch January 23, 2023 15:57
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

Successfully merging this pull request may close these issues.

2 participants