Skip to content

conditions that code cannot be searched #26723

Closed
@loynoir

Description

@loynoir

Description

BUG

cannot search code

  • or when code is within non-newest commit

  • or when code is within non-default branch

  • or when code is within non-default branch X, but now X is default branch

reproduce

  • copy paste indexer config from docs

  • echo '"HELLO"' > reproduce.js, commit

  • echo '"WORLD"' > reproduce.js, commit

  • push to non-default branch test

  • stop gitea, rm indexers/repos.bleve, start gitea

  • ensure default branch is main

  • search HELLO, got nothing, which is unexpectedly

  • search WORLD, got nothing, which is unexpectedly

  • update default branch from main to test

  • search HELLO, got nothing, which is unexpectedly

  • search WORLD, got nothing, which is unexpectedly

  • stop gitea, rm indexers/repos.bleve, start gitea

  • search HELLO, got nothing, which is unexpectedly

  • search WORLD, got match

  • update default branch from test to main

  • stop gitea, rm indexers/repos.bleve, start gitea

Gitea Version

1.20.3

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

docker image docker.io/gitea/gitea:1.20.3

Database

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/needs-feedbackFor bugs, we need more details. For features, the feature must be described in more detailtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions