-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Issue search support elasticsearch #9428
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9428 +/- ##
==========================================
+ Coverage 42.36% 43.67% +1.31%
==========================================
Files 619 577 -42
Lines 81003 79869 -1134
==========================================
+ Hits 34313 34885 +572
+ Misses 42482 40676 -1806
- Partials 4208 4308 +100
Continue to review full report at Codecov.
|
09b7458
to
c23ffc6
Compare
c23ffc6
to
580e2cb
Compare
Partilly fix #6648 |
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.
for my understanding it works
I think your rebase broke something ... |
565f0ea
to
d31ba64
Compare
@6543 fixed. :) |
d31ba64
to
51a65a2
Compare
"mappings": { | ||
"properties": { | ||
"id": { | ||
"type": "integer", |
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.
Is this compatible with int64?
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.
I think yes.
if len(repoIDs) > 0 { | ||
var repoStrs = make([]interface{}, 0, len(repoIDs)) | ||
for _, repoID := range repoIDs { | ||
repoStrs = append(repoStrs, repoID) |
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.
Is this intended to be a string, or just []interface{}?
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.
Because NewTermsQuery
needs a slice of interface as parameters.
@@ -310,6 +323,7 @@ func DeleteRepoIssueIndexer(repo *models.Repository) { | |||
} | |||
|
|||
// SearchIssuesByKeyword search issue ids by keywords and repo id | |||
// WARNNING: You have to ensure user have permission to visit repoIDs' issues |
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.
This messes up with our paging, but I don't see much way around it.
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.
Yes. I left it for future PR.
d965f11
to
e41403b
Compare
make L-G-T-M work. |
Replace #6150
This PR introduce a new issue indexer type - elasticsearch.
It will connect to an elasticsearch server or cluster to store issue indexer and search by keyword.
This will have better performance than
db
orbleve
on a bigger gitea instance.Especially there are serval gitea instances to share indexer.
This PR also added a test for elastic search issue indexer.