Skip to content

Search for numbers only does not work #71

@nhennigan

Description

@nhennigan

Recently an engineer was looking up a port number in our docs and it did not return any results. The number is in fact in our docs. This led to an investigation on why numbers only search requests were returning nothing found.

Image

I believe I have narrowed it down to a certain line in the searchtools.js script which takes the input search string, parses it and then looks up the query in the search index.

      // maybe skip this "word"
      // stopwords array is from language_data.js
      if (
        stopwords.indexOf(queryTermLower) !== -1 ||
        queryTerm.match(/^\d+$/)
      )
        return;

It seems to be a deliberate check implemented to drop any queries that start with a digit. I have tested this on other documentation sets and the issue is also present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions