Skip to content

Hyphenated query terms are NOTted out in the Search API #322

@erikspears

Description

@erikspears

Describe the bug
When searching a hyphenated terms such as non-invasive via the Search API, the term after the hyphen is not present in any results. That second term is treated as though it were a Boolean NOT term.

To Reproduce
Steps to reproduce the behavior:

  1. From the Search API, search the term non-invasive
  2. You will likely get zero results (on 28-August-2023 this was the case)
  3. From the API, search the term non invasive
  4. You will get many results, and most/all will contain the term non-invasive, WITH the hyphen.
  5. You can repeat these steps with any hyphenated query term that should retrieve results normally.

Expected behavior
That searches through the API for the term non-invasive would return results that contain that phrase.

Screenshots
Two screenshots attached, both from Postman searches of the arXiv Search API. The first is for the term non-invasive and shows zero results returned (see the opensearch:totalResults value).
arxiv - zero results

The second is for the term non invasive and returns over 35K results.
arxiv - 35k results

Desktop (please complete the following information):

  • OS: MacOS 13.5.1
  • Browser: Brave
  • Version: v1.57.53 (Aug 23, 2023)

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
    arxiv - zero results

  • OS: [e.g. iOS8.1]

  • Browser [e.g. stock browser, safari]

  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions