Skip to content

Commit

Permalink
Merge #520
Browse files Browse the repository at this point in the history
520: Changes related to the next Meilisearch release (v1.7.0) r=curquiza a=meili-bot

Related to this issue: meilisearch/integration-guides#296

This PR:
- gathers the changes related to the next Meilisearch release (v1.7.0) so that this package is ready when the official release is out.
- should pass the tests against the [latest pre-release of Meilisearch](https://github.com/meilisearch/meilisearch/releases).
- might eventually contain test failures until the Meilisearch v1.7.0 is out.

⚠️ This PR should NOT be merged until the next release of Meilisearch (v1.7.0) is out.

_This PR is auto-generated for the [pre-release week](https://github.com/meilisearch/integration-guides/blob/main/resources/pre-release-week.md) purpose._


Co-authored-by: meili-bot <74670311+meili-bot@users.noreply.github.com>
Co-authored-by: Clémentine U. - curqui <clementine@meilisearch.com>
Co-authored-by: curquiza <clementine@meilisearch.com>
  • Loading branch information
3 people authored Mar 11, 2024
2 parents d422a55 + c560365 commit 684a47b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 26 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,6 @@ JSON output:
}
```

You can enable it by querying PATCH /experimental-features with { "scoreDetails": true }

This feature is only available with Meilisearch v1.3 and newer (optional).

#### Custom Search With attributes on at search time <!-- omit in toc -->
Expand Down
21 changes: 1 addition & 20 deletions spec/meilisearch/index/search/show_ranking_score_details_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,12 @@
RSpec.describe 'MeiliSearch::Index - Search with ranking score details' do
include_context 'search books with genre'

it 'experimental feature scoreDetails is not enabled so an error is raised' do
enable_score_details(false)

expect do
index.search('hobbit', { show_ranking_score_details: true })
end.to raise_error(MeiliSearch::ApiError)
end

it 'shows the ranking score details when showRankingScoreDetails is true' do
enable_score_details(true)

it 'shows the ranking score details' do
response = index.search('hobbit', { show_ranking_score_details: true })
expect(response['hits'][0]).to have_key('_rankingScoreDetails')
end

it 'hides the ranking score details when showRankingScoreDetails is false' do
enable_score_details(false)

response = index.search('hobbit', { show_ranking_score_details: false })
expect(response['hits'][0]).not_to have_key('_rankingScoreDetails')
end

it 'hides the ranking score details when showRankingScoreDetails is not set' do
enable_score_details(false)

response = index.search('hobbit')
expect(response['hits'][0]).not_to have_key('_rankingScoreDetails')
end
Expand Down
4 changes: 0 additions & 4 deletions spec/support/experimental_feature_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
require 'json'

module ExperimentalFeatureHelpers
def enable_score_details(toggle)
configure_feature('scoreDetails', toggle)
end

def enable_vector_store(toggle)
configure_feature('vectorStore', toggle)
end
Expand Down

0 comments on commit 684a47b

Please sign in to comment.