Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

guardrails: do case sensitive search #53771

Merged
merged 1 commit into from
Jun 20, 2023
Merged

guardrails: do case sensitive search #53771

merged 1 commit into from
Jun 20, 2023

Conversation

keegancsmith
Copy link
Member

We want to do this since we are currently looking for exact matches. Additionally attribution searches are slow on dotcom. My working theory for why is related to how we lookup ngrams. By specifying case sensitivity we drastically reduce the number of ngrams we need to check.

We also switch the protocol from Batch to Streaming. In practice this makes no difference since we specify count. Using streaming is more consistent with the other search clients.

Test Plan: go test

Part of https://github.com/sourcegraph/sourcegraph/issues/54950

We want to do this since we are currently looking for exact matches.
Additionally attribution searches are slow on dotcom. My working theory
for why is related to how we lookup ngrams. By specifying case
sensitivity we drastically reduce the number of ngrams we need to check.

We also switch the protocol from Batch to Streaming. In practice this
makes no difference since we specify count. Using streaming is more
consistent with the other search clients.

Test Plan: go test
@keegancsmith keegancsmith requested a review from a team June 20, 2023 14:42
@cla-bot cla-bot bot added the cla-signed label Jun 20, 2023
@keegancsmith keegancsmith enabled auto-merge (squash) June 20, 2023 14:59
@keegancsmith keegancsmith merged commit 3446ad5 into main Jun 20, 2023
@keegancsmith keegancsmith deleted the k/case branch June 20, 2023 15:15
ErikaRS pushed a commit that referenced this pull request Jun 22, 2023
We want to do this since we are currently looking for exact matches.
Additionally attribution searches are slow on dotcom. My working theory
for why is related to how we lookup ngrams. By specifying case
sensitivity we drastically reduce the number of ngrams we need to check.

We also switch the protocol from Batch to Streaming. In practice this
makes no difference since we specify count. Using streaming is more
consistent with the other search clients.

Test Plan: go test
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants