Skip to content

Add advanced_search parameter to issue search #3867

@sjdaws

Description

@sjdaws

Currently search doesn't support the advanced_search parameter when searching issues. This can cause incorrect or no results to be returned when performing complex search queries.

For example, by default the GitHub API interprets spaces as OR, so the following search query returns all issues in a repository:

repo:org/name created:>2025-11-01 created:<=2025-11-30

Wrapping the dates in parentheses and explicitly defining AND fixes it when calling the API directly:

repo:org/name (created:>2025-11-01 AND created:<=2025-11-30)

However this is encoded in a way the default search is unable to handle, leading to no results being returned:

repo%3Aowner%2Fname+type%3Aissue+i%28created%3A%3E2025-11-01+AND+created%3A%3C%3D2025-11-30%29

This can be resolved by changing URI encoding on greater than and less than to HTML encoding:

repo%3Aowner%2Fname+type%3Aissue+i%28created%3A&gt;2025-11-01+AND+created%3A&lt;%3D2025-11-30%29

However this will likely break other functionality.

Advanced search via API was introduced by GitHub on 6 March 2025 which interprets spaces as AND by default and fixes the original query without the need for additional parameters. To enable advanced search functionality, &advanced_search=true needs to be appended to the end of the issue search URL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions