Skip to content

Replace IP address by localhost in code samples #512

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

Merged
merged 2 commits into from
Aug 9, 2022
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
26 changes: 16 additions & 10 deletions .code-samples.meilisearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ update_displayed_attributes_1: |-
])
reset_displayed_attributes_1: |-
client.index('movies').reset_displayed_attributes()
getting_started_typo_tolerance: |-
client.index('movies').update_typo_tolerance({
'minWordSizeForTypos': {
'oneTypo': 4
}
})
get_typo_tolerance_1:
client.index('books').get_typo_tolerance()
update_typo_tolerance_1: |-
Expand Down Expand Up @@ -377,7 +383,7 @@ add_movies_json_1: |-
movies = json.load(json_file)
client.index('movies').add_documents(movies)
landing_getting_started_1: |-
client = meilisearch.Client('http://127.0.0.1:7700', 'masterKey')
client = meilisearch.Client('http://localhost:7700', 'masterKey')
client.index('movies').add_documents([
{ 'id': 1, 'title': 'Carol' },
Expand All @@ -403,7 +409,7 @@ getting_started_add_documents_md: |-
import meilisearch
import json
client = meilisearch.Client('http://127.0.0.1:7700')
client = meilisearch.Client('http://localhost:7700')
json_file = open('movies.json')
movies = json.load(json_file)
Expand Down Expand Up @@ -480,7 +486,7 @@ getting_started_configure_settings: |-
]
})
getting_started_communicating_with_a_protected_instance: |-
client = Client('http://127.0.0.1:7700', 'apiKey')
client = Client('http://localhost:7700', 'apiKey')
client.index('movies').search()
faceted_search_update_settings_1: |-
client.index('movies').update_filterable_attributes([
Expand Down Expand Up @@ -566,29 +572,29 @@ primary_field_guide_add_document_primary_key: |-
'price': 5.00
}], 'reference_number')
security_guide_search_key_1: |-
client = Client('http://127.0.0.1:7700', 'apiKey')
client = Client('http://localhost:7700', 'apiKey')
client.index('patient_medical_records').search()
security_guide_update_key_1: |-
client = Client('http://127.0.0.1:7700', 'masterKey')
client = Client('http://localhost:7700', 'masterKey')
client.update_key(key_or_uid='74c9c733-3368-4738-bbe5-1d18a5fecb37', options={
'description': 'Default Search API Key'
})
security_guide_create_key_1: |-
client = Client('http://127.0.0.1:7700', 'masterKey')
client = Client('http://localhost:7700', 'masterKey')
client.create_key(options={
'description': 'Search patient records key',
'actions': ['search'],
'indexes': ['patient_medical_records'],
'expiresAt': '2023-01-01T00:00:00Z'
})
security_guide_list_keys_1: |-
client = Client('http://127.0.0.1:7700', 'masterKey')
client = Client('http://localhost:7700', 'masterKey')
client.get_keys()
security_guide_delete_key_1: |-
client = Client('http://127.0.0.1:7700', 'masterKey')
client = Client('http://localhost:7700', 'masterKey')
client.delete_key('ac5cd97d-5a4b-4226-a868-2d0eb6d197ab')
authorization_header_1: |-
client = Client('http://127.0.0.1:7700', 'masterKey')
client = Client('http://localhost:7700', 'masterKey')
client.get_keys()
tenant_token_guide_generate_sdk_1: |-
uid = '85c3c2f9-bdd6-41f1-abd8-11fcf80e0f76';
Expand All @@ -601,7 +607,7 @@ tenant_token_guide_generate_sdk_1: |-
}
token = client.generate_tenant_token(api_key_uid=uid, search_rules=search_rules, api_key=api_key, expires_at=expires_at)
tenant_token_guide_search_sdk_1: |-
front_end_client = Client('http://127.0.0.1:7700', token)
front_end_client = Client('http://localhost:7700', token)
front_end_client.index('patient_medical_records').search('blood test')
get_all_tasks_filtering_1: |-
client.index.('movies').get_tasks()
Expand Down