Fix unit test

This commit is contained in:
Tyrone Yeh 2025-07-24 14:22:22 +08:00
parent 93e159fdfa
commit f27ca985f2
No known key found for this signature in database
GPG Key ID: AC8B5AA00375E170
3 changed files with 4 additions and 4 deletions

View File

@ -83,7 +83,7 @@ func generateIssueIndexMapping() (mapping.IndexMapping, error) {
docMapping.AddFieldMappingsAt("label_ids", numberFieldMapping)
docMapping.AddFieldMappingsAt("no_label", boolFieldMapping)
docMapping.AddFieldMappingsAt("milestone_id", numberFieldMapping)
docMapping.AddFieldMappingsAt("project_ids", numberFieldMapping)
docMapping.AddFieldMappingsAt("project_id", numberFieldMapping)
docMapping.AddFieldMappingsAt("project_board_id", numberFieldMapping)
docMapping.AddFieldMappingsAt("poster_id", numberFieldMapping)
docMapping.AddFieldMappingsAt("assignee_id", numberFieldMapping)

View File

@ -68,7 +68,7 @@ const (
"label_ids": { "type": "integer", "index": true },
"no_label": { "type": "boolean", "index": true },
"milestone_id": { "type": "integer", "index": true },
"project_ids": { "type": "integer", "index": true },
"project_id": { "type": "integer", "index": true },
"project_board_id": { "type": "integer", "index": true },
"poster_id": { "type": "integer", "index": true },
"assignee_id": { "type": "integer", "index": true },
@ -205,7 +205,7 @@ func (b *Indexer) Search(ctx context.Context, options *internal.SearchOptions) (
}
if len(options.ProjectIDs) > 0 {
query.Must(elastic.NewTermsQuery("project_ids", toAnySlice(options.ProjectIDs)...))
query.Must(elastic.NewTermsQuery("project_id", toAnySlice(options.ProjectIDs)...))
}
if options.ProjectColumnID.Has() {
query.Must(elastic.NewTermQuery("project_board_id", options.ProjectColumnID.Value()))

View File

@ -70,7 +70,7 @@ func NewIndexer(url, apiKey, indexerName string) *Indexer {
"label_ids",
"no_label",
"milestone_id",
"project_ids",
"project_id",
"project_board_id",
"poster_id",
"assignee_id",