@@ -272,7 +272,8 @@ getting_started_typo_tolerance: |-
272272 typoTolerance.setMinWordSizeForTypos(minWordSizeTypos);
273273
274274 client.index("movies").updateTypoToleranceSettings(typoTolerance);
275- get_typo_tolerance_1 : client.index("books").getTypoToleranceSettings();
275+ get_typo_tolerance_1 :
276+ client.index("books").getTypoToleranceSettings();
276277update_typo_tolerance_1 : |-
277278 TypoTolerance typoTolerance = new TypoTolerance();
278279 HashMap<String, Integer> minWordSizeTypos =
@@ -468,10 +469,6 @@ typo_tolerance_guide_4: |-
468469 };
469470 typoTolerance.setMinWordSizeForTypos(minWordSizeTypos);
470471 client.index("movies").updateTypoToleranceSettings(typoTolerance);
471- typo_tolerance_guide_5 : |-
472- TypoTolerance typoTolerance = new TypoTolerance();
473- typoTolerance.setDisableOnNumbers(true);
474- client.index("movies").updateTypoToleranceSettings(typoTolerance);
475472getting_started_add_documents : |-
476473 // For Maven:
477474 // Add the following code to the `<dependencies>` section of your project:
@@ -502,88 +499,6 @@ getting_started_check_task_status: |-
502499 client.getTask(0);
503500getting_started_search : |-
504501 client.index("movies").search("botman");
505- getting_started_add_meteorites : |-
506- import com.meilisearch.sdk;
507- import org.json.JSONArray;
508- import java.nio.file.Files;
509- import java.nio.file.Path;
510-
511- Path fileName = Path.of("meteorites.json");
512- String meteoritesJson = Files.readString(fileName);
513- Client client = new Client(new Config("http://localhost:7700", "masterKey"));
514-
515- client.index("meteorites").addDocuments(meteoritesJson);
516- getting_started_update_ranking_rules : |-
517- Settings settings = new Settings();
518- settings.setRankingRules(new String[]
519- {
520- "exactness",
521- "words",
522- "typo",
523- "proximity",
524- "attribute",
525- "sort",
526- "release_date:asc",
527- "rank:desc"
528- });
529- client.index("movies").updateSettings(settings);
530- getting_started_update_displayed_attributes : |-
531- Settings settings = new Settings();
532- settings.setDisplayedAttributes(new String[]
533- {
534- "title",
535- "overview",
536- "poster"
537- });
538- client.index("movies").updateSettings(settings);
539- getting_started_update_searchable_attributes : |-
540- Settings settings = new Settings();
541- settings.setSearchableAttributes(new String[]
542- {
543- "title"
544- });
545- getting_started_update_stop_words : |-
546- Settings settings = new Settings();
547- settings.setStopWords(new String[]
548- {
549- "the"
550- });
551- client.index("movies").updateSettings(settings);
552- getting_started_synonyms : |-
553- Settings settings = new Settings();
554- HashMap<String, String[]> synonyms = new HashMap<String, String[]>();
555- synonyms.put("winnie", new String[] {"piglet"});
556- synonyms.put("piglet", new String[] {"winnie"});
557- settings.setSynonyms(synonyms);
558- client.index("movies").updateSettings(settings);
559- getting_started_filtering : |-
560- SearchRequest searchRequest = SearchRequest.builder().q("").filter(new String[] {"mass < 200"}).build();
561- client.index("meteorites").search(searchRequest);
562- getting_started_geo_radius : |-
563- SearchRequest searchRequest = SearchRequest.builder().q("").filter(new String[] {"_geoRadius(46.9480, 7.4474, 210000)"}).build();
564- client.index("meteorites").search(searchRequest);
565- getting_started_geo_point : |-
566- SearchRequest searchRequest = SearchRequest.builder().q("").sort(new String[] {"_geoPoint(48.8583701,2.2922926):asc"}).build();
567- client.index("meteorites").search(searchRequest);
568- getting_started_sorting : |-
569- SearchRequest searchRequest = SearchRequest.builder().q("").filter(new String[] {"mass < 200"}).sort(new String[] {"mass:asc"}).build();
570- client.index("meteorites").search(searchRequest);
571- getting_started_configure_settings : |-
572- Settings settings = new Settings();
573- settings.setFilterableAttributes(new String[] { "mass", "_geo" });
574- settings.setSortableAttributes(new String[] {"mass", "_geo"});
575- client.index("meteorites").updateSettings(settings);
576- getting_started_faceting : |-
577- Faceting newFaceting = new Faceting();
578- newFaceting.setMaxValuesPerFacet(2);
579- HashMap<String, FacetSortValue> facetSortValues = new HashMap<>();
580- facetSortValues.put("*", FacetSortValue.COUNT);
581- newFaceting.setSortFacetValuesBy(facetSortValues);
582- client.index("movies").updateFacetingSettings(newFaceting);
583- getting_started_pagination : |-
584- Pagination newPagination = new Pagination();
585- newPagination.setMaxTotalHits(500);
586- client.index("movies").updatePaginationSettings(newPagination);
587502filtering_update_settings_1 : |-
588503 client.index("movies").updateFilterableAttributesSettings(new String[]
589504 {
@@ -629,18 +544,6 @@ add_movies_json_1: |-
629544 Client client = new Client(new Config("http://localhost:7700", "masterKey"));
630545 Index index = client.index("movies");
631546 index.addDocuments(moviesJson);
632- landing_getting_started_1 : |-
633- Client client = new Client(new Config("http://localhost:7700", "masterKey"));
634-
635- client.index("movies").addDocuments("["
636- + "{\"id\": 1, \"title\": \"Carol\"},"
637- + "{\"id\": 2, \"title\": \"Wonder Woman\"},"
638- + "{\"id\": 3, \"title\": \"Life of Pi\"},"
639- + "{\"id\": 4, \"title\": \"Mad Max: Fury Road\"},"
640- + "{\"id\": 5, \"title\": \"Moana\"},"
641- + "{\"id\": 6, \"title\": \"Philadelphia\"}"
642- + "]"
643- );
644547post_dump_1 : |-
645548 client.createDump();
646549create_snapshot_1 : |-
@@ -730,32 +633,6 @@ primary_field_guide_add_document_primary_key: |-
730633 + "\"price\": 5.00"
731634 + "}]"
732635 , "reference_number");
733- security_guide_search_key_1 : |-
734- Client client = new Client(new Config("http://localhost:7700", "apiKey"));
735- client.index("patient_medical_records").search();
736- security_guide_update_key_1 : |-
737- Client client = new Client(new Config("http://localhost:7700", "masterKey"));
738- client.updateKey("74c9c733-3368-4738-bbe5-1d18a5fecb37", new KeyUpdate().setDescription("Default Search API Key"));
739- security_guide_create_key_1 : |-
740- Client client = new Client(new Config("http://localhost:7700", "masterKey"));
741-
742- SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
743- Date dateParsed = format.parse("2023-01-01T00:00:00Z");
744-
745- Key keyInfo = new Key();
746-
747- keyInfo.setDescription("Search patient records key");
748- keyInfo.setActions(new String[] {"search"});
749- keyInfo.setIndexes(new String[] {"patient_medical_records"});
750- keyInfo.setExpiresAt(dateParsed);
751-
752- client.createKey(keyInfo);
753- security_guide_list_keys_1 : |-
754- Client client = new Client(new Config("http://localhost:7700", "masterKey"));
755- client.getKeys();
756- security_guide_delete_key_1 : |-
757- Client client = new Client(new Config("http://localhost:7700", "masterKey"));
758- client.deleteKey("c5cd97d-5a4b-4226-a868-2d0eb6d197ab");
759636authorization_header_1 : |-
760637 Client client = new Client(new Config("http://localhost:7700", "masterKey"));
761638 client.getKeys();
@@ -798,35 +675,17 @@ date_guide_sortable_attributes_1: |-
798675date_guide_sort_1 : |-
799676 SearchRequest searchRequest = SearchRequest.builder().q("").sort(new String[] {"release_timestamp:desc"}).build();
800677 client.index("games").search(searchRequest);
801- async_guide_filter_by_date_1 : |-
802- SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
803- Date date = format.parse("2020-10-11T11:49:53.000Z");
804- TasksQuery query = new TasksQuery().setBeforeEnqueuedAt(date);
805-
806- client.getTasks(query);
807678async_guide_multiple_filters_1 : |-
808679 TasksQuery query =
809680 new TasksQuery()
810681 .setStatuses(new String[] {"processing"})
811682 .setTypes(new String[] {"documentAdditionOrUpdate", "documentDeletion"})
812683 .setIndexUids(new String[] {"movies"});
813684
814- client.getTasks(query);
815- async_guide_filter_by_ids_1 : |-
816- TasksQuery query = new TasksQuery().setUids(new int[] {5, 10, 13});
817685 client.getTasks(query);
818686async_guide_filter_by_statuses_1 : |-
819687 TasksQuery query = new TasksQuery().setStatuses(new String[] {"failed", "canceled"});
820688 client.getTasks(query);
821- async_guide_filter_by_types_1 : |-
822- TasksQuery query = new TasksQuery().setTypes(new String[] {"dumpCreation", "indexSwap"});
823- client.getTasks(query);
824- async_guide_filter_by_index_uids_1 : |-
825- TasksQuery query = new TasksQuery().setIndexUids(new String[] {"movies"});
826- client.getTasks(query);
827- async_guide_canceled_by_1 : |-
828- TasksQuery query = new TasksQuery().setCanceledBy(new int[] {9, 15});
829- client.getTasks(query);
830689multi_search_1 : |-
831690 MultiSearchRequest multiSearchRequest = new MultiSearchRequest();
832691 multiIndexSearch.addQuery(new IndexSearchRequest("movies").setQuery("pooh").setLimit(5));
0 commit comments