Skip to content

Why does the search API sometimes return line as "..."? #4749

Answered by vladak
samwarring asked this question in Q&A

You must be logged in to vote

I can replicate this with the OpenSolaris workspace. This happens for all of the std::string symbol matches.

TLDR: due to the differences in search result interpretation between API search and UI search, the API search can match only definitions, not symbols.

The call to getContext() in SearchEngine#results():

hasContext = sourceContext.getContext(
new InputStreamReader(new FileInputStream(
source + filename), StandardCharsets.UTF_8),
null, null, null, filename, tags, nhits > 100,
getDefinition() != null, ret, scopes);
returns false, hence …

Replies: 1 comment 3 replies

You must be logged in to vote
3 replies
@vladak

Answer selected by vladak
@samwarring

@vladak

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #4701 on March 21, 2025 08:54.