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

structural search on S2 doesn't honor lang filter #61714

Closed
stefanhengl opened this issue Apr 9, 2024 · 1 comment · Fixed by #63791
Closed

structural search on S2 doesn't honor lang filter #61714

stefanhengl opened this issue Apr 9, 2024 · 1 comment · Fixed by #63791
Assignees
Labels
bug An error, flaw or fault that produces an incorrect or unexpected result, or behavior. team/search-platform Issues owned by the search platform team

Comments

@stefanhengl
Copy link
Member

stefanhengl commented Apr 9, 2024

The following query returns results from various languages on S2

r:^github\.com/sourcegraph/sourcegraph$ lang:yaml if ... else ... patternType:structural

However, locally and on .com the language filter works

/cc @sourcegraph/search-platform

@stefanhengl stefanhengl added the team/search-platform Issues owned by the search platform team label Apr 9, 2024
@jtibshirani
Copy link
Member

S2 has the search-content-based-lang-detection feature flag enabled, whereas it's not enabled on dot com and locally. So I likely broke this when working on https://github.com/sourcegraph/sourcegraph/issues/60341.

@jtibshirani jtibshirani self-assigned this Apr 9, 2024
@jtibshirani jtibshirani added the bug An error, flaw or fault that produces an incorrect or unexpected result, or behavior. label Apr 17, 2024
@linear linear bot closed this as completed Jun 26, 2024
@linear linear bot reopened this Jun 26, 2024
stefanhengl pushed a commit that referenced this issue Jul 15, 2024
The feature `search-content-based-lang-detection` was never implemented
for structural search. This PR fills in the missing pieces.

Fixes #61714
Relates to
https://linear.app/sourcegraph/project/make-precise-lang-filtering-default-4f06cfa28567

## Test plan

Two new unit tests checking that the lang filters are now correctly
passed to Zoekt.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug An error, flaw or fault that produces an incorrect or unexpected result, or behavior. team/search-platform Issues owned by the search platform team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants