Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement endpoint for the config-server to search the configuration files' content #560

Closed
MariusBrill opened this issue Feb 14, 2020 · 2 comments · Fixed by #659
Closed
Assignees

Comments

@MariusBrill
Copy link
Member

We need a function to search for files based on their contents. This function would take a search string as an argument and returns the names of all files which contain this search string.

@AlexanderWert
Copy link
Contributor

"... and retunrs the names of all files..."
--> Plus the corresponding line numbers in the files where the string has been found

@MariusBrill MariusBrill self-assigned this Feb 14, 2020
@mariusoe mariusoe changed the title Add server sided search function for file contents Implement endpoint for the config-server to search the configuration files' content Feb 17, 2020
@mariusoe
Copy link
Member

mariusoe commented Feb 17, 2020

The response of the endpoint should contain JSON object which describes the search hits.

A hit could be something like:

{
    line: 10,
    start: 40,
    end: 50
}

,where the line represents the line-number of the hit and start and end the position of the term withing the line. In this example, the search functionallity will not consider search queries which spans multiple lines, thus, only within one line.

The search term should be passed to the endpoint via a request parameter. The endpoint could be look like: .../search?q=search_term
In this exmaple, the parameter q stands for "query".

mariusoe added a commit that referenced this issue Aug 12, 2020
…ntaining specific text (#659)

Co-authored-by: Marius Oehler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants