-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Allow searching by Issue Index #17929
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
Conversation
7e2beb2
to
a8d4e08
Compare
I would like to input |
we had that idea too, but is it intuitive? |
a8d4e08
to
782135f
Compare
7cd5906
to
cc4b3c5
Compare
It is working now :D I didn't test the elastic search part. Please test and review as I am not a Go dev |
is it normal for testing-amd64 test-mysql to fail? |
You can make some edits to an issue, then the search indexer will update the content. ps: I think it's better to have some unit test code to guarantee the code works as expected. If you have any question, Gitea developers will help.
Some failures are caused by some bugs in Gitea test code, it doesn't matter. Unrelated failures can be ignored. |
I added a case to bleve_test.go, is that enough? |
That's fine. I just realized that there was no unit test for elasticsearch ... |
@@ -236,6 +239,7 @@ func (b *BleveIndexer) Search(keyword string, repoIDs []int64, limit, start int) | |||
for _, repoID := range repoIDs { | |||
repoQueriesP = append(repoQueriesP, numericEqualityQuery(repoID, "RepoID")) | |||
} | |||
index, _ := strconv.ParseInt(keyword, 10, 64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe keyword is a string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it matter?
I didn't notice a difference in behavior.
How would I dynamically add the query if keyword is a string and the parser errors?
To keep the compatible, we need to upgrade indexer version so that all index will be rebuilt. |
How do I do that? Increase |
Yes |
7972766
to
5558ab3
Compare
Add issue ID to found issues if it is a string
5558ab3
to
95f5017
Compare
I increased the |
Why did you close this? |
Because this is taking too long |
consider that maintainers maintain this project in there free time, so yes it can take long - sometimes ~2years++ for big features. |
so in your case it just fall out of the "manual merge queue" i guess |
|
Hey,
first of all thanks for creating and maintaining this repo :D
A user of our instance was trying to search for an issue via ID. Currently this does not work.
The alternative we have been using is opening any issue and changing the URL to the desired ID, but this workflow is not good for non technical users. (i.e.
/go-gitea/gitea/issues/17927
-> replace 17927 with whatever ticket ID I want to search)I came up with this simple solution, but I am not sure if it is good enough.
For example, it does not allow searching for issues starting with the keyword (search "1" and find issue 12 and 13)
Please let me know about your opinion and an alternative implementation :)
issue
#3
is found although neither title nor content contains a3