-
Notifications
You must be signed in to change notification settings - Fork 780
UI and API /search return vastly different result sizes in project-less mode #3170
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
Comments
When you do the search in the UI, do you have any projects selected ? (assuming you are running with projects enabled) |
The screenshot supplied the entire UI, there is nothing else on the screen. I do not see anything relating to "projects". |
How do you run the indexer ? |
The indexer runs as in a container and upon completion, it bounces the web app container. The containers point to the same data and source dirs.
Why do you think the indexer would influence a difference between the REST api and the web UI returning different results? |
I was asking because of the projects. You're running the indexer with projects disabled and it might be relevant for root causing this issue. |
ok, thank you for the clarification. please let me know if there is anything else you need from me. |
@vladak any luck duplicating this issue? |
Tried with simple project-less setup, could not reproduce it. Is there something special about those 125 search hits ? |
I just reran the queries and I cannot see anything special. It appears to be a subset, but I see a variety of file types, directory structures, etc. They all seem valid, except for there being 125 instead of ~140,000. The indexer indexes a local directory of all our organization's git repos in the format Other examples I've executed from the REST endpoint (i.e. |
@vladak , you are correct: when projects are disabled there seems to be an erroneous "double paging" going on. The projects-enabled search by |
@vladak given the investigation @idodeclare has done, this feels like a legitimate issue. Do you agree? What are the next steps? |
@vladak any update on this issue? |
sorry, no bandwidth to work on this currently. |
This could lead to #1806 I think. |
Describe the bug
It does not seem like the API and the UI are returning the same results. Maybe I'm missing something, but when I search for the exact same thing from the UI and the API I get 125 results from the API and 9,708 from the UI. Something seems not right.
To Reproduce
Try
/search?...
and/api/v1/search?...
with all the same query parameters. In my test onlyfull=
was set.Expected behavior
I expect the UI and the REST API to return the same results
Screenshots
URL:
http://local-opengrok/search?full=test&defs=&refs=&path=&type=
URL:
http://local-opengrok/api/v1/search?full=test&defs=&refs=&path=&type=
The text was updated successfully, but these errors were encountered: