Skip to content

support search for literals for repository code search with indexer #33588

Closed
@darren

Description

@darren

Feature Description

Sometimes searching for SQL/function in code results in bad hits. eg: search swaggerParameterBodies in my local mirror of gitea:

Image

which is actually defined in

type swaggerParameterBodies struct {
not showing in the first page of the search result.

this is the indexer config

[indexer]
REPO_INDEXER_ENABLED = true
REPO_INDEXER_PATH = indexers/repos.bleve
# # 300k
MAX_FILE_SIZE = 307200
REPO_INDEXER_INCLUDE = 
REPO_INDEXER_EXCLUDE = go.sum,package-lock.json

Support searching for literals by enclosing search terms in double quotation marks would be better.

For bleve using Match Phrase Query

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions