Skip to content

Repo indexer multi-term search is broken #7825

Closed
@guillep2k

Description

@guillep2k
  • Gitea version (or commit ref): 1.9
  • Git version: any
  • Operating system: any
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

When searching for multiple terms in a repository, the indexer can only 'see' the combinations where the terms first occur in a document. For example, consider the following text:

I like apples.
Hey, apples are nice.
  • Searching for any I, like, apples, hey, are or nice, Gitea returns the document correctly.
  • Searching for I like, like apples, apples hey and are nice, work too.
  • Searching for hey apples or apples are fails, because apples already appears in the document associated with like and hey.

I don't know what causes this behaviour, but it does not happen with the issues search, so it's probably not a bug in Bleve.

I'll try to look into this when I have some time.

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