You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have found that for some invocations of the /search API, the search would complete succesfully and return matches to the client, but the matches have line set to "...", and lineNumber set to "" (empty string). I found this usually happens when the search string contains "special characters".
For example, I want to search for std::string in my codebase. I need to escape each : character, and I need to enclose the entire search string in quotes, or else the results include the union of std and string. This gives me a search string of "std\:\:string".
A full search for that string gives correct results.
A symbol search for that string on the web GUI gives correct results.
A symbol search for that string using the REST API gives results where line is "..." and lineNumber is "".
Request is: <server address>/api/v1/search?projects=mainline&symbol=%22std%5C%3A%5C%3Astring%22
Response contains many matching files, but each file has one item {line: "...", lineNumber: "", tag: null}.
Unfortunately, I do not have admin access to the OpenGrok instance I'm using, so I cannot provide server logs, but I do know we're using OpenGrok 1.12.14.
Can someone shed light why I am getting these results? Am I invoking the API incorrectly, or is this a bug? Thank you!
The text was updated successfully, but these errors were encountered:
Hello, I have found that for some invocations of the
/search
API, the search would complete succesfully and return matches to the client, but the matches haveline
set to"..."
, andlineNumber
set to""
(empty string). I found this usually happens when the search string contains "special characters".For example, I want to search for
std::string
in my codebase. I need to escape each:
character, and I need to enclose the entire search string in quotes, or else the results include the union ofstd
andstring
. This gives me a search string of"std\:\:string"
.line
is"..."
andlineNumber
is""
.Request is:
<server address>/api/v1/search?projects=mainline&symbol=%22std%5C%3A%5C%3Astring%22
Response contains many matching files, but each file has one item
{line: "...", lineNumber: "", tag: null}
.Unfortunately, I do not have admin access to the OpenGrok instance I'm using, so I cannot provide server logs, but I do know we're using OpenGrok 1.12.14.
Can someone shed light why I am getting these results? Am I invoking the API incorrectly, or is this a bug? Thank you!
The text was updated successfully, but these errors were encountered: