Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search index not updated when editing issue title #8060

Closed
1 of 3 tasks
bobemoe opened this issue Sep 2, 2019 · 8 comments · Fixed by #8061
Closed
1 of 3 tasks

Search index not updated when editing issue title #8060

bobemoe opened this issue Sep 2, 2019 · 8 comments · Fixed by #8061
Labels
Milestone

Comments

@bobemoe
Copy link
Contributor

bobemoe commented Sep 2, 2019

  • Gitea version (or commit ref): 1.10.0+dev-237-g765be7032
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

When an issue title is edited, the issue can't be found using the new title, in fact it still appears in the search results using the old keywords!

I created issue with title "specific keyword" then edited title and changed it to "renamed".

You can see the issue is not found in search for "renamed":

https://try.gitea.io/bobemoe/test/issues?type=all&state=open&labels=0&milestone=0&assignee=0&q=renamed

But can still be found for "specific keyword":

https://try.gitea.io/bobemoe/test/issues?type=all&state=open&labels=0&milestone=0&assignee=0&q=specific+keyword

@bobemoe
Copy link
Contributor Author

bobemoe commented Sep 3, 2019

Brilliant, this has fixed the issue, thanks for quick response :)

I need to edit the title again to trigger the reindex. Is there any way to run a full re-index to catch anything that was edited before the fix was implemented?

@guillep2k
Copy link
Member

@bobemoe You can stop Gitea, then safely remove the directory indexers/issues.bleve and restart Gitea again. The index will be rebuilt in a few seconds, or minutes if you've got a large number of issues.

@guillep2k
Copy link
Member

@bobemoe The fix is not included in any release yet, but you can get it if you build from source.

@bobemoe
Copy link
Contributor Author

bobemoe commented Sep 3, 2019

Curious. I'm running the dev build, which I think it pretty up to date? I tested by editing my title on the above try.gitea which is now at 1.10.0+dev-245-gc027eac1d changed it to "renamed again" and then it appeared to get re-indexed! Also did a second test and with new issue and it also working as expected.

Thanks for the tip about rebuilding the indexes, most useful :)

@guillep2k
Copy link
Member

I'm not sure how try.gitea.io is installed, but it could be that it's forced to rebuild indexes upon installation (it's a docker image AFAIK).

@bobemoe
Copy link
Contributor Author

bobemoe commented Oct 3, 2019

This is working fine in web frontend (thanks again for fixing) but I've just noticed its still a problem when updating issue title or body through the API. Would you like me to open new issue?

@bobemoe
Copy link
Contributor Author

bobemoe commented Oct 3, 2019

Also a problem when editing issue body in the web frontend.

@guillep2k
Copy link
Member

This is working fine in web frontend (thanks again for fixing) but I've just noticed its still a problem when updating issue title or body through the API. Would you like me to open new issue?

Yes, please

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants