Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/google/zoekt
Fast trigram based code search
https://github.com/google/zoekt
Last synced: 28 days ago
JSON representation
Fast trigram based code search
- Host: GitHub
- URL: https://github.com/google/zoekt
- Owner: google
- Created: 2016-04-29T16:46:16.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-01-16T08:47:30.000Z (10 months ago)
- Last Synced: 2024-10-01T14:24:16.598Z (about 1 month ago)
- Homepage:
- Size: 1.1 MB
- Stars: 1,697
- Watchers: 36
- Forks: 113
- Open Issues: 45
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a fast text search engine, intended for use with source
code. (Pronunciation: roughly as you would pronounce "zooked" in English)**NOTICE:** [github.com/sourcegraph/zoekt](https://github.com/sourcegraph/zoekt) is the active main repository for Zoekt development.
INSTRUCTIONS
============Downloading:
go get github.com/google/zoekt/
Indexing:
go install github.com/google/zoekt/cmd/zoekt-index
$GOPATH/bin/zoekt-index .Searching
go install github.com/google/zoekt/cmd/zoekt
$GOPATH/bin/zoekt 'ngram f:READ'Indexing git repositories:
go install github.com/google/zoekt/cmd/zoekt-git-index
$GOPATH/bin/zoekt-git-index -branches master,stable-1.4 -prefix origin/ .Indexing repo repositories:
go install github.com/google/zoekt/cmd/zoekt-{repo-index,mirror-gitiles}
zoekt-mirror-gitiles -dest ~/repos/ https://gfiber.googlesource.com
zoekt-repo-index \
-name gfiber \
-base_url https://gfiber.googlesource.com/ \
-manifest_repo ~/repos/gfiber.googlesource.com/manifests.git \
-repo_cache ~/repos \
-manifest_rev_prefix=refs/heads/ --rev_prefix= \
master:default_unrestricted.xmlStarting the web interface
go install github.com/google/zoekt/cmd/zoekt-webserver
$GOPATH/bin/zoekt-webserver -listen :6070A more organized installation on a Linux server should use a systemd unit file,
eg.[Unit]
Description=zoekt webserver[Service]
ExecStart=/zoekt/bin/zoekt-webserver -index /zoekt/index -listen :443 --ssl_cert /zoekt/etc/cert.pem --ssl_key /zoekt/etc/key.pem
Restart=always[Install]
WantedBy=default.targetSEARCH SERVICE
==============Zoekt comes with a small service management program:
go install github.com/google/zoekt/cmd/zoekt-indexserver
cat << EOF > config.json
[{"GithubUser": "username"},
{"GithubOrg": "org"},
{"GitilesURL": "https://gerrit.googlesource.com", "Name": "zoekt" }
]
EOF$GOPATH/bin/zoekt-server -mirror_config config.json
This will mirror all repos under 'github.com/username', 'github.com/org', as
well as the 'zoekt' repository. It will index the repositories.It takes care of fetching and indexing new data and cleaning up logfiles.
The webserver can be started from a standard service management framework, such
as systemd.SYMBOL SEARCH
=============It is recommended to install [Universal
ctags](https://github.com/universal-ctags/ctags) to improve
ranking. See [here](doc/ctags.md) for more information.ACKNOWLEDGEMENTS
================Thanks to Alexander Neubeck for coming up with this idea, and helping me flesh
it out.DISCLAIMER
==========This is not an official Google product