sourcegraph/internal
Julie Tibshirani 958afb0936
Search: boost matches on quoted terms (#64298)
Follow up to #64207. In our old search semantics, quotes were
interpreted literally. So a query like `"sourcegraph"` would match only
strings like `fmt.Println("sourcegraph")`. Now, both single and double
quotes are used for escaping, and mean that the contents should be
searched exactly.

This PR makes sure to boost matches on quoted terms in result ranking.
This way, users familiar with the old syntax are more likely to find
what they're after.

## Test plan

Adapted unit tests. Re-tested all queries from #64207 manually, plus
these ones:
* `'sourcegraph'`
* `"sourcegraph"`
2024-08-06 15:55:24 +03:00
..
accesstoken bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
actor bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
adminanalytics chore(frontend): use explicit cache for admin analytics (#64077) 2024-07-26 10:14:56 +02:00
api various improvements to saved searches (#63539) 2024-07-15 20:12:34 +00:00
appliance appliance(chore): Remove legacy maintenance API (#64282) 2024-08-05 20:49:55 -04:00
audit feat/requestclient: propagate original User-Agent as X-Forwarded-For-User-Agent (#64113) 2024-07-29 14:17:25 -07:00
auth chore: Move authn into cmd/frontend (#63648) 2024-07-31 03:26:25 +02:00
authbearer bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
authz chore: Move authn into cmd/frontend (#63648) 2024-07-31 03:26:25 +02:00
batches authz: Drop requirement for installing authz providers in every service (#63743) 2024-07-31 01:23:34 +02:00
binary
bytesize chore: Rename type Bytes -> Size (#64183) 2024-07-31 11:37:12 +00:00
byteutils Backend: add line index (#63726) 2024-07-09 19:59:42 +00:00
clientconfig Add a better Cody client server-sent configuration mechanism (#63591) 2024-07-03 22:57:31 +00:00
cloud bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
cmd chore(log): remove use of log15 in ghe-feeder (#64131) 2024-07-30 11:31:38 +02:00
codeintel chore: Consolidate mocks for dbworker/store.Store type (#64294) 2024-08-06 18:40:25 +08:00
codemonitors chore(worker): disable jobs based on ENVs (#63853) 2024-07-16 18:07:22 +02:00
codygateway feat/enterpriseportal: implement GetCodyGatewayUsage RPC (#63555) 2024-07-02 09:39:15 -07:00
collections chore: Add collection type - OrderedSet (#63469) 2024-06-25 13:13:14 +00:00
comby bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
completions Adding HTTP Requests support for Azure OpenAI (#64116) 2024-07-30 17:45:17 +02:00
compute chore: Centralize languages package as source-of-truth (#63292) 2024-06-18 13:10:24 +00:00
conf Enable SCIP based APIs by default (#64285) 2024-08-06 06:12:30 +00:00
cookie bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
ctags_config feat(codenav): Add symbol support for the Hack language (#64015) 2024-07-30 10:46:00 -04:00
database chore(search_jobs): add janitor job (#64186) 2024-08-01 15:29:10 +02:00
debugserver chore/deps: upgrade grpc, prometheus/common (#63328) 2024-06-19 09:55:44 -04:00
deviceid chore: Remove global externalURL watcher (#64058) 2024-07-31 03:43:28 +02:00
diskcache chore: Make return type more obvious (#63651) 2024-07-31 03:42:18 +02:00
diskusage bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
dotcom dotcom: MockSourcegraphDotComMode requires a T for cleanup (#61172) 2024-03-14 20:27:21 +00:00
download
embeddings chore: Rename uploadstore packages for clarity (#63931) 2024-07-22 08:57:56 +08:00
encryption bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
endpoint bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
env chore(config): clarify env var already registered panic (#63784) 2024-07-11 13:59:29 +00:00
errcode Chore: remove gorilla/schema (#63738) 2024-07-10 15:36:37 +00:00
eventlogger chore(analytics): remove Cody characters events from inclusion in pin… (#63557) 2024-06-29 01:23:17 +00:00
execute fix(ci): check command out for error when git fails (#63993) 2024-07-23 09:56:33 -05:00
executor worker: Reduce frequency of very frequently run jobs (#62864) 2024-05-23 18:31:20 +02:00
extsvc chore: Rename type Bytes -> Size (#64183) 2024-07-31 11:37:12 +00:00
featureflag Feature flags: relax some constraints (#61343) 2024-03-25 10:39:01 -06:00
fileutil gitserver: Implement RefHash in backend (#62612) 2024-05-13 16:05:16 +02:00
github_apps fix(batches): switch github app installation handling from redirect flow to webhooks (#64036) 2024-07-26 11:53:34 +00:00
gitserver gitserver: Add OctopusMergeBase RPC method (#63842) 2024-07-19 13:25:09 +02:00
goroutine rcache: Explicitly pass redis pool to use (#63644) 2024-07-10 01:23:19 +02:00
gosyntect observability: Adds useful data to traces from gosyntect.Highlight (#64121) 2024-07-29 14:07:01 +02:00
gqltestutil authz: Compute providers on the fly (#64012) 2024-07-31 02:59:41 +02:00
gqlutil ci: re-enable race detection (#52776) 2023-06-05 20:41:47 +02:00
grpc chore: Mark flaky test as manual (#63968) 2024-07-22 09:29:38 +02:00
guardrails bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
hashutil
honey honey: add read locking to event.Fields call for NonSendingReader (#61886) 2024-04-15 15:19:38 +00:00
hostmatcher gomod: update or vendor buildkit, docker, hostmatcher and saml to resolve CVEs (#60130) 2024-02-05 13:14:15 +02:00
hostname
htmlutil Web: add mermaid diagram rendering (#62678) 2024-05-16 14:54:43 -04:00
httpcli fix: block URLs without a hostname (#64248) 2024-08-02 15:53:33 +01:00
httpserver lib/background: upgrade Routine interface with context and errors (#62136) 2024-05-24 10:04:55 -04:00
httptestutil Remove GitHub proxy service (#56485) 2023-09-14 19:43:40 +02:00
insights feat(search): remove smart search logic (#64215) 2024-08-01 18:02:35 +03:00
instrumentation chore: upgrade otel SDK packages (#59564) 2024-01-15 20:08:54 +00:00
ipynb Render Jupyter notebooks (#62583) 2024-05-10 12:21:10 -04:00
jsonc ci: re-enable race detection (#52776) 2023-06-05 20:41:47 +02:00
k8s/resource feat(appliance): local developer mode (#63417) 2024-06-24 16:19:27 +01:00
lazyregexp
license bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
licensing licensecheck: Make proper goroutine (#63655) 2024-07-31 03:42:38 +02:00
limiter bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
logging fix: update links for dev docs (#62758) 2024-05-17 13:47:34 +02:00
luasandbox bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
mapfs bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
maps Revert "Remove unused internal/k8s package" (#61835) 2024-04-12 09:35:40 -04:00
markdown Render Jupyter notebooks (#62583) 2024-05-10 12:21:10 -04:00
memcmd chore: Rename type Bytes -> Size (#64183) 2024-07-31 11:37:12 +00:00
memo
metrics chore/deps: upgrade grpc, prometheus/common (#63328) 2024-06-19 09:55:44 -04:00
modelconfig Don't block frontend initialization with invalid modelconfig (#64200) 2024-08-01 15:56:23 -07:00
notebooks gating: Add individual switches for disabling tools features (#63686) 2024-07-16 15:45:38 +02:00
oauthtoken bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
oauthutil bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
object chore: Remove unused TTL in object.Storage config (#63947) 2024-07-22 02:58:57 +00:00
observation Correctly re-map source ranges in new SCIP-based APIs (#63630) 2024-07-11 06:55:46 +00:00
oobmigration backend/appliance: Introduce a basic utils package for appliance sourcegraph upgrades (#63529) 2024-07-04 01:48:54 +00:00
opencodegraph fix: update links for dev docs (#62758) 2024-05-17 13:47:34 +02:00
otlpenv
own chore: Move authn into cmd/frontend (#63648) 2024-07-31 03:26:25 +02:00
packagefilters bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
paths Replace all traditional for-loops (#60988) 2024-03-11 16:05:47 +02:00
pbt chore(codenav): Resolve repo and commit in common code (#63072) 2024-06-07 21:58:36 +08:00
perforce bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
productsubscription bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
profiler bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
pubsub lib/background: upgrade Routine interface with context and errors (#62136) 2024-05-24 10:04:55 -04:00
randstring Replace all traditional for-loops (#60988) 2024-03-11 16:05:47 +02:00
ratelimit chore: Change errors.HasType to respect multi-errors (#63024) 2024-06-06 13:02:14 +00:00
rbac bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
rcache Remove old cache cleanup method (#63645) 2024-07-10 02:04:53 +02:00
redislock enterprise-portal: implement basic MSP IAM and RPCs (#63173) 2024-06-19 21:46:48 -04:00
redispool gateway: Don't panic because of duplicate env var registration (#63787) 2024-07-11 17:58:28 +00:00
releaseregistry feat(appliance): self-update (#63780) 2024-07-11 17:59:39 +01:00
repos gerrit: Add support for repositoryPathPattern (#64102) 2024-07-26 15:08:14 +02:00
repoupdater dotcom: Remove on-demand cloning of repositories (#63321) 2024-06-26 14:53:14 -07:00
requestclient fix/internal/requestclient: read all instances of x-forwarded-for header, not just the first (#64137) 2024-07-30 08:35:23 -07:00
requestinteraction requestinteraction: add X-Sourcegraph-Interaction-ID propagation (#58016) 2023-11-22 20:09:39 +00:00
sams bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
sanitycheck
search Search: boost matches on quoted terms (#64298) 2024-08-06 15:55:24 +03:00
searcher searcher: Modernize entrypoint and gRPC server (#63700) 2024-07-09 21:10:11 +02:00
security Remove unused package (#63646) 2024-07-10 02:30:28 +02:00
service support fast, simple sg start single-program-experimental-blame-sqs for local dev (#63435) 2024-06-24 21:12:47 +00:00
settings Chore: remove search console (#63322) 2024-06-19 11:05:03 -06:00
siteid bazel: first pass at moving moving logging linting into nogo (#58910) 2024-01-02 10:07:25 -08:00
slack
sourcegraphoperator chore: Move authn into cmd/frontend (#63648) 2024-07-31 03:26:25 +02:00
src-cli Bump minimum src-cli version required (#62700) 2024-05-16 09:52:46 +00:00
src-prometheus fix: update links for dev docs (#62758) 2024-05-17 13:47:34 +02:00
symbols symbols: Minor code cleanup (#63708) 2024-07-10 01:22:03 +02:00
sysreq ci: re-enable race detection (#52776) 2023-06-05 20:41:47 +02:00
telemetry V2-telemetry: Simplify sensitive metadata allowlist to accept feature only (#63325) 2024-06-27 15:22:58 -04:00
telemetrygateway chore/deps: upgrade grpc, prometheus/common (#63328) 2024-06-19 09:55:44 -04:00
temporarysettings
testutil build-tracker: fix convenience urls in env (#62340) 2024-05-01 14:26:34 +00:00
timeutil ci: re-enable race detection (#52776) 2023-06-05 20:41:47 +02:00
trace chore: Break dependency of internal/trace on conf (#62177) 2024-04-30 21:12:39 +02:00
tracer chore: Break dependency of internal/trace on conf (#62177) 2024-04-30 21:12:39 +02:00
ttlcache bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
txemail fix/internal/txemail: add timeout for SMTP connection establishment (#63759) 2024-07-10 12:34:06 -07:00
types Search: add regex support to repo:has.meta() (#63891) 2024-07-19 11:53:24 -06:00
unpack ci: re-enable race detection (#52776) 2023-06-05 20:41:47 +02:00
updatecheck bug/release: update version consts in updatecheck handler (#64052) 2024-07-24 20:32:10 -07:00
uploadhandler chore: Rename uploadstore packages for clarity (#63931) 2024-07-22 08:57:56 +08:00
usagestats track usage stats for saved searches in UTC day increments (#63904) 2024-07-23 19:17:40 -06:00
users chore(worker): move aggregated user stats job to worker (#64033) 2024-07-24 13:27:22 +02:00
vcs bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
version feat(bazel): read binary version info from accompanying files in OCI images instead of stamping //internal/version (#63977) 2024-07-30 20:52:01 +00:00
webhooks/outbound bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
workerutil lib/background: upgrade Routine interface with context and errors (#62136) 2024-05-24 10:04:55 -04:00
wrexec rcache: Explicitly pass redis pool to use (#63644) 2024-07-10 01:23:19 +02:00
buf.yaml
BUILD.bazel