Skip to content

REST API for Code Search #31375

Open
@kremerd

Description

@kremerd

Feature Description

One of Giteas best features is the blazing fast indexed full text search available at /explore/code. Unfortunately it seems that there is no REST API to access this feature programmatically. Such an API would be very useful to visualize results or present them in some other way.

Therefore I propose to introduce a new REST API

GET /api/v1/version/code?q=<queryString>&t=<fuzzy>&page=<pageNumber>&limit=<pageSize>

It should return a list of search results, containing at least the matched repository, file path, line number und line content

[{
    "repository": "my-repository",
    "path": "src/test/resources/strings.properties",
    "lineNumber": 255,
    "line": "TEXT=Lorem ipsum solor delet"
}]

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/apiConcerns mainly the APItype/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