From d2908b27940fdc829a8bff96570972cd628d65a0 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 29 Nov 2023 23:38:04 +0800 Subject: [PATCH] Meilisearch: require all query terms to be matched (#28293) (#28296) Co-authored-by: Brecht Van Lommel --- modules/indexer/issues/meilisearch/meilisearch.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/indexer/issues/meilisearch/meilisearch.go b/modules/indexer/issues/meilisearch/meilisearch.go index 335395f2f671..ab8dcd0af45a 100644 --- a/modules/indexer/issues/meilisearch/meilisearch.go +++ b/modules/indexer/issues/meilisearch/meilisearch.go @@ -211,10 +211,11 @@ func (b *Indexer) Search(ctx context.Context, options *internal.SearchOptions) ( skip, limit := indexer_internal.ParsePaginator(options.Paginator, maxTotalHits) searchRes, err := b.inner.Client.Index(b.inner.VersionedIndexName()).Search(options.Keyword, &meilisearch.SearchRequest{ - Filter: query.Statement(), - Limit: int64(limit), - Offset: int64(skip), - Sort: sortBy, + Filter: query.Statement(), + Limit: int64(limit), + Offset: int64(skip), + Sort: sortBy, + MatchingStrategy: "all", }) if err != nil { return nil, err