Skip to content

No line number return for multi line search through REST API #2834

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

Open
wy193777 opened this issue Jun 25, 2019 · 2 comments
Open

No line number return for multi line search through REST API #2834

wy193777 opened this issue Jun 25, 2019 · 2 comments
Labels

Comments

@wy193777
Copy link
Contributor

Currently if made a multi line search, even if there are search result, the server will return an empty string as lineNumber. Return the first line's line number makes more sense to me.

@vladak
Copy link
Member

vladak commented Jun 26, 2019 via email

@vladak vladak added the API label Jun 26, 2019
@wy193777
Copy link
Contributor Author

URL http://localhost:8080/api/v1/search?path=arch/arm64/kernel/process.c&full=%22%0A%09%5C%7D%0A%5C%7D%0A%5C/%5C*%0A%20%5C*%20Thread%20switching.%0A%20%5C*%5C/%22

Decoded query string:

path: arch/arm64/kernel/process.c
full: "
	\}
\}
\/\*
 \* Thread switching.
 \*\/"

OpenGrok Response:

{
	"time": 18,
	"resultCount": 3,
	"startDocument": 0,
	"endDocument": 2,
	"results": {
		"/5.1.0.0-Linux/kernel/kernel-4.14/arch/arm64/kernel/process.c": [{
			"line": "...",
			"lineNumber": ""
		}],
		"/5.1.0.2-linux/kernel/kernel-4.14/arch/arm64/kernel/process.c": [{
			"line": "...",
			"lineNumber": ""
		}],
		"/5.1.3.0-linux/kernel/kernel-4.14/arch/arm64/kernel/process.c": [{
			"line": "...",
			"lineNumber": ""
		}]
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants