mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-16 18:35:07 +02:00
Elasticsearch indexer support for searching issues with any assignee
This commit is contained in:
parent
f350f1d852
commit
f7faab1ac4
@ -209,7 +209,11 @@ func (b *Indexer) Search(ctx context.Context, options *internal.SearchOptions) (
|
|||||||
query.Must(elastic.NewTermQuery("poster_id", options.PosterID.Value()))
|
query.Must(elastic.NewTermQuery("poster_id", options.PosterID.Value()))
|
||||||
}
|
}
|
||||||
|
|
||||||
if options.AssigneeID.Has() {
|
if options.AnyAssigneeOnly {
|
||||||
|
q := elastic.NewRangeQuery("assignee_id")
|
||||||
|
q.Gte(1)
|
||||||
|
query.Must(q)
|
||||||
|
} else if options.AssigneeID.Has() {
|
||||||
query.Must(elastic.NewTermQuery("assignee_id", options.AssigneeID.Value()))
|
query.Must(elastic.NewTermQuery("assignee_id", options.AssigneeID.Value()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user