dev: Enable sharded search by default (#6291)

This is only for dev mode, we will follow up with enabling horizontal search
by default in docker and k8s in a later commit.
This commit is contained in:
Keegan Carruthers-Smith 2019-10-31 15:56:36 +02:00 committed by GitHub
parent 1651a7e072
commit ea73532add
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -64,7 +64,7 @@ export USE_ENHANCED_LANGUAGE_DETECTION=${USE_ENHANCED_LANGUAGE_DETECTION:-1}
export GRAFANA_SERVER_URL=http://localhost:3370
# Enable sharded indexed search mode
[ -z "${DEV_SEARCH_SHARDING-}" ] || export INDEXED_SEARCH_SERVERS="localhost:3070 localhost:3071"
[ -n "${DISABLE_SEARCH_SHARDING-}" ] || export INDEXED_SEARCH_SERVERS="localhost:3070 localhost:3071"
# webpack-dev-server is a proxy running on port 3080 that (1) serves assets, waiting to respond
# until they are (re)built and (2) otherwise proxies to nginx running on port 3081 (which proxies to

View File

@ -6,8 +6,7 @@ cmd="${1:-}"
replica="${2:-0}"
index="$HOME/.sourcegraph/zoekt/index-$replica"
if (( replica != 0 )) && [[ -z "${DEV_SEARCH_SHARDING-}" ]]; then
echo "set DEV_SEARCH_SHARDING=t to enable horizontal indexed search"
if (( replica != 0 )) && [[ -n "${DISABLE_SEARCH_SHARDING-}" ]]; then
exit 0
fi