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

添加docment时二分查找返回处理 #82

Open
markman101 opened this issue Feb 28, 2020 · 0 comments
Open

添加docment时二分查找返回处理 #82

markman101 opened this issue Feb 28, 2020 · 0 comments

Comments

@markman101
Copy link

在func (indexer *Indexer) AddDocuments(documents *types.DocumentsIndex)
// 查找应该插入的位置,且索引一定不存在
position, _ := indexer.searchIndex(
indices, indexPointers[keyword.Text], indexer.getIndexLength(indices)-1, document.DocId)
Q:
后续的代码都是处理二分查找为false的情况。
当二分查找为true的情况不需要考虑吗

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

1 participant