Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes related to the next Meilisearch release (v1.13) #598

Merged
merged 5 commits into from
Feb 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .code-samples.meilisearch.yaml
Original file line number Diff line number Diff line change
@@ -67,7 +67,7 @@ search_parameter_guide_hitsperpage_1: |-
search_parameter_guide_page_1: |-
client.index('movies').search('', page: 2)
getting_started_typo_tolerance: |-
client.index('movies').update_typo_tolerance({ min_word_size_for_typos: { one_typo: 4 } })
client.index('movies').update_typo_tolerance({ min_word_size_for_typos: { one_typo: 4 } })
get_all_tasks_paginating_1: |-
client.tasks(limit: 2, from: 10)
get_all_tasks_paginating_2: |-
@@ -672,15 +672,15 @@ search_parameter_reference_ranking_score_threshold_1: |-
rankingScoreThreshold: 0.2
})
search_parameter_reference_locales_1: |-
client.index('INDEX_NAME').search('進撃の巨人', { locales: ['jpn'] })
client.index('INDEX_NAME').search('進撃の巨人', { locales: ['jpn'] })
get_localized_attribute_settings_1: |-
client.index('INDEX_NAME').localized_attributes
client.index('INDEX_NAME').localized_attributes
update_localized_attribute_settings_1: |-
client.index('INDEX_NAME').update_localized_attributes([
{ attribute_patterns: ['*_ja'], locales: ['jpn'] },
])
client.index('INDEX_NAME').update_localized_attributes([
{ attribute_patterns: ['*_ja'], locales: ['jpn'] },
])
reset_localized_attribute_settings_1: |-
client.index('INDEX_NAME').reset_localized_attributes
client.index('INDEX_NAME').reset_localized_attributes
search_parameter_reference_distinct_1: |-
client.index('INDEX_NAME').search('QUERY TERMS', {
distinct: 'ATTRIBUTE_A'
@@ -695,7 +695,7 @@ update_embedders_1: |-
client.index('INDEX_NAME').update_embedders(
default: {
source: 'openAi',
api_key: 'anOpenAiApiKey',
api_key: 'OPEN_AI_API_KEY',
model: 'text-embedding-3-small',
document_template: "A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}"
}
1 change: 0 additions & 1 deletion spec/meilisearch/index/documents_spec.rb
Original file line number Diff line number Diff line change
@@ -95,7 +95,6 @@
end

it 'allows the user to store vectors' do
enable_vector_store(true)
new_doc = { objectId: 123, _vectors: { default: [0.1, 0.2, 0.3] } }
client.create_index('vector_test').await
new_index = client.index('vector_test')
2 changes: 0 additions & 2 deletions spec/meilisearch/index/search/similar_spec.rb
Original file line number Diff line number Diff line change
@@ -12,8 +12,6 @@
end

it 'does a search for similar documents' do
enable_vector_store(true)

documents = [
{
title: 'Shazam!',
2 changes: 0 additions & 2 deletions spec/meilisearch/index/search/vector_search_spec.rb
Original file line number Diff line number Diff line change
@@ -2,8 +2,6 @@

RSpec.describe 'Meilisearch::Index - Vector search' do
it 'does a basic search' do
enable_vector_store(true)

documents = [
{ objectId: 0, _vectors: { custom: [0, 0.8, -0.2] }, title: 'Across The Universe' },
{ objectId: 1, _vectors: { custom: [1, -0.2, 0] }, title: 'All Things Must Pass' },
3 changes: 1 addition & 2 deletions spec/meilisearch/index/settings_spec.rb
Original file line number Diff line number Diff line change
@@ -850,10 +850,9 @@

context 'on embedders' do
let(:index) { client.index(uid) }
let(:default_embedders) { nil }
let(:default_embedders) { {} }

before { client.create_index(uid).await }
before { enable_vector_store(true) }

it '#embedders gets default value' do
expect(index.embedders).to eq(default_embedders)
4 changes: 0 additions & 4 deletions spec/support/experimental_feature_helpers.rb
Original file line number Diff line number Diff line change
@@ -4,10 +4,6 @@
require 'json'

module ExperimentalFeatureHelpers
def enable_vector_store(toggle)
configure_feature('vectorStore', toggle)
end

def enable_edit_documents_by_function(toggle)
configure_feature('editDocumentsByFunction', toggle)
end