@@ -18,7 +18,7 @@ import (
1818)
1919
2020const (
21- issueIndexerLatestVersion = 1
21+ issueIndexerLatestVersion = 2
2222 // multi-match-types, currently only 2 types are used
2323 // Reference: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-multi-match-query.html#multi-match-types
2424 esMultiMatchTypeBestFields = "best_fields"
@@ -58,6 +58,7 @@ const (
5858
5959 "is_pull": { "type": "boolean", "index": true },
6060 "is_closed": { "type": "boolean", "index": true },
61+ "is_archived": { "type": "boolean", "index": true },
6162 "label_ids": { "type": "integer", "index": true },
6263 "no_label": { "type": "boolean", "index": true },
6364 "milestone_id": { "type": "integer", "index": true },
@@ -168,6 +169,9 @@ func (b *Indexer) Search(ctx context.Context, options *internal.SearchOptions) (
168169 if options .IsClosed .Has () {
169170 query .Must (elastic .NewTermQuery ("is_closed" , options .IsClosed .Value ()))
170171 }
172+ if options .IsArchived .Has () {
173+ query .Must (elastic .NewTermQuery ("is_archived" , options .IsArchived .Value ()))
174+ }
171175
172176 if options .NoLabelOnly {
173177 query .Must (elastic .NewTermQuery ("no_label" , true ))
0 commit comments