Skip to content

[bug] filterByFilepaths in a search query not working in copilot, the search returns no results #928

@kislam-eps

Description

@kislam-eps

Describe the bug

When I include filterByFilepaths in a search query, the search returns no results. Removing filterByFilepaths from the same query returns results as expected. The equivalent file: filter in the Sourcebot search UI works correctly.

I also tried using regex-style patterns instead of glob patterns — same issue, no results.

Expected behavior: filterByFilepaths should filter results by filepath, consistent with the file: filter in the search UI.

Actual behavior: Any value in filterByFilepaths causes the query to return zero results. We have .frm files and none of the following works:

query: "sPayPeriodMsg", filterByFilepaths: [".frm"], ref: "dev"
query: "sPayPeriodMsg", filterByFilepaths: ["**/
.frm"], ref: "dev"
query: "sPayPeriodMsg", filterByFilepaths: [".*\.frm$"], ref: "dev"
When the filterByFilepaths is removed it returns a hit.

To reproduce

Use copilot to query through mcp.

Any value in filterByFilepaths causes the query to return zero results. We have .frm files and none of the following works:

query: "sPayPeriodMsg", filterByFilepaths: [".frm"], ref: "dev"
query: "sPayPeriodMsg", filterByFilepaths: ["**/
.frm"], ref: "dev"
query: "sPayPeriodMsg", filterByFilepaths: [".*\.frm$"], ref: "dev"
When the filterByFilepaths is removed it returns a hit.

Sourcebot deployment information

Sourcebot version (e.g. v3.0.1): v4.11.6

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions