alpha
Login
or
Join now
boltless.me
/
zoekt
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
fork of https://github.com/sourcegraph/zoekt
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
zoekt
/
cmd
/
zoekt-git-index
/
at
120aebf6db233e5f5179f0e1223e3a7b6b70ec5c
1 file
Keegan Carruthers-Smith
indexserver: introduce DocumentRankVersion (#460)
3y ago
d8b79cc1
main.go
indexserver: introduce DocumentRankVersion (#460) This field allows us to indicate when the ranks have changed, which forces us to re-index. We introduce DocumentRankVersion as a builder options such that it can influence that behavior. By making a corresponding change to Sourcegraph to set this field we will automatically update indexes as document ranks change for a repository. Note: We remove the document ranking feature flag from index server. This is now completely controlled by frontend. Note: I got started on a larger refactor here to make this more clean. The idea is to make DocumentRanksPath a URL which is controlled by Sourcegraph. We can then use the URL changing to indicate re-indexing for example. For now this is a much smaller change which will unblock us sooner. Test Plan: Ran a local server and tested that when the ranks are missing nothing happens. When the ranks change or are added we reindex. Additionally when the ranks do not change it does nothing. go install ./cmd/zoekt-git-index go run ./cmd/zoekt-sourcegraph-indexserver \ -sourcegraph_url ~/src/github.com/sourcegraph/ \ -listen 127.0.0.1:6072 # We expect this to trigger an index echo -e "README.md\t0.1" > ~/src/github.com/sourcegraph/zoekt/SG_DOCUMENT_RANKS pkill -SIGUSR1 zoekt-sourcegra # We expect this to do nothing since the ranks have not changed pkill -SIGUSR1 zoekt-sourcegra # We expect this to trigger a re-index echo -e "README.md\t0.2" > ~/src/github.com/sourcegraph/zoekt/SG_DOCUMENT_RANKS pkill -SIGUSR1 zoekt-sourcegra
3 years ago