Skip to content

Search API returns different results from Web UI #3239

Open
@ghost

Description

Describe the bug
The REST API (api/v1/search) returns different results from Web UI for the same query condition.

Environments:

  • OpenGrok 1.3.2
  • OpenJDK 1.8.0_222
  • OS: Amazon Linux on EC2 (4.14.146-93.123.amzn1.x86_64)
  • Apache Tomcat/8.5.42

To Reproduce
Steps to reproduce the behavior:
Searching from GUI, gets "Searched +full:google +refs:google (Results 25801 – 25802 of 25802) sorted by relevance"
But searching from REST API gets

curl https://<grok-server>/api/v1/search?full=google&defs=&refs=google&path=&hist=&type=&searchall=true&start=0&maxresults=1 | python -m json.tool
{
    "time": 1170,
    "resultCount": 38082,
    "startDocument": 0,
    "endDocument": 0,
    "results": {
...

Expected behavior
Web UI and API should return same results for the same search condition.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions