Fix search unlisted gists (#319)

This commit is contained in:
Thomas Miceli 2024-09-07 14:36:16 +02:00 committed by GitHub
parent f881e1c13c
commit 0950c9ce38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -98,7 +98,6 @@ func SearchGists(queryStr string, queryMetadata SearchGistMetadata, gistsIds []u
indexerQuery = contentQuery indexerQuery = contentQuery
} }
if len(gistsIds) > 0 {
repoQueries := make([]query.Query, 0, len(gistsIds)) repoQueries := make([]query.Query, 0, len(gistsIds))
truee := true truee := true
@ -110,7 +109,6 @@ func SearchGists(queryStr string, queryMetadata SearchGistMetadata, gistsIds []u
} }
indexerQuery = bleve.NewConjunctionQuery(bleve.NewDisjunctionQuery(repoQueries...), indexerQuery) indexerQuery = bleve.NewConjunctionQuery(bleve.NewDisjunctionQuery(repoQueries...), indexerQuery)
}
addQuery := func(field, value string) { addQuery := func(field, value string) {
if value != "" && value != "." { if value != "" && value != "." {