@@ -553,6 +553,8 @@ geosearch_guide_sort_usage_2: |-
553
553
client.index('restaurants').search('', {
554
554
'sort': ['_geoPoint(48.8561446,2.2978204):asc', 'rating:desc']
555
555
})
556
+ primary_field_guide_update_document_primary_key : |-
557
+ client.index('books').update(primary_key='title')
556
558
primary_field_guide_create_index_primary_key : |-
557
559
client.create_index('books', {'primaryKey': 'reference_number'})
558
560
primary_field_guide_add_document_primary_key : |-
@@ -600,55 +602,3 @@ tenant_token_guide_generate_sdk_1: |-
600
602
tenant_token_guide_search_sdk_1 : |-
601
603
front_end_client = Client('http://127.0.0.1:7700', token)
602
604
front_end_client.index('patient_medical_records').search('blood test')
603
- updating_guide_check_version : |-
604
- client = Client('http://127.0.0.1:7700', 'apiKey')
605
- client.get_version()
606
- updating_guide_get_displayed_attributes_new : |-
607
- # whenever you see {index_uid}, replace it with your index's unique id
608
- client = Client('http://127.0.0.1:7700', 'apiKey')
609
- client.index({index_uid}).get_displayed_attributes()
610
- updating_guide_get_displayed_attributes_old : |-
611
- # whenever you see {index_uid}, replace it with your index's unique id
612
- client = Client('http://127.0.0.1:7700', 'apiKey')
613
- client.index({index_uid}).get_displayed_attributes()
614
- updating_guide_reset_displayed_attributes_new : |-
615
- client = Client('http://127.0.0.1:7700', 'apiKey')
616
- client.index({index_uid}).reset_displayed_attributes()
617
- updating_guide_reset_displayed_attributes_old : |-
618
- client = Client('http://127.0.0.1:7700', 'apiKey')
619
- client.index({index_uid}).reset_displayed_attributes()
620
- updating_guide_create_dump : |-
621
- client = Client('http://127.0.0.1:7700', 'apiKey')
622
- client.create_dump()
623
- updating_guide_get_dump_status : |-
624
- # replace {dump_uid} with the uid returned by the previous command
625
- client = Client('http://127.0.0.1:7700', 'apiKey')
626
- client.get_dump_status({dump_uid})
627
- updating_guide_get_settings : |-
628
- import json
629
-
630
- client = Client('http://127.0.0.1:7700', 'apiKey')
631
- settings = client.index({index_uid}).get_settings()
632
- with open('mysettings.json', 'w') as json_file:
633
- json.dump(settings, json_file)
634
- updating_guide_retrieve_documents : |-
635
- import json
636
-
637
- client = Client('http://127.0.0.1:7700', 'apiKey')
638
- documents = client.index({index_uid}).get_documents()
639
- with open('mydocuments.json', 'w') as json_file:
640
- json.dump(documents, json_file)
641
- updating_guide_update_settings : |-
642
- # update your settings
643
- import json
644
-
645
- json_file = open('mysettings.json')
646
- settings = json.load(json_file)
647
- client.index({index_uid}).update_settings(settings)
648
- updating_guide_add_documents : |-
649
- # then, add your documents
650
- import json
651
-
652
- json_file = open('mydocuments.json')
653
- documents = json.load(json_file)
654
- client.index({index_uid}).add_documents(documents)
0 commit comments