We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3234ff6 + db88115 commit 146a16aCopy full SHA for 146a16a
spec/meilisearch/index/search/matching_strategy_spec.rb
@@ -0,0 +1,17 @@
1
+# frozen_string_literal: true
2
+
3
+RSpec.describe 'MeiliSearch::Index - Search with matching_strategy' do
4
+ include_context 'search books with nested fields'
5
6
+ it 'does a custom search with a matching strategy ALL' do
7
+ response = index.search('another french book', matching_strategy: 'all')
8
9
+ expect(response['hits'].count).to eq(1)
10
+ end
11
12
+ it 'does a custom search with a matching strategy LAST' do
13
+ response = index.search('french book', matching_strategy: 'last')
14
15
+ expect(response['hits'].count).to eq(2)
16
17
+end
0 commit comments