OCaml bindings to the Typesense embeddings search API
at main 4620 lines 153 kB view raw
1openapi: 3.0.3 2info: 3 title: Typesense API 4 description: "An open source search engine for building delightful search experiences." 5 version: '30.0' 6 license: 7 name: GPL-3.0 8 url: https://opensource.org/licenses/GPL-3.0 9servers: 10 - url: "{protocol}://{hostname}:{port}" 11 description: Typesense Server 12 variables: 13 protocol: 14 default: http 15 description: The protocol of your Typesense server 16 hostname: 17 default: localhost 18 description: The hostname of your Typesense server 19 port: 20 default: "8108" 21 description: The port of your Typesense server 22externalDocs: 23 description: Find out more about Typsesense 24 url: https://typesense.org 25security: 26 - api_key_header: [] 27tags: 28 - name: collections 29 description: A collection is defined by a schema 30 externalDocs: 31 description: Find out more 32 url: https://typesense.org/api/#create-collection 33 - name: documents 34 description: A document is an individual record to be indexed and belongs to a collection 35 externalDocs: 36 description: Find out more 37 url: https://typesense.org/api/#index-document 38 - name: analytics 39 description: Typesense can aggregate search queries for both analytics purposes and for query suggestions. 40 externalDocs: 41 description: Find out more 42 url: https://typesense.org/docs/28.0/api/analytics-query-suggestions.html 43 - name: keys 44 description: Manage API Keys with fine-grain access control 45 externalDocs: 46 description: Find out more 47 url: https://typesense.org/docs/0.23.0/api/#api-keys 48 - name: debug 49 description: Debugging information 50 - name: operations 51 description: Manage Typesense cluster 52 externalDocs: 53 description: Find out more 54 url: https://typesense.org/docs/28.0/api/cluster-operations.html 55 - name: stopwords 56 description: Manage stopwords sets 57 externalDocs: 58 description: Find out more 59 url: https://typesense.org/docs/28.0/api/stopwords.html 60 - name: presets 61 description: Store and reference search parameters 62 externalDocs: 63 description: Find out more 64 url: https://typesense.org/docs/28.0/api/search.html#presets 65 - name: conversations 66 description: Conversational Search (RAG) 67 externalDocs: 68 description: Find out more 69 url: https://typesense.org/docs/28.0/api/conversational-search-rag.html 70 - name: synonyms 71 description: Manage synonyms 72 externalDocs: 73 description: Find out more 74 url: https://typesense.org/docs/28.0/api/synonyms.html 75 - name: curation_sets 76 description: Manage curation sets 77 - name: stemming 78 description: Manage stemming dictionaries 79 externalDocs: 80 description: Find out more 81 url: https://typesense.org/docs/28.0/api/stemming.html 82 - name: nl_search_models 83 description: Manage NL search models 84 externalDocs: 85 description: Find out more 86 url: https://typesense.org/docs/29.0/api/natural-language-search.html 87 88paths: 89 /collections: 90 get: 91 tags: 92 - collections 93 summary: List all collections 94 description: 95 Returns a summary of all your collections. The collections are 96 returned sorted by creation date, with the most recent collections appearing 97 first. 98 operationId: getCollections 99 parameters: 100 - name: getCollectionsParameters 101 in: query 102 schema: 103 type: object 104 properties: 105 exclude_fields: 106 description: Comma-separated list of fields from the collection to exclude from the response 107 type: string 108 limit: 109 description: > 110 Number of collections to fetch. 111 Default: returns all collections. 112 type: integer 113 offset: 114 description: Identifies the starting point to return collections when paginating. 115 type: integer 116 responses: 117 '200': 118 description: List of all collections 119 content: 120 application/json: 121 schema: 122 type: array 123 x-go-type: "[]*CollectionResponse" 124 items: 125 $ref: "#/components/schemas/CollectionResponse" 126 post: 127 tags: 128 - collections 129 summary: Create a new collection 130 description: 131 When a collection is created, we give it a name and describe the 132 fields that will be indexed from the documents added to the collection. 133 operationId: createCollection 134 requestBody: 135 description: The collection object to be created 136 content: 137 application/json: 138 schema: 139 $ref: "#/components/schemas/CollectionSchema" 140 required: true 141 responses: 142 '201': 143 description: Collection successfully created 144 content: 145 application/json: 146 schema: 147 $ref: "#/components/schemas/CollectionResponse" 148 '400': 149 description: Bad request, see error message for details 150 content: 151 application/json: 152 schema: 153 $ref: "#/components/schemas/ApiResponse" 154 '409': 155 description: Collection already exists 156 content: 157 application/json: 158 schema: 159 $ref: "#/components/schemas/ApiResponse" 160 /collections/{collectionName}: 161 get: 162 tags: 163 - collections 164 summary: Retrieve a single collection 165 description: Retrieve the details of a collection, given its name. 166 operationId: getCollection 167 parameters: 168 - name: collectionName 169 in: path 170 description: The name of the collection to retrieve 171 required: true 172 schema: 173 type: string 174 responses: 175 '200': 176 description: Collection fetched 177 content: 178 application/json: 179 schema: 180 $ref: "#/components/schemas/CollectionResponse" 181 '404': 182 description: Collection not found 183 content: 184 application/json: 185 schema: 186 $ref: "#/components/schemas/ApiResponse" 187 patch: 188 tags: 189 - collections 190 summary: Update a collection 191 description: 192 Update a collection's schema to modify the fields and their types. 193 operationId: updateCollection 194 parameters: 195 - name: collectionName 196 in: path 197 description: The name of the collection to update 198 required: true 199 schema: 200 type: string 201 requestBody: 202 description: The document object with fields to be updated 203 content: 204 application/json: 205 schema: 206 $ref: "#/components/schemas/CollectionUpdateSchema" 207 required: true 208 responses: 209 '200': 210 description: The updated partial collection schema 211 content: 212 application/json: 213 schema: 214 $ref: "#/components/schemas/CollectionUpdateSchema" 215 '400': 216 description: Bad request, see error message for details 217 content: 218 application/json: 219 schema: 220 $ref: "#/components/schemas/ApiResponse" 221 '404': 222 description: The collection was not found 223 content: 224 application/json: 225 schema: 226 $ref: "#/components/schemas/ApiResponse" 227 delete: 228 tags: 229 - collections 230 summary: Delete a collection 231 description: 232 Permanently drops a collection. This action cannot be undone. For 233 large collections, this might have an impact on read latencies. 234 operationId: deleteCollection 235 parameters: 236 - name: collectionName 237 in: path 238 description: The name of the collection to delete 239 required: true 240 schema: 241 type: string 242 responses: 243 '200': 244 description: Collection deleted 245 content: 246 application/json: 247 schema: 248 $ref: "#/components/schemas/CollectionResponse" 249 '404': 250 description: Collection not found 251 content: 252 application/json: 253 schema: 254 $ref: "#/components/schemas/ApiResponse" 255 /collections/{collectionName}/documents: 256 post: 257 tags: 258 - documents 259 summary: Index a document 260 description: 261 A document to be indexed in a given collection must conform to 262 the schema of the collection. 263 operationId: indexDocument 264 parameters: 265 - name: collectionName 266 in: path 267 description: The name of the collection to add the document to 268 required: true 269 schema: 270 type: string 271 - name: action 272 in: query 273 description: Additional action to perform 274 schema: 275 type: string 276 example: upsert 277 $ref: "#/components/schemas/IndexAction" 278 - name: dirty_values 279 in: query 280 description: Dealing with Dirty Data 281 schema: 282 $ref: "#/components/schemas/DirtyValues" 283 requestBody: 284 description: The document object to be indexed 285 content: 286 application/json: 287 schema: 288 type: object 289 description: Can be any key-value pair 290 x-go-type: "interface{}" 291 required: true 292 responses: 293 '201': 294 description: Document successfully created/indexed 295 content: 296 application/json: 297 schema: 298 type: object 299 description: Can be any key-value pair 300 '404': 301 description: Collection not found 302 content: 303 application/json: 304 schema: 305 $ref: "#/components/schemas/ApiResponse" 306 patch: 307 tags: 308 - documents 309 summary: Update documents with conditional query 310 description: 311 The filter_by query parameter is used to filter to specify a condition against which the documents are matched. 312 The request body contains the fields that should be updated for any documents that match the filter condition. 313 This endpoint is only available if the Typesense server is version `0.25.0.rc12` or later. 314 operationId: updateDocuments 315 parameters: 316 - name: collectionName 317 in: path 318 description: The name of the collection to update documents in 319 required: true 320 schema: 321 type: string 322 - name: updateDocumentsParameters 323 in: query 324 schema: 325 type: object 326 properties: 327 filter_by: 328 type: string 329 example: "num_employees:>100 && country: [USA, UK]" 330 responses: 331 '200': 332 description: 333 The response contains a single field, `num_updated`, indicating the number of documents affected. 334 content: 335 application/json: 336 schema: 337 type: object 338 required: 339 - num_updated 340 properties: 341 num_updated: 342 type: integer 343 description: The number of documents that have been updated 344 example: 1 345 '400': 346 description: 'Bad request, see error message for details' 347 content: 348 application/json: 349 schema: 350 $ref: '#/components/schemas/ApiResponse' 351 '404': 352 description: The collection was not found 353 content: 354 application/json: 355 schema: 356 $ref: '#/components/schemas/ApiResponse' 357 requestBody: 358 description: The document fields to be updated 359 content: 360 application/json: 361 schema: 362 type: object 363 description: Can be any key-value pair 364 x-go-type: "interface{}" 365 required: true 366 delete: 367 tags: 368 - documents 369 summary: Delete a bunch of documents 370 description: 371 Delete a bunch of documents that match a specific filter condition. 372 Use the `batch_size` parameter to control the number of documents that 373 should deleted at a time. A larger value will speed up deletions, but will 374 impact performance of other operations running on the server. 375 operationId: deleteDocuments 376 parameters: 377 - name: collectionName 378 in: path 379 description: The name of the collection to delete documents from 380 required: true 381 schema: 382 type: string 383 - name: deleteDocumentsParameters 384 in: query 385 schema: 386 type: object 387 required: 388 - filter_by 389 properties: 390 filter_by: 391 type: string 392 example: "num_employees:>100 && country: [USA, UK]" 393 batch_size: 394 description: 395 Batch size parameter controls the number of documents that should be deleted 396 at a time. A larger value will speed up deletions, but will impact performance 397 of other operations running on the server. 398 type: integer 399 ignore_not_found: 400 type: boolean 401 truncate: 402 description: When true, removes all documents from the collection while preserving the collection and its schema. 403 type: boolean 404 responses: 405 '200': 406 description: Documents successfully deleted 407 content: 408 application/json: 409 schema: 410 type: object 411 required: 412 - num_deleted 413 properties: 414 num_deleted: 415 type: integer 416 '404': 417 description: Collection not found 418 content: 419 application/json: 420 schema: 421 $ref: "#/components/schemas/ApiResponse" 422 /collections/{collectionName}/documents/search: 423 get: 424 tags: 425 - documents 426 summary: Search for documents in a collection 427 description: Search for documents in a collection that match the search criteria. 428 operationId: searchCollection 429 parameters: 430 - name: collectionName 431 in: path 432 description: The name of the collection to search for the document under 433 required: true 434 schema: 435 type: string 436 - name: searchParameters 437 required: true 438 in: query 439 schema: 440 $ref: "#/components/schemas/SearchParameters" 441 responses: 442 '200': 443 description: Search results 444 content: 445 application/json: 446 schema: 447 $ref: "#/components/schemas/SearchResult" 448 '400': 449 description: Bad request, see error message for details 450 content: 451 application/json: 452 schema: 453 $ref: "#/components/schemas/ApiResponse" 454 '404': 455 description: The collection or field was not found 456 content: 457 application/json: 458 schema: 459 $ref: "#/components/schemas/ApiResponse" 460 461 /synonym_sets: 462 get: 463 tags: 464 - synonyms 465 summary: List all synonym sets 466 description: Retrieve all synonym sets 467 operationId: retrieveSynonymSets 468 responses: 469 "200": 470 description: List of all synonym sets 471 content: 472 application/json: 473 schema: 474 type: array 475 items: 476 $ref: "#/components/schemas/SynonymSetSchema" 477 478 /synonym_sets/{synonymSetName}: 479 get: 480 tags: 481 - synonyms 482 summary: Retrieve a synonym set 483 description: Retrieve a specific synonym set by its name 484 operationId: retrieveSynonymSet 485 parameters: 486 - name: synonymSetName 487 in: path 488 description: The name of the synonym set to retrieve 489 required: true 490 schema: 491 type: string 492 responses: 493 "200": 494 description: Synonym set fetched 495 content: 496 application/json: 497 schema: 498 $ref: "#/components/schemas/SynonymSetSchema" 499 "404": 500 description: Synonym set not found 501 content: 502 application/json: 503 schema: 504 $ref: "#/components/schemas/ApiResponse" 505 506 put: 507 tags: 508 - synonyms 509 summary: Create or update a synonym set 510 description: Create or update a synonym set with the given name 511 operationId: upsertSynonymSet 512 parameters: 513 - name: synonymSetName 514 in: path 515 description: The name of the synonym set to create/update 516 required: true 517 schema: 518 type: string 519 requestBody: 520 description: The synonym set to be created/updated 521 content: 522 application/json: 523 schema: 524 $ref: "#/components/schemas/SynonymSetCreateSchema" 525 required: true 526 responses: 527 "200": 528 description: Synonym set successfully created/updated 529 content: 530 application/json: 531 schema: 532 $ref: "#/components/schemas/SynonymSetSchema" 533 "400": 534 description: Bad request, see error message for details 535 content: 536 application/json: 537 schema: 538 $ref: "#/components/schemas/ApiResponse" 539 delete: 540 tags: 541 - synonyms 542 summary: Delete a synonym set 543 description: Delete a specific synonym set by its name 544 operationId: deleteSynonymSet 545 parameters: 546 - name: synonymSetName 547 in: path 548 description: The name of the synonym set to delete 549 required: true 550 schema: 551 type: string 552 responses: 553 "200": 554 description: Synonym set successfully deleted 555 content: 556 application/json: 557 schema: 558 $ref: "#/components/schemas/SynonymSetDeleteSchema" 559 "404": 560 description: Synonym set not found 561 content: 562 application/json: 563 schema: 564 $ref: "#/components/schemas/ApiResponse" 565 566 /synonym_sets/{synonymSetName}/items: 567 get: 568 tags: 569 - synonyms 570 summary: List items in a synonym set 571 description: Retrieve all synonym items in a set 572 operationId: retrieveSynonymSetItems 573 parameters: 574 - name: synonymSetName 575 in: path 576 description: The name of the synonym set to retrieve items for 577 required: true 578 schema: 579 type: string 580 responses: 581 "200": 582 description: List of synonym items 583 content: 584 application/json: 585 schema: 586 type: array 587 items: 588 $ref: "#/components/schemas/SynonymItemSchema" 589 "404": 590 description: Synonym set not found 591 content: 592 application/json: 593 schema: 594 $ref: "#/components/schemas/ApiResponse" 595 596 /synonym_sets/{synonymSetName}/items/{itemId}: 597 get: 598 tags: 599 - synonyms 600 summary: Retrieve a synonym set item 601 description: Retrieve a specific synonym item by its id 602 operationId: retrieveSynonymSetItem 603 parameters: 604 - name: synonymSetName 605 in: path 606 description: The name of the synonym set 607 required: true 608 schema: 609 type: string 610 - name: itemId 611 in: path 612 description: The id of the synonym item to retrieve 613 required: true 614 schema: 615 type: string 616 responses: 617 "200": 618 description: Synonym item fetched 619 content: 620 application/json: 621 schema: 622 $ref: "#/components/schemas/SynonymItemSchema" 623 "404": 624 description: Synonym item not found 625 content: 626 application/json: 627 schema: 628 $ref: "#/components/schemas/ApiResponse" 629 put: 630 tags: 631 - synonyms 632 summary: Create or update a synonym set item 633 description: Create or update a synonym set item with the given id 634 operationId: upsertSynonymSetItem 635 parameters: 636 - name: synonymSetName 637 in: path 638 description: The name of the synonym set 639 required: true 640 schema: 641 type: string 642 - name: itemId 643 in: path 644 description: The id of the synonym item to upsert 645 required: true 646 schema: 647 type: string 648 requestBody: 649 description: The synonym item to be created/updated 650 content: 651 application/json: 652 schema: 653 $ref: "#/components/schemas/SynonymItemUpsertSchema" 654 required: true 655 responses: 656 "200": 657 description: Synonym item successfully created/updated 658 content: 659 application/json: 660 schema: 661 $ref: "#/components/schemas/SynonymItemSchema" 662 "400": 663 description: Bad request, see error message for details 664 content: 665 application/json: 666 schema: 667 $ref: "#/components/schemas/ApiResponse" 668 delete: 669 tags: 670 - synonyms 671 summary: Delete a synonym set item 672 description: Delete a specific synonym item by its id 673 operationId: deleteSynonymSetItem 674 parameters: 675 - name: synonymSetName 676 in: path 677 description: The name of the synonym set 678 required: true 679 schema: 680 type: string 681 - name: itemId 682 in: path 683 description: The id of the synonym item to delete 684 required: true 685 schema: 686 type: string 687 responses: 688 "200": 689 description: Synonym item successfully deleted 690 content: 691 application/json: 692 schema: 693 $ref: "#/components/schemas/SynonymItemDeleteSchema" 694 "404": 695 description: Synonym item not found 696 content: 697 application/json: 698 schema: 699 $ref: "#/components/schemas/ApiResponse" 700 701 /curation_sets: 702 get: 703 tags: 704 - curation_sets 705 summary: List all curation sets 706 description: Retrieve all curation sets 707 operationId: retrieveCurationSets 708 responses: 709 "200": 710 description: List of all curation sets 711 content: 712 application/json: 713 schema: 714 type: array 715 items: 716 $ref: "#/components/schemas/CurationSetSchema" 717 718 /curation_sets/{curationSetName}: 719 get: 720 tags: 721 - curation_sets 722 summary: Retrieve a curation set 723 description: Retrieve a specific curation set by its name 724 operationId: retrieveCurationSet 725 parameters: 726 - name: curationSetName 727 in: path 728 description: The name of the curation set to retrieve 729 required: true 730 schema: 731 type: string 732 responses: 733 "200": 734 description: Curation set fetched 735 content: 736 application/json: 737 schema: 738 $ref: "#/components/schemas/CurationSetSchema" 739 "404": 740 description: Curation set not found 741 content: 742 application/json: 743 schema: 744 $ref: "#/components/schemas/ApiResponse" 745 put: 746 tags: 747 - curation_sets 748 summary: Create or update a curation set 749 description: Create or update a curation set with the given name 750 operationId: upsertCurationSet 751 parameters: 752 - name: curationSetName 753 in: path 754 description: The name of the curation set to create/update 755 required: true 756 schema: 757 type: string 758 requestBody: 759 description: The curation set to be created/updated 760 content: 761 application/json: 762 schema: 763 $ref: "#/components/schemas/CurationSetCreateSchema" 764 required: true 765 responses: 766 "200": 767 description: Curation set successfully created/updated 768 content: 769 application/json: 770 schema: 771 $ref: "#/components/schemas/CurationSetSchema" 772 "400": 773 description: Bad request, see error message for details 774 content: 775 application/json: 776 schema: 777 $ref: "#/components/schemas/ApiResponse" 778 delete: 779 tags: 780 - curation_sets 781 summary: Delete a curation set 782 description: Delete a specific curation set by its name 783 operationId: deleteCurationSet 784 parameters: 785 - name: curationSetName 786 in: path 787 description: The name of the curation set to delete 788 required: true 789 schema: 790 type: string 791 responses: 792 "200": 793 description: Curation set successfully deleted 794 content: 795 application/json: 796 schema: 797 $ref: "#/components/schemas/CurationSetDeleteSchema" 798 "404": 799 description: Curation set not found 800 content: 801 application/json: 802 schema: 803 $ref: "#/components/schemas/ApiResponse" 804 805 /curation_sets/{curationSetName}/items: 806 get: 807 tags: 808 - curation_sets 809 summary: List items in a curation set 810 description: Retrieve all curation items in a set 811 operationId: retrieveCurationSetItems 812 parameters: 813 - name: curationSetName 814 in: path 815 description: The name of the curation set to retrieve items for 816 required: true 817 schema: 818 type: string 819 responses: 820 "200": 821 description: List of curation items 822 content: 823 application/json: 824 schema: 825 type: array 826 items: 827 $ref: "#/components/schemas/CurationItemSchema" 828 "404": 829 description: Curation set not found 830 content: 831 application/json: 832 schema: 833 $ref: "#/components/schemas/ApiResponse" 834 835 /curation_sets/{curationSetName}/items/{itemId}: 836 get: 837 tags: 838 - curation_sets 839 summary: Retrieve a curation set item 840 description: Retrieve a specific curation item by its id 841 operationId: retrieveCurationSetItem 842 parameters: 843 - name: curationSetName 844 in: path 845 description: The name of the curation set 846 required: true 847 schema: 848 type: string 849 - name: itemId 850 in: path 851 description: The id of the curation item to retrieve 852 required: true 853 schema: 854 type: string 855 responses: 856 "200": 857 description: Curation item fetched 858 content: 859 application/json: 860 schema: 861 $ref: "#/components/schemas/CurationItemSchema" 862 "404": 863 description: Curation item not found 864 content: 865 application/json: 866 schema: 867 $ref: "#/components/schemas/ApiResponse" 868 put: 869 tags: 870 - curation_sets 871 summary: Create or update a curation set item 872 description: Create or update a curation set item with the given id 873 operationId: upsertCurationSetItem 874 parameters: 875 - name: curationSetName 876 in: path 877 description: The name of the curation set 878 required: true 879 schema: 880 type: string 881 - name: itemId 882 in: path 883 description: The id of the curation item to upsert 884 required: true 885 schema: 886 type: string 887 requestBody: 888 description: The curation item to be created/updated 889 content: 890 application/json: 891 schema: 892 $ref: "#/components/schemas/CurationItemCreateSchema" 893 required: true 894 responses: 895 "200": 896 description: Curation item successfully created/updated 897 content: 898 application/json: 899 schema: 900 $ref: "#/components/schemas/CurationItemSchema" 901 "400": 902 description: Bad request, see error message for details 903 content: 904 application/json: 905 schema: 906 $ref: "#/components/schemas/ApiResponse" 907 delete: 908 tags: 909 - curation_sets 910 summary: Delete a curation set item 911 description: Delete a specific curation item by its id 912 operationId: deleteCurationSetItem 913 parameters: 914 - name: curationSetName 915 in: path 916 description: The name of the curation set 917 required: true 918 schema: 919 type: string 920 - name: itemId 921 in: path 922 description: The id of the curation item to delete 923 required: true 924 schema: 925 type: string 926 responses: 927 "200": 928 description: Curation item successfully deleted 929 content: 930 application/json: 931 schema: 932 $ref: "#/components/schemas/CurationItemDeleteSchema" 933 "404": 934 description: Curation item not found 935 content: 936 application/json: 937 schema: 938 $ref: "#/components/schemas/ApiResponse" 939 940 /collections/{collectionName}/documents/export: 941 get: 942 tags: 943 - documents 944 summary: Export all documents in a collection 945 description: Export all documents in a collection in JSON lines format. 946 operationId: exportDocuments 947 parameters: 948 - name: collectionName 949 in: path 950 description: The name of the collection 951 required: true 952 schema: 953 type: string 954 - name: exportDocumentsParameters 955 in: query 956 schema: 957 type: object 958 properties: 959 filter_by: 960 description: 961 Filter conditions for refining your search results. Separate 962 multiple conditions with &&. 963 type: string 964 include_fields: 965 description: List of fields from the document to include in the search result 966 type: string 967 exclude_fields: 968 description: List of fields from the document to exclude in the search result 969 type: string 970 971 responses: 972 '200': 973 description: Exports all the documents in a given collection. 974 content: 975 application/octet-stream: 976 schema: 977 type: string 978 example: | 979 {"id": "124", "company_name": "Stark Industries", "num_employees": 5215, "country": "US"} 980 {"id": "125", "company_name": "Future Technology", "num_employees": 1232,"country": "UK"} 981 {"id": "126", "company_name": "Random Corp.", "num_employees": 531,"country": "AU"} 982 '404': 983 description: The collection was not found 984 content: 985 application/json: 986 schema: 987 $ref: "#/components/schemas/ApiResponse" 988 /collections/{collectionName}/documents/import: 989 post: 990 tags: 991 - documents 992 summary: Import documents into a collection 993 description: 994 The documents to be imported must be formatted in a newline delimited 995 JSON structure. You can feed the output file from a Typesense export operation 996 directly as import. 997 operationId: importDocuments 998 parameters: 999 - name: collectionName 1000 in: path 1001 description: The name of the collection 1002 required: true 1003 schema: 1004 type: string 1005 # Do not change the index position of this param 1006 - name: importDocumentsParameters 1007 in: query 1008 schema: 1009 type: object 1010 properties: 1011 batch_size: 1012 type: integer 1013 return_id: 1014 type: boolean 1015 description: 1016 Returning the id of the imported documents. If you want the 1017 import response to return the ingested document's id in the 1018 response, you can use the return_id parameter. 1019 remote_embedding_batch_size: 1020 type: integer 1021 return_doc: 1022 type: boolean 1023 action: 1024 $ref: "#/components/schemas/IndexAction" 1025 dirty_values: 1026 $ref: "#/components/schemas/DirtyValues" 1027 requestBody: 1028 description: The json array of documents or the JSONL file to import 1029 content: 1030 application/octet-stream: 1031 schema: 1032 type: string 1033 description: The JSONL file to import 1034 required: true 1035 responses: 1036 '200': 1037 description: 1038 Result of the import operation. Each line of the response indicates the result 1039 of each document present in the request body (in the same order). If the import 1040 of a single document fails, it does not affect the other documents. 1041 If there is a failure, the response line will include a corresponding error 1042 message and as well as the actual document content. 1043 content: 1044 application/octet-stream: 1045 schema: 1046 type: string 1047 example: | 1048 {"success": true} 1049 {"success": false, "error": "Bad JSON.", "document": "[bad doc"} 1050 '400': 1051 description: Bad request, see error message for details 1052 content: 1053 application/json: 1054 schema: 1055 $ref: "#/components/schemas/ApiResponse" 1056 '404': 1057 description: The collection was not found 1058 content: 1059 application/json: 1060 schema: 1061 $ref: "#/components/schemas/ApiResponse" 1062 /collections/{collectionName}/documents/{documentId}: 1063 get: 1064 tags: 1065 - documents 1066 summary: Retrieve a document 1067 description: Fetch an individual document from a collection by using its ID. 1068 operationId: getDocument 1069 parameters: 1070 - name: collectionName 1071 in: path 1072 description: The name of the collection to search for the document under 1073 required: true 1074 schema: 1075 type: string 1076 - name: documentId 1077 in: path 1078 description: The Document ID 1079 required: true 1080 schema: 1081 type: string 1082 responses: 1083 '200': 1084 description: The document referenced by the ID 1085 content: 1086 application/json: 1087 schema: 1088 type: object 1089 description: Can be any key-value pair 1090 '404': 1091 description: The document or collection was not found 1092 content: 1093 application/json: 1094 schema: 1095 $ref: "#/components/schemas/ApiResponse" 1096 patch: 1097 tags: 1098 - documents 1099 summary: Update a document 1100 description: 1101 Update an individual document from a collection by using its ID. 1102 The update can be partial. 1103 operationId: updateDocument 1104 parameters: 1105 - name: collectionName 1106 in: path 1107 description: The name of the collection to search for the document under 1108 required: true 1109 schema: 1110 type: string 1111 - name: documentId 1112 in: path 1113 description: The Document ID 1114 required: true 1115 schema: 1116 type: string 1117 - name: dirty_values 1118 in: query 1119 description: Dealing with Dirty Data 1120 schema: 1121 $ref: "#/components/schemas/DirtyValues" 1122 requestBody: 1123 description: The document object with fields to be updated 1124 content: 1125 application/json: 1126 schema: 1127 type: object 1128 description: Can be any key-value pair 1129 x-go-type: "interface{}" 1130 required: true 1131 responses: 1132 '200': 1133 description: The document referenced by the ID was updated 1134 content: 1135 application/json: 1136 schema: 1137 type: object 1138 description: Can be any key-value pair 1139 '404': 1140 description: The document or collection was not found 1141 content: 1142 application/json: 1143 schema: 1144 $ref: "#/components/schemas/ApiResponse" 1145 delete: 1146 tags: 1147 - documents 1148 summary: Delete a document 1149 description: Delete an individual document from a collection by using its ID. 1150 operationId: deleteDocument 1151 parameters: 1152 - name: collectionName 1153 in: path 1154 description: The name of the collection to search for the document under 1155 required: true 1156 schema: 1157 type: string 1158 - name: documentId 1159 in: path 1160 description: The Document ID 1161 required: true 1162 schema: 1163 type: string 1164 responses: 1165 '200': 1166 description: The document referenced by the ID was deleted 1167 content: 1168 application/json: 1169 schema: 1170 type: object 1171 description: Can be any key-value pair 1172 '404': 1173 description: The document or collection was not found 1174 content: 1175 application/json: 1176 schema: 1177 $ref: "#/components/schemas/ApiResponse" 1178 /conversations/models: 1179 get: 1180 description: Retrieve all conversation models 1181 operationId: retrieveAllConversationModels 1182 responses: 1183 '200': 1184 content: 1185 application/json: 1186 schema: 1187 items: 1188 $ref: '#/components/schemas/ConversationModelSchema' 1189 type: array 1190 x-go-type: '[]*ConversationModelSchema' 1191 description: List of all conversation models 1192 summary: List all conversation models 1193 tags: 1194 - conversations 1195 post: 1196 summary: Create a conversation model 1197 description: Create a Conversation Model 1198 operationId: createConversationModel 1199 requestBody: 1200 content: 1201 application/json: 1202 schema: 1203 $ref: '#/components/schemas/ConversationModelCreateSchema' 1204 required: true 1205 responses: 1206 '201': 1207 content: 1208 application/json: 1209 schema: 1210 $ref: '#/components/schemas/ConversationModelSchema' 1211 description: Created Conversation Model 1212 '400': 1213 content: 1214 application/json: 1215 schema: 1216 $ref: '#/components/schemas/ApiResponse' 1217 description: Bad request, see error message for details 1218 tags: 1219 - conversations 1220 /conversations/models/{modelId}: 1221 get: 1222 description: Retrieve a conversation model 1223 operationId: retrieveConversationModel 1224 parameters: 1225 - name: modelId 1226 in: path 1227 description: The id of the conversation model to retrieve 1228 required: true 1229 schema: 1230 type: string 1231 responses: 1232 '200': 1233 content: 1234 application/json: 1235 schema: 1236 $ref: '#/components/schemas/ConversationModelSchema' 1237 description: A conversation model 1238 summary: Retrieve a conversation model 1239 tags: 1240 - conversations 1241 put: 1242 description: Update a conversation model 1243 operationId: updateConversationModel 1244 requestBody: 1245 content: 1246 application/json: 1247 schema: 1248 $ref: '#/components/schemas/ConversationModelUpdateSchema' 1249 required: true 1250 parameters: 1251 - name: modelId 1252 in: path 1253 description: The id of the conversation model to update 1254 required: true 1255 schema: 1256 type: string 1257 responses: 1258 '200': 1259 content: 1260 application/json: 1261 schema: 1262 $ref: '#/components/schemas/ConversationModelSchema' 1263 description: The conversation model was successfully updated 1264 summary: Update a conversation model 1265 tags: 1266 - conversations 1267 delete: 1268 description: Delete a conversation model 1269 operationId: deleteConversationModel 1270 parameters: 1271 - name: modelId 1272 in: path 1273 description: The id of the conversation model to delete 1274 required: true 1275 schema: 1276 type: string 1277 responses: 1278 '200': 1279 content: 1280 application/json: 1281 schema: 1282 $ref: '#/components/schemas/ConversationModelSchema' 1283 description: The conversation model was successfully deleted 1284 summary: Delete a conversation model 1285 tags: 1286 - conversations 1287 /keys: 1288 get: 1289 tags: 1290 - keys 1291 summary: Retrieve (metadata about) all keys. 1292 operationId: getKeys 1293 responses: 1294 '200': 1295 description: List of all keys 1296 content: 1297 application/json: 1298 schema: 1299 $ref: "#/components/schemas/ApiKeysResponse" 1300 post: 1301 tags: 1302 - keys 1303 summary: Create an API Key 1304 description: 1305 Create an API Key with fine-grain access control. You can restrict access 1306 on both a per-collection and per-action level. 1307 The generated key is returned only during creation. You want to store 1308 this key carefully in a secure place. 1309 operationId: createKey 1310 requestBody: 1311 description: The object that describes API key scope 1312 content: 1313 application/json: 1314 schema: 1315 $ref: "#/components/schemas/ApiKeySchema" 1316 responses: 1317 '201': 1318 description: Created API key 1319 content: 1320 application/json: 1321 schema: 1322 $ref: "#/components/schemas/ApiKey" 1323 '400': 1324 description: Bad request, see error message for details 1325 content: 1326 application/json: 1327 schema: 1328 $ref: "#/components/schemas/ApiResponse" 1329 '409': 1330 description: API key generation conflict 1331 content: 1332 application/json: 1333 schema: 1334 $ref: "#/components/schemas/ApiResponse" 1335 /keys/{keyId}: 1336 get: 1337 tags: 1338 - keys 1339 summary: Retrieve (metadata about) a key 1340 description: 1341 Retrieve (metadata about) a key. Only the key prefix is returned 1342 when you retrieve a key. Due to security reasons, only the create endpoint 1343 returns the full API key. 1344 operationId: getKey 1345 parameters: 1346 - name: keyId 1347 in: path 1348 description: The ID of the key to retrieve 1349 required: true 1350 schema: 1351 type: integer 1352 format: int64 1353 responses: 1354 '200': 1355 description: The key referenced by the ID 1356 content: 1357 application/json: 1358 schema: 1359 $ref: "#/components/schemas/ApiKey" 1360 '404': 1361 description: The key was not found 1362 content: 1363 application/json: 1364 schema: 1365 $ref: "#/components/schemas/ApiResponse" 1366 delete: 1367 tags: 1368 - keys 1369 summary: Delete an API key given its ID. 1370 operationId: deleteKey 1371 parameters: 1372 - name: keyId 1373 in: path 1374 description: The ID of the key to delete 1375 required: true 1376 schema: 1377 type: integer 1378 format: int64 1379 responses: 1380 '200': 1381 description: The key referenced by the ID 1382 content: 1383 application/json: 1384 schema: 1385 $ref: "#/components/schemas/ApiKeyDeleteResponse" 1386 '400': 1387 description: Bad request, see error message for details 1388 content: 1389 application/json: 1390 schema: 1391 $ref: "#/components/schemas/ApiResponse" 1392 '404': 1393 description: Key not found 1394 content: 1395 application/json: 1396 schema: 1397 $ref: "#/components/schemas/ApiResponse" 1398 /aliases: 1399 get: 1400 tags: 1401 - collections 1402 summary: List all aliases 1403 description: List all aliases and the corresponding collections that they map to. 1404 operationId: getAliases 1405 responses: 1406 '200': 1407 description: List of all collection aliases 1408 content: 1409 application/json: 1410 schema: 1411 $ref: "#/components/schemas/CollectionAliasesResponse" 1412 /aliases/{aliasName}: 1413 put: 1414 tags: 1415 - collections 1416 summary: Create or update a collection alias 1417 description: 1418 Create or update a collection alias. An alias is a virtual collection name that points 1419 to a real collection. If you're familiar with symbolic links on Linux, it's very similar 1420 to that. Aliases are useful when you want to reindex your data in the 1421 background on a new collection and switch your application to it without any changes to 1422 your code. 1423 operationId: upsertAlias 1424 parameters: 1425 - name: aliasName 1426 in: path 1427 description: The name of the alias to create/update 1428 required: true 1429 schema: 1430 type: string 1431 requestBody: 1432 description: Collection alias to be created/updated 1433 content: 1434 application/json: 1435 schema: 1436 $ref: "#/components/schemas/CollectionAliasSchema" 1437 responses: 1438 '200': 1439 description: The collection alias was created/updated 1440 content: 1441 application/json: 1442 schema: 1443 $ref: "#/components/schemas/CollectionAlias" 1444 '400': 1445 description: Bad request, see error message for details 1446 content: 1447 application/json: 1448 schema: 1449 $ref: "#/components/schemas/ApiResponse" 1450 '404': 1451 description: Alias not found 1452 content: 1453 application/json: 1454 schema: 1455 $ref: "#/components/schemas/ApiResponse" 1456 get: 1457 tags: 1458 - collections 1459 summary: Retrieve an alias 1460 description: Find out which collection an alias points to by fetching it 1461 operationId: getAlias 1462 parameters: 1463 - name: aliasName 1464 in: path 1465 description: The name of the alias to retrieve 1466 required: true 1467 schema: 1468 type: string 1469 responses: 1470 '200': 1471 description: Collection alias fetched 1472 content: 1473 application/json: 1474 schema: 1475 $ref: "#/components/schemas/CollectionAlias" 1476 '404': 1477 description: The alias was not found 1478 content: 1479 application/json: 1480 schema: 1481 $ref: "#/components/schemas/ApiResponse" 1482 delete: 1483 tags: 1484 - collections 1485 summary: Delete an alias 1486 operationId: deleteAlias 1487 parameters: 1488 - name: aliasName 1489 in: path 1490 description: The name of the alias to delete 1491 required: true 1492 schema: 1493 type: string 1494 responses: 1495 '200': 1496 description: Collection alias was deleted 1497 content: 1498 application/json: 1499 schema: 1500 $ref: "#/components/schemas/CollectionAlias" 1501 '404': 1502 description: Alias not found 1503 content: 1504 application/json: 1505 schema: 1506 $ref: "#/components/schemas/ApiResponse" 1507 /debug: 1508 get: 1509 tags: 1510 - debug 1511 summary: Print debugging information 1512 description: Print debugging information 1513 operationId: debug 1514 responses: 1515 '200': 1516 description: Debugging information 1517 content: 1518 application/json: 1519 schema: 1520 type: object 1521 properties: 1522 version: 1523 type: string 1524 /health: 1525 get: 1526 tags: 1527 - health 1528 summary: Checks if Typesense server is ready to accept requests. 1529 description: Checks if Typesense server is ready to accept requests. 1530 operationId: health 1531 responses: 1532 '200': 1533 description: Search service is ready for requests. 1534 content: 1535 application/json: 1536 schema: 1537 $ref: "#/components/schemas/HealthStatus" 1538 /operations/schema_changes: 1539 get: 1540 tags: 1541 - operations 1542 summary: Get the status of in-progress schema change operations 1543 description: Returns the status of any ongoing schema change operations. If no schema changes are in progress, returns an empty response. 1544 operationId: getSchemaChanges 1545 responses: 1546 '200': 1547 description: List of schema changes in progress 1548 content: 1549 application/json: 1550 schema: 1551 type: array 1552 items: 1553 $ref: "#/components/schemas/SchemaChangeStatus" 1554 /operations/snapshot: 1555 post: 1556 tags: 1557 - operations 1558 summary: Creates a point-in-time snapshot of a Typesense node's state and data in the specified directory. 1559 description: 1560 Creates a point-in-time snapshot of a Typesense node's state and data in the specified directory. 1561 You can then backup the snapshot directory that gets created and later restore it 1562 as a data directory, as needed. 1563 operationId: takeSnapshot 1564 parameters: 1565 - name: snapshot_path 1566 in: query 1567 description: The directory on the server where the snapshot should be saved. 1568 required: true 1569 schema: 1570 type: string 1571 responses: 1572 '201': 1573 description: Snapshot is created. 1574 content: 1575 application/json: 1576 schema: 1577 $ref: "#/components/schemas/SuccessStatus" 1578 /operations/vote: 1579 post: 1580 tags: 1581 - operations 1582 summary: Triggers a follower node to initiate the raft voting process, which triggers leader re-election. 1583 description: 1584 Triggers a follower node to initiate the raft voting process, which triggers leader re-election. 1585 The follower node that you run this operation against will become the new leader, 1586 once this command succeeds. 1587 operationId: vote 1588 responses: 1589 '200': 1590 description: Re-election is performed. 1591 content: 1592 application/json: 1593 schema: 1594 $ref: "#/components/schemas/SuccessStatus" 1595 /operations/cache/clear: 1596 post: 1597 tags: 1598 - operations 1599 summary: Clear the cached responses of search requests in the LRU cache. 1600 description: 1601 Clear the cached responses of search requests that are sent with `use_cache` parameter in the LRU cache. 1602 operationId: clearCache 1603 responses: 1604 '200': 1605 description: Clear cache succeeded. 1606 content: 1607 application/json: 1608 schema: 1609 $ref: "#/components/schemas/SuccessStatus" 1610 /operations/db/compact: 1611 post: 1612 tags: 1613 - operations 1614 summary: Compacting the on-disk database 1615 description: 1616 Typesense uses RocksDB to store your documents on the disk. If you do frequent writes or updates, you could benefit from running a compaction of the underlying RocksDB database. 1617 This could reduce the size of the database and decrease read latency. While the database will not block during this operation, we recommend running it during off-peak hours. 1618 operationId: compactDb 1619 responses: 1620 '200': 1621 description: Compacting the on-disk database succeeded. 1622 content: 1623 application/json: 1624 schema: 1625 $ref: "#/components/schemas/SuccessStatus" 1626 /config: 1627 post: 1628 tags: 1629 - operations 1630 summary: Toggle Slow Request Log 1631 description: 1632 Enable logging of requests that take over a defined threshold of time. 1633 Default is `-1` which disables slow request logging. 1634 Slow requests are logged to the primary log file, with the prefix SLOW REQUEST. 1635 operationId: toggleSlowRequestLog 1636 requestBody: 1637 content: 1638 application/json: 1639 schema: 1640 type: object 1641 properties: 1642 log-slow-requests-time-ms: 1643 type: integer 1644 required: 1645 - log-slow-requests-time-ms 1646 example: | 1647 {"log-slow-requests-time-ms": 2000} 1648 responses: 1649 '200': 1650 description: Toggle Slow Request Log database succeeded. 1651 content: 1652 application/json: 1653 schema: 1654 $ref: "#/components/schemas/SuccessStatus" 1655 /multi_search: 1656 post: 1657 operationId: multiSearch 1658 tags: 1659 - documents 1660 summary: send multiple search requests in a single HTTP request 1661 description: 1662 This is especially useful to avoid round-trip network latencies incurred otherwise if each of these requests are sent in separate HTTP requests. 1663 You can also use this feature to do a federated search across multiple collections in a single HTTP request. 1664 parameters: 1665 - name: multiSearchParameters 1666 required: true 1667 in: query 1668 schema: 1669 $ref: "#/components/schemas/MultiSearchParameters" 1670 requestBody: 1671 content: 1672 application/json: 1673 schema: 1674 $ref: "#/components/schemas/MultiSearchSearchesParameter" 1675 responses: 1676 '200': 1677 description: Search results 1678 content: 1679 application/json: 1680 schema: 1681 $ref: "#/components/schemas/MultiSearchResult" 1682 '400': 1683 description: Bad request, see error message for details 1684 content: 1685 application/json: 1686 schema: 1687 $ref: "#/components/schemas/ApiResponse" 1688 /analytics/events: 1689 post: 1690 tags: 1691 - analytics 1692 summary: Create an analytics event 1693 description: Submit a single analytics event. The event must correspond to an existing analytics rule by name. 1694 operationId: createAnalyticsEvent 1695 requestBody: 1696 description: The analytics event to be created 1697 content: 1698 application/json: 1699 schema: 1700 $ref: '#/components/schemas/AnalyticsEvent' 1701 required: true 1702 responses: 1703 '200': 1704 description: Analytics event successfully created 1705 content: 1706 application/json: 1707 schema: 1708 $ref: '#/components/schemas/AnalyticsEventCreateResponse' 1709 '400': 1710 description: Bad request, see error message for details 1711 content: 1712 application/json: 1713 schema: 1714 $ref: '#/components/schemas/ApiResponse' 1715 get: 1716 tags: 1717 - analytics 1718 summary: Retrieve analytics events 1719 description: Retrieve the most recent events for a user and rule. 1720 operationId: getAnalyticsEvents 1721 parameters: 1722 - name: user_id 1723 in: query 1724 required: true 1725 schema: 1726 type: string 1727 - name: name 1728 in: query 1729 description: Analytics rule name 1730 required: true 1731 schema: 1732 type: string 1733 - name: n 1734 in: query 1735 description: Number of events to return (max 1000) 1736 required: true 1737 schema: 1738 type: integer 1739 responses: 1740 '200': 1741 description: Events fetched 1742 content: 1743 application/json: 1744 schema: 1745 $ref: '#/components/schemas/AnalyticsEventsResponse' 1746 '400': 1747 description: Bad request, see error message for details 1748 content: 1749 application/json: 1750 schema: 1751 $ref: '#/components/schemas/ApiResponse' 1752 /analytics/flush: 1753 post: 1754 tags: 1755 - analytics 1756 summary: Flush in-memory analytics to disk 1757 description: Triggers a flush of analytics data to persistent storage. 1758 operationId: flushAnalytics 1759 responses: 1760 '200': 1761 description: Flush triggered 1762 content: 1763 application/json: 1764 schema: 1765 $ref: '#/components/schemas/AnalyticsEventCreateResponse' 1766 /analytics/status: 1767 get: 1768 tags: 1769 - analytics 1770 summary: Get analytics subsystem status 1771 description: Returns sizes of internal analytics buffers and queues. 1772 operationId: getAnalyticsStatus 1773 responses: 1774 '200': 1775 description: Status fetched 1776 content: 1777 application/json: 1778 schema: 1779 $ref: '#/components/schemas/AnalyticsStatus' 1780 /analytics/rules: 1781 post: 1782 tags: 1783 - analytics 1784 summary: Create analytics rule(s) 1785 description: Create one or more analytics rules. You can send a single rule object or an array of rule objects. 1786 operationId: createAnalyticsRule 1787 requestBody: 1788 description: The analytics rule(s) to be created 1789 content: 1790 application/json: 1791 schema: 1792 oneOf: 1793 - $ref: "#/components/schemas/AnalyticsRuleCreate" 1794 - type: array 1795 items: 1796 $ref: "#/components/schemas/AnalyticsRuleCreate" 1797 required: true 1798 responses: 1799 '200': 1800 description: Analytics rule(s) successfully created 1801 content: 1802 application/json: 1803 schema: 1804 oneOf: 1805 - $ref: "#/components/schemas/AnalyticsRule" 1806 - type: array 1807 items: 1808 oneOf: 1809 - $ref: "#/components/schemas/AnalyticsRule" 1810 - type: object 1811 properties: 1812 error: 1813 type: string 1814 '400': 1815 description: Bad request, see error message for details 1816 content: 1817 application/json: 1818 schema: 1819 $ref: "#/components/schemas/ApiResponse" 1820 get: 1821 tags: 1822 - analytics 1823 summary: Retrieve analytics rules 1824 description: Retrieve all analytics rules. Use the optional rule_tag filter to narrow down results. 1825 operationId: retrieveAnalyticsRules 1826 parameters: 1827 - in: query 1828 name: rule_tag 1829 schema: 1830 type: string 1831 required: false 1832 description: Filter rules by rule_tag 1833 responses: 1834 '200': 1835 description: Analytics rules fetched 1836 content: 1837 application/json: 1838 schema: 1839 type: array 1840 items: 1841 $ref: "#/components/schemas/AnalyticsRule" 1842 /analytics/rules/{ruleName}: 1843 put: 1844 tags: 1845 - analytics 1846 summary: Upserts an analytics rule 1847 description: 1848 Upserts an analytics rule with the given name. 1849 operationId: upsertAnalyticsRule 1850 parameters: 1851 - in: path 1852 name: ruleName 1853 description: The name of the analytics rule to upsert 1854 schema: 1855 type: string 1856 required: true 1857 requestBody: 1858 description: The Analytics rule to be upserted 1859 content: 1860 application/json: 1861 schema: 1862 $ref: "#/components/schemas/AnalyticsRuleUpdate" 1863 required: true 1864 responses: 1865 '200': 1866 description: Analytics rule successfully upserted 1867 content: 1868 application/json: 1869 schema: 1870 $ref: "#/components/schemas/AnalyticsRule" 1871 '400': 1872 description: Bad request, see error message for details 1873 content: 1874 application/json: 1875 schema: 1876 $ref: "#/components/schemas/ApiResponse" 1877 get: 1878 tags: 1879 - analytics 1880 summary: Retrieves an analytics rule 1881 description: 1882 Retrieve the details of an analytics rule, given it's name 1883 operationId: retrieveAnalyticsRule 1884 parameters: 1885 - in: path 1886 name: ruleName 1887 description: The name of the analytics rule to retrieve 1888 schema: 1889 type: string 1890 required: true 1891 responses: 1892 '200': 1893 description: Analytics rule fetched 1894 content: 1895 application/json: 1896 schema: 1897 $ref: "#/components/schemas/AnalyticsRule" 1898 '404': 1899 description: Analytics rule not found 1900 content: 1901 application/json: 1902 schema: 1903 $ref: "#/components/schemas/ApiResponse" 1904 delete: 1905 tags: 1906 - analytics 1907 summary: Delete an analytics rule 1908 description: 1909 Permanently deletes an analytics rule, given it's name 1910 operationId: deleteAnalyticsRule 1911 parameters: 1912 - in: path 1913 name: ruleName 1914 description: The name of the analytics rule to delete 1915 schema: 1916 type: string 1917 required: true 1918 responses: 1919 '200': 1920 description: Analytics rule deleted 1921 content: 1922 application/json: 1923 schema: 1924 $ref: "#/components/schemas/AnalyticsRule" 1925 '404': 1926 description: Analytics rule not found 1927 content: 1928 application/json: 1929 schema: 1930 $ref: "#/components/schemas/ApiResponse" 1931 /metrics.json: 1932 get: 1933 tags: 1934 - operations 1935 summary: Get current RAM, CPU, Disk & Network usage metrics. 1936 description: 1937 Retrieve the metrics. 1938 operationId: retrieveMetrics 1939 responses: 1940 '200': 1941 description: Metrics fetched. 1942 content: 1943 application/json: 1944 schema: 1945 type: object 1946 /stats.json: 1947 get: 1948 tags: 1949 - operations 1950 summary: Get stats about API endpoints. 1951 description: 1952 Retrieve the stats about API endpoints. 1953 operationId: retrieveAPIStats 1954 responses: 1955 '200': 1956 description: Stats fetched. 1957 content: 1958 application/json: 1959 schema: 1960 $ref: "#/components/schemas/APIStatsResponse" 1961 /stopwords: 1962 get: 1963 tags: 1964 - stopwords 1965 summary: Retrieves all stopwords sets. 1966 description: 1967 Retrieve the details of all stopwords sets 1968 operationId: retrieveStopwordsSets 1969 responses: 1970 '200': 1971 description: Stopwords sets fetched. 1972 content: 1973 application/json: 1974 schema: 1975 $ref: "#/components/schemas/StopwordsSetsRetrieveAllSchema" 1976 /stopwords/{setId}: 1977 put: 1978 tags: 1979 - stopwords 1980 summary: Upserts a stopwords set. 1981 description: 1982 When an analytics rule is created, we give it a name and describe the type, the source collections and the destination collection. 1983 operationId: upsertStopwordsSet 1984 parameters: 1985 - in: path 1986 name: setId 1987 description: The ID of the stopwords set to upsert. 1988 schema: 1989 type: string 1990 required: true 1991 example: countries 1992 requestBody: 1993 description: The stopwords set to upsert. 1994 content: 1995 application/json: 1996 schema: 1997 $ref: "#/components/schemas/StopwordsSetUpsertSchema" 1998 required: true 1999 responses: 2000 '200': 2001 description: Stopwords set successfully upserted. 2002 content: 2003 application/json: 2004 schema: 2005 $ref: "#/components/schemas/StopwordsSetSchema" 2006 '400': 2007 description: Bad request, see error message for details. 2008 content: 2009 application/json: 2010 schema: 2011 $ref: "#/components/schemas/ApiResponse" 2012 get: 2013 tags: 2014 - stopwords 2015 summary: Retrieves a stopwords set. 2016 description: 2017 Retrieve the details of a stopwords set, given it's name. 2018 operationId: retrieveStopwordsSet 2019 parameters: 2020 - in: path 2021 name: setId 2022 description: The ID of the stopwords set to retrieve. 2023 schema: 2024 type: string 2025 required: true 2026 example: countries 2027 responses: 2028 '200': 2029 description: Stopwords set fetched. 2030 content: 2031 application/json: 2032 schema: 2033 $ref: "#/components/schemas/StopwordsSetRetrieveSchema" 2034 '404': 2035 description: Stopwords set not found. 2036 content: 2037 application/json: 2038 schema: 2039 $ref: "#/components/schemas/ApiResponse" 2040 delete: 2041 tags: 2042 - stopwords 2043 summary: Delete a stopwords set. 2044 description: 2045 Permanently deletes a stopwords set, given it's name. 2046 operationId: deleteStopwordsSet 2047 parameters: 2048 - in: path 2049 name: setId 2050 description: The ID of the stopwords set to delete. 2051 schema: 2052 type: string 2053 required: true 2054 example: countries 2055 responses: 2056 '200': 2057 description: Stopwords set rule deleted. 2058 content: 2059 application/json: 2060 schema: 2061 type: object 2062 properties: 2063 id: 2064 type: string 2065 required: 2066 - id 2067 example: | 2068 {"id": "countries"} 2069 '404': 2070 description: Stopwords set not found. 2071 content: 2072 application/json: 2073 schema: 2074 $ref: "#/components/schemas/ApiResponse" 2075 /presets: 2076 get: 2077 tags: 2078 - presets 2079 summary: Retrieves all presets. 2080 description: Retrieve the details of all presets 2081 operationId: retrieveAllPresets 2082 responses: 2083 '200': 2084 description: Presets fetched. 2085 content: 2086 application/json: 2087 schema: 2088 $ref: '#/components/schemas/PresetsRetrieveSchema' 2089 /presets/{presetId}: 2090 get: 2091 tags: 2092 - presets 2093 summary: Retrieves a preset. 2094 description: Retrieve the details of a preset, given it's name. 2095 operationId: retrievePreset 2096 parameters: 2097 - in: path 2098 name: presetId 2099 description: The ID of the preset to retrieve. 2100 schema: 2101 type: string 2102 required: true 2103 example: listing_view 2104 responses: 2105 '200': 2106 description: Preset fetched. 2107 content: 2108 application/json: 2109 schema: 2110 $ref: '#/components/schemas/PresetSchema' 2111 '404': 2112 description: Preset not found. 2113 content: 2114 application/json: 2115 schema: 2116 $ref: '#/components/schemas/ApiResponse' 2117 put: 2118 tags: 2119 - presets 2120 summary: Upserts a preset. 2121 description: Create or update an existing preset. 2122 operationId: upsertPreset 2123 parameters: 2124 - in: path 2125 name: presetId 2126 description: The name of the preset set to upsert. 2127 schema: 2128 type: string 2129 required: true 2130 example: listing_view 2131 requestBody: 2132 description: The stopwords set to upsert. 2133 content: 2134 application/json: 2135 schema: 2136 $ref: '#/components/schemas/PresetUpsertSchema' 2137 required: true 2138 responses: 2139 '200': 2140 description: Preset successfully upserted. 2141 content: 2142 application/json: 2143 schema: 2144 $ref: '#/components/schemas/PresetSchema' 2145 '400': 2146 description: Bad request, see error message for details 2147 content: 2148 application/json: 2149 schema: 2150 $ref: '#/components/schemas/ApiResponse' 2151 delete: 2152 tags: 2153 - presets 2154 summary: Delete a preset. 2155 description: Permanently deletes a preset, given it's name. 2156 operationId: deletePreset 2157 parameters: 2158 - in: path 2159 name: presetId 2160 description: The ID of the preset to delete. 2161 schema: 2162 type: string 2163 required: true 2164 example: listing_view 2165 responses: 2166 '200': 2167 description: Preset deleted. 2168 content: 2169 application/json: 2170 schema: 2171 $ref: '#/components/schemas/PresetDeleteSchema' 2172 '404': 2173 description: Preset not found. 2174 content: 2175 application/json: 2176 schema: 2177 $ref: '#/components/schemas/ApiResponse' 2178 /stemming/dictionaries: 2179 get: 2180 tags: 2181 - stemming 2182 summary: List all stemming dictionaries 2183 description: Retrieve a list of all available stemming dictionaries. 2184 operationId: listStemmingDictionaries 2185 responses: 2186 '200': 2187 description: List of all dictionaries 2188 content: 2189 application/json: 2190 schema: 2191 type: object 2192 properties: 2193 dictionaries: 2194 type: array 2195 items: 2196 type: string 2197 example: ["irregular-plurals", "company-terms"] 2198 2199 /stemming/dictionaries/{dictionaryId}: 2200 get: 2201 tags: 2202 - stemming 2203 summary: Retrieve a stemming dictionary 2204 description: Fetch details of a specific stemming dictionary. 2205 operationId: getStemmingDictionary 2206 parameters: 2207 - name: dictionaryId 2208 in: path 2209 description: The ID of the dictionary to retrieve 2210 required: true 2211 schema: 2212 type: string 2213 example: irregular-plurals 2214 responses: 2215 '200': 2216 description: Stemming dictionary details 2217 content: 2218 application/json: 2219 schema: 2220 $ref: "#/components/schemas/StemmingDictionary" 2221 '404': 2222 description: Dictionary not found 2223 content: 2224 application/json: 2225 schema: 2226 $ref: "#/components/schemas/ApiResponse" 2227 2228 /stemming/dictionaries/import: 2229 post: 2230 tags: 2231 - stemming 2232 summary: Import a stemming dictionary 2233 description: Upload a JSONL file containing word mappings to create or update a stemming dictionary. 2234 operationId: importStemmingDictionary 2235 parameters: 2236 - name: id 2237 in: query 2238 description: The ID to assign to the dictionary 2239 required: true 2240 schema: 2241 type: string 2242 example: irregular-plurals 2243 requestBody: 2244 description: The JSONL file containing word mappings 2245 required: true 2246 content: 2247 application/json: 2248 schema: 2249 type: string 2250 example: | 2251 {"word": "people", "root": "person"} 2252 {"word": "children", "root": "child"} 2253 responses: 2254 '200': 2255 description: Dictionary successfully imported 2256 content: 2257 application/octet-stream: 2258 schema: 2259 type: string 2260 example: > 2261 {"word": "people", "root": "person"} 2262 {"word": "children", "root": "child"} 2263 '400': 2264 description: Bad request, see error message for details 2265 content: 2266 application/json: 2267 schema: 2268 $ref: "#/components/schemas/ApiResponse" 2269 /nl_search_models: 2270 get: 2271 tags: 2272 - nl_search_models 2273 summary: List all NL search models 2274 description: Retrieve all NL search models. 2275 operationId: retrieveAllNLSearchModels 2276 responses: 2277 '200': 2278 description: List of all NL search models 2279 content: 2280 application/json: 2281 schema: 2282 type: array 2283 items: 2284 $ref: '#/components/schemas/NLSearchModelSchema' 2285 post: 2286 tags: 2287 - nl_search_models 2288 summary: Create a NL search model 2289 description: Create a new NL search model. 2290 operationId: createNLSearchModel 2291 requestBody: 2292 description: The NL search model to be created 2293 content: 2294 application/json: 2295 schema: 2296 $ref: '#/components/schemas/NLSearchModelCreateSchema' 2297 required: true 2298 responses: 2299 '201': 2300 description: NL search model successfully created 2301 content: 2302 application/json: 2303 schema: 2304 $ref: '#/components/schemas/NLSearchModelSchema' 2305 '400': 2306 description: Bad request, see error message for details 2307 content: 2308 application/json: 2309 schema: 2310 $ref: '#/components/schemas/ApiResponse' 2311 /nl_search_models/{modelId}: 2312 get: 2313 tags: 2314 - nl_search_models 2315 summary: Retrieve a NL search model 2316 description: Retrieve a specific NL search model by its ID. 2317 operationId: retrieveNLSearchModel 2318 parameters: 2319 - name: modelId 2320 in: path 2321 description: The ID of the NL search model to retrieve 2322 required: true 2323 schema: 2324 type: string 2325 responses: 2326 '200': 2327 description: NL search model fetched 2328 content: 2329 application/json: 2330 schema: 2331 $ref: '#/components/schemas/NLSearchModelSchema' 2332 '404': 2333 description: NL search model not found 2334 content: 2335 application/json: 2336 schema: 2337 $ref: '#/components/schemas/ApiResponse' 2338 put: 2339 tags: 2340 - nl_search_models 2341 summary: Update a NL search model 2342 description: Update an existing NL search model. 2343 operationId: updateNLSearchModel 2344 parameters: 2345 - name: modelId 2346 in: path 2347 description: The ID of the NL search model to update 2348 required: true 2349 schema: 2350 type: string 2351 requestBody: 2352 description: The NL search model fields to update 2353 content: 2354 application/json: 2355 schema: 2356 $ref: '#/components/schemas/NLSearchModelUpdateSchema' 2357 required: true 2358 responses: 2359 '200': 2360 description: NL search model successfully updated 2361 content: 2362 application/json: 2363 schema: 2364 $ref: '#/components/schemas/NLSearchModelSchema' 2365 '400': 2366 description: Bad request, see error message for details 2367 content: 2368 application/json: 2369 schema: 2370 $ref: '#/components/schemas/ApiResponse' 2371 '404': 2372 description: NL search model not found 2373 content: 2374 application/json: 2375 schema: 2376 $ref: '#/components/schemas/ApiResponse' 2377 delete: 2378 tags: 2379 - nl_search_models 2380 summary: Delete a NL search model 2381 description: Delete a specific NL search model by its ID. 2382 operationId: deleteNLSearchModel 2383 parameters: 2384 - name: modelId 2385 in: path 2386 description: The ID of the NL search model to delete 2387 required: true 2388 schema: 2389 type: string 2390 responses: 2391 '200': 2392 description: NL search model successfully deleted 2393 content: 2394 application/json: 2395 schema: 2396 $ref: '#/components/schemas/NLSearchModelDeleteSchema' 2397 '404': 2398 description: NL search model not found 2399 content: 2400 application/json: 2401 schema: 2402 $ref: '#/components/schemas/ApiResponse' 2403 2404components: 2405 schemas: 2406 CollectionSchema: 2407 required: 2408 - name 2409 - fields 2410 type: object 2411 properties: 2412 name: 2413 type: string 2414 description: Name of the collection 2415 example: companies 2416 fields: 2417 type: array 2418 description: A list of fields for querying, filtering and faceting 2419 example: 2420 - name: num_employees 2421 type: int32 2422 facet: false 2423 - name: company_name 2424 type: string 2425 facet: false 2426 - name: country 2427 type: string 2428 facet: true 2429 items: 2430 $ref: "#/components/schemas/Field" 2431 default_sorting_field: 2432 type: string 2433 description: 2434 The name of an int32 / float field that determines the order in which 2435 the search results are ranked when a sort_by clause is not provided during 2436 searching. This field must indicate some kind of popularity. 2437 example: num_employees # Go with the first field name listed above to produce sane defaults 2438 default: "" 2439 token_separators: 2440 type: array 2441 description: > 2442 List of symbols or special characters to be used for 2443 splitting the text into individual words in addition to space and new-line characters. 2444 items: 2445 type: string # characters only 2446 # Could `enum` be used instead, given it's symbols/special *characters*, e.g.: 2447 # enum: ["@", "!", ".", "/", ","] 2448 minLength: 1 2449 maxLength: 1 2450 default: [] 2451 synonym_sets: 2452 type: array 2453 description: List of synonym set names to associate with this collection 2454 items: 2455 type: string 2456 example: "synonym_set_1" 2457 enable_nested_fields: 2458 type: boolean 2459 description: 2460 Enables experimental support at a collection level for nested object or object array fields. 2461 This field is only available if the Typesense server is version `0.24.0.rcn34` or later. 2462 default: false 2463 example: true 2464 symbols_to_index: 2465 type: array 2466 description: > 2467 List of symbols or special characters to be indexed. 2468 items: 2469 type: string # characters only 2470 # Could `enum` be used instead, given it's symbols/special *characters*, e.g.: 2471 # enum: ["@", "!", ".", "/", ","] 2472 minLength: 1 2473 maxLength: 1 2474 default: [] 2475 voice_query_model: 2476 $ref: "#/components/schemas/VoiceQueryModelCollectionConfig" 2477 metadata: 2478 type: object 2479 description: > 2480 Optional details about the collection, e.g., when it was created, who created it etc. 2481 CollectionUpdateSchema: 2482 required: 2483 - fields 2484 type: object 2485 properties: 2486 fields: 2487 type: array 2488 description: A list of fields for querying, filtering and faceting 2489 example: 2490 - name: company_name 2491 type: string 2492 facet: false 2493 - name: num_employees 2494 type: int32 2495 facet: false 2496 - name: country 2497 type: string 2498 facet: true 2499 items: 2500 $ref: "#/components/schemas/Field" 2501 synonym_sets: 2502 type: array 2503 description: List of synonym set names to associate with this collection 2504 items: 2505 type: string 2506 example: "synonym_set_1" 2507 metadata: 2508 type: object 2509 description: > 2510 Optional details about the collection, e.g., when it was created, who created it etc. 2511 CollectionResponse: 2512 allOf: 2513 - $ref: "#/components/schemas/CollectionSchema" 2514 - type: object 2515 required: 2516 - num_documents 2517 - created_at 2518 properties: 2519 num_documents: 2520 type: integer 2521 description: Number of documents in the collection 2522 format: int64 2523 readOnly: true 2524 created_at: 2525 type: integer 2526 description: Timestamp of when the collection was created (Unix epoch in seconds) 2527 format: int64 2528 readOnly: true 2529 Field: 2530 required: 2531 - name 2532 - type 2533 type: object 2534 properties: 2535 name: 2536 type: string 2537 example: company_name 2538 type: 2539 type: string 2540 example: string 2541 optional: 2542 type: boolean 2543 example: true 2544 facet: 2545 type: boolean 2546 example: false 2547 index: 2548 type: boolean 2549 example: true 2550 default: true 2551 locale: 2552 type: string 2553 example: el 2554 sort: 2555 type: boolean 2556 example: true 2557 infix: 2558 type: boolean 2559 example: true 2560 default: false 2561 reference: 2562 type: string 2563 description: > 2564 Name of a field in another collection that should be linked to this collection so that it can be joined during query. 2565 async_reference: 2566 type: boolean 2567 description: > 2568 Allow documents to be indexed successfully even when the referenced document doesn't exist yet. 2569 num_dim: 2570 type: integer 2571 example: 256 2572 drop: 2573 type: boolean 2574 example: true 2575 # omitting default value since we want it to be null 2576 store: 2577 type: boolean 2578 description: > 2579 When set to false, the field value will not be stored on disk. Default: true. 2580 vec_dist: 2581 type: string 2582 description: > 2583 The distance metric to be used for vector search. Default: `cosine`. You can also use `ip` for inner product. 2584 range_index: 2585 type: boolean 2586 description: > 2587 Enables an index optimized for range filtering on numerical fields (e.g. rating:>3.5). Default: false. 2588 stem: 2589 type: boolean 2590 description: > 2591 Values are stemmed before indexing in-memory. Default: false. 2592 stem_dictionary: 2593 type: string 2594 description: Name of the stemming dictionary to use for this field 2595 example: irregular-plurals 2596 token_separators: 2597 type: array 2598 description: > 2599 List of symbols or special characters to be used for 2600 splitting the text into individual words in addition to space and new-line characters. 2601 items: 2602 type: string # characters only 2603 # Could `enum` be used instead, given it's symbols/special *characters*, e.g.: 2604 # enum: ["@", "!", ".", "/", ","] 2605 minLength: 1 2606 maxLength: 1 2607 default: [] 2608 symbols_to_index: 2609 type: array 2610 description: > 2611 List of symbols or special characters to be indexed. 2612 items: 2613 type: string # characters only 2614 # Could `enum` be used instead, given it's symbols/special *characters*, e.g.: 2615 # enum: ["@", "!", ".", "/", ","] 2616 minLength: 1 2617 maxLength: 1 2618 default: [] 2619 embed: 2620 type: object 2621 required: 2622 - from 2623 - model_config 2624 properties: 2625 from: 2626 type: array 2627 items: 2628 type: string 2629 model_config: 2630 type: object 2631 required: 2632 - model_name 2633 properties: 2634 model_name: 2635 type: string 2636 api_key: 2637 type: string 2638 url: 2639 type: string 2640 access_token: 2641 type: string 2642 refresh_token: 2643 type: string 2644 client_id: 2645 type: string 2646 client_secret: 2647 type: string 2648 project_id: 2649 type: string 2650 indexing_prefix: 2651 type: string 2652 query_prefix: 2653 type: string 2654 VoiceQueryModelCollectionConfig: 2655 type: object 2656 description: > 2657 Configuration for the voice query model 2658 properties: 2659 model_name: 2660 type: string 2661 example: "ts/whisper/base.en" 2662 CollectionAliasSchema: 2663 type: object 2664 required: 2665 - collection_name 2666 properties: 2667 collection_name: 2668 type: string 2669 description: Name of the collection you wish to map the alias to 2670 CollectionAlias: 2671 type: object 2672 required: 2673 - collection_name 2674 - name 2675 properties: 2676 name: 2677 type: string 2678 readOnly: true 2679 description: Name of the collection alias 2680 collection_name: 2681 type: string 2682 description: Name of the collection the alias mapped to 2683 CollectionAliasesResponse: 2684 type: object 2685 required: 2686 - aliases 2687 properties: 2688 aliases: 2689 type: array 2690 x-go-type: "[]*CollectionAlias" 2691 items: 2692 $ref: "#/components/schemas/CollectionAlias" 2693 SearchResult: 2694 type: object 2695 properties: 2696 facet_counts: 2697 type: array 2698 items: 2699 $ref: "#/components/schemas/FacetCounts" 2700 found: 2701 type: integer 2702 description: The number of documents found 2703 found_docs: 2704 type: integer 2705 search_time_ms: 2706 type: integer 2707 description: The number of milliseconds the search took 2708 out_of: 2709 type: integer 2710 description: The total number of documents in the collection 2711 search_cutoff: 2712 type: boolean 2713 description: Whether the search was cut off 2714 page: 2715 type: integer 2716 description: The search result page number 2717 grouped_hits: 2718 type: array 2719 items: 2720 $ref: "#/components/schemas/SearchGroupedHit" 2721 hits: 2722 type: array 2723 description: The documents that matched the search query 2724 items: 2725 $ref: "#/components/schemas/SearchResultHit" 2726 request_params: 2727 $ref: "#/components/schemas/SearchRequestParams" 2728 conversation: 2729 $ref: "#/components/schemas/SearchResultConversation" 2730 union_request_params: 2731 type: array 2732 description: Returned only for union query response. 2733 items: 2734 $ref: "#/components/schemas/SearchRequestParams" 2735 metadata: 2736 type: object 2737 description: Custom JSON object that can be returned in the search response 2738 additionalProperties: true 2739 SearchRequestParams: 2740 type: object 2741 required: 2742 - collection_name 2743 - q 2744 - per_page 2745 properties: 2746 collection_name: 2747 type: string 2748 q: 2749 type: string 2750 per_page: 2751 type: integer 2752 voice_query: 2753 type: object 2754 properties: 2755 transcribed_query: 2756 type: string 2757 SearchResultConversation: 2758 type: object 2759 required: 2760 - answer 2761 - conversation_history 2762 - conversation_id 2763 - query 2764 properties: 2765 answer: 2766 type: string 2767 conversation_history: 2768 type: array 2769 items: 2770 type: object 2771 conversation_id: 2772 type: string 2773 query: 2774 type: string 2775 SearchGroupedHit: 2776 type: object 2777 required: 2778 - group_key 2779 - hits 2780 properties: 2781 found: 2782 type: integer 2783 group_key: 2784 type: array 2785 items: {} 2786 hits: 2787 type: array 2788 description: The documents that matched the search query 2789 items: 2790 $ref: "#/components/schemas/SearchResultHit" 2791 SearchResultHit: 2792 type: object 2793 properties: 2794 highlights: 2795 type: array 2796 description: (Deprecated) Contains highlighted portions of the search fields 2797 items: 2798 $ref: "#/components/schemas/SearchHighlight" 2799 highlight: 2800 type: object 2801 description: Highlighted version of the matching document 2802 additionalProperties: true 2803 document: 2804 type: object 2805 description: Can be any key-value pair 2806 additionalProperties: 2807 type: object 2808 text_match: 2809 type: integer 2810 format: int64 2811 text_match_info: 2812 type: object 2813 properties: 2814 best_field_score: 2815 type: string 2816 best_field_weight: 2817 type: integer 2818 fields_matched: 2819 type: integer 2820 num_tokens_dropped: 2821 type: integer 2822 format: int64 2823 x-go-type: uint64 2824 score: 2825 type: string 2826 tokens_matched: 2827 type: integer 2828 typo_prefix_score: 2829 type: integer 2830 geo_distance_meters: 2831 type: object 2832 description: Can be any key-value pair 2833 additionalProperties: 2834 type: integer 2835 vector_distance: 2836 type: number 2837 format: float 2838 description: Distance between the query vector and matching document's vector value 2839 hybrid_search_info: 2840 type: object 2841 description: Information about hybrid search scoring 2842 properties: 2843 rank_fusion_score: 2844 type: number 2845 format: float 2846 description: Combined score from rank fusion of text and vector search 2847 search_index: 2848 type: integer 2849 description: Returned only for union query response. Indicates the index of the query which this document matched to. 2850 example: 2851 highlights: 2852 company_name: 2853 field: company_name 2854 snippet: <mark>Stark</mark> Industries 2855 document: 2856 id: "124" 2857 company_name: Stark Industries 2858 num_employees: 5215 2859 country: USA 2860 text_match: 1234556 2861 SearchHighlight: 2862 type: object 2863 properties: 2864 field: 2865 type: string 2866 example: company_name 2867 snippet: 2868 type: string 2869 description: Present only for (non-array) string fields 2870 example: <mark>Stark</mark> Industries 2871 snippets: 2872 type: array 2873 description: Present only for (array) string[] fields 2874 example: 2875 - <mark>Stark</mark> Industries 2876 - <mark>Stark</mark> Corp 2877 items: 2878 type: string 2879 value: 2880 type: string 2881 description: Full field value with highlighting, present only for (non-array) string fields 2882 example: <mark>Stark</mark> Industries is a major supplier of space equipment. 2883 values: 2884 type: array 2885 description: Full field value with highlighting, present only for (array) string[] fields 2886 example: 2887 - <mark>Stark</mark> Industries 2888 - <mark>Stark</mark> Corp 2889 items: 2890 type: string 2891 indices: 2892 type: array 2893 description: The indices property will be present only for string[] 2894 fields and will contain the corresponding indices of the snippets 2895 in the search field 2896 example: 1 2897 items: 2898 type: integer 2899 matched_tokens: 2900 type: array 2901 items: 2902 type: object 2903 x-go-type: "interface{}" 2904 SearchSynonymSchema: 2905 type: object 2906 required: 2907 - synonyms 2908 properties: 2909 root: 2910 type: string 2911 description: For 1-way synonyms, indicates the root word that words in the `synonyms` parameter map to. 2912 synonyms: 2913 type: array 2914 description: Array of words that should be considered as synonyms. 2915 items: 2916 type: string 2917 locale: 2918 type: string 2919 description: Locale for the synonym, leave blank to use the standard tokenizer. 2920 symbols_to_index: 2921 type: array 2922 description: By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is. 2923 items: 2924 type: string 2925 SearchSynonym: 2926 allOf: 2927 - $ref: "#/components/schemas/SearchSynonymSchema" 2928 - type: object 2929 required: 2930 - id 2931 properties: 2932 id: 2933 type: string 2934 readOnly: true 2935 SearchSynonymDeleteResponse: 2936 type: object 2937 required: 2938 - id 2939 properties: 2940 id: 2941 type: string 2942 description: The id of the synonym that was deleted 2943 SearchSynonymsResponse: 2944 type: object 2945 required: 2946 - synonyms 2947 properties: 2948 synonyms: 2949 type: array 2950 x-go-type: "[]*SearchSynonym" 2951 items: 2952 $ref: "#/components/schemas/SearchSynonym" 2953 HealthStatus: 2954 type: object 2955 required: 2956 - ok 2957 properties: 2958 ok: 2959 type: boolean 2960 SchemaChangeStatus: 2961 type: object 2962 properties: 2963 collection: 2964 type: string 2965 description: Name of the collection being modified 2966 validated_docs: 2967 type: integer 2968 description: Number of documents that have been validated 2969 altered_docs: 2970 type: integer 2971 description: Number of documents that have been altered 2972 SuccessStatus: 2973 type: object 2974 required: 2975 - success 2976 properties: 2977 success: 2978 type: boolean 2979 ApiResponse: 2980 type: object 2981 required: 2982 - message 2983 properties: 2984 message: 2985 type: string 2986 ApiKeySchema: 2987 type: object 2988 required: 2989 - actions 2990 - collections 2991 - description 2992 properties: 2993 value: 2994 type: string 2995 description: 2996 type: string 2997 actions: 2998 type: array 2999 items: 3000 type: string 3001 collections: 3002 type: array 3003 items: 3004 type: string 3005 expires_at: 3006 type: integer 3007 format: int64 3008 ApiKey: 3009 allOf: 3010 - $ref: "#/components/schemas/ApiKeySchema" 3011 - type: object 3012 properties: 3013 id: 3014 type: integer 3015 format: int64 3016 readOnly: true 3017 value_prefix: 3018 type: string 3019 readOnly: true 3020 ApiKeyDeleteResponse: 3021 type: object 3022 required: 3023 - id 3024 properties: 3025 id: 3026 type: integer 3027 format: int64 3028 description: The id of the API key that was deleted 3029 ApiKeysResponse: 3030 type: object 3031 required: 3032 - keys 3033 properties: 3034 keys: 3035 type: array 3036 x-go-type: "[]*ApiKey" 3037 items: 3038 $ref: "#/components/schemas/ApiKey" 3039 MultiSearchResult: 3040 type: object 3041 required: 3042 - results 3043 properties: 3044 results: 3045 type: array 3046 items: 3047 $ref: "#/components/schemas/MultiSearchResultItem" 3048 conversation: 3049 $ref: "#/components/schemas/SearchResultConversation" 3050 MultiSearchResultItem: 3051 allOf: 3052 - $ref: "#/components/schemas/SearchResult" 3053 - type: object 3054 properties: 3055 code: 3056 type: integer 3057 description: HTTP error code 3058 format: int64 3059 error: 3060 type: string 3061 description: Error description 3062 SearchParameters: 3063 type: object 3064 properties: 3065 q: 3066 description: The query text to search for in the collection. 3067 Use * as the search string to return all documents. 3068 This is typically useful when used in conjunction with filter_by. 3069 type: string 3070 3071 query_by: 3072 description: A list of `string` fields that should be queried 3073 against. Multiple fields are separated with a comma. 3074 type: string 3075 3076 nl_query: 3077 description: Whether to use natural language processing to parse the query. 3078 type: boolean 3079 3080 nl_model_id: 3081 description: The ID of the natural language model to use. 3082 type: string 3083 3084 query_by_weights: 3085 description: 3086 The relative weight to give each `query_by` field when ranking results. 3087 This can be used to boost fields in priority, when looking for matches. 3088 Multiple fields are separated with a comma. 3089 type: string 3090 3091 text_match_type: 3092 description: 3093 In a multi-field matching context, this parameter determines how the representative text match 3094 score of a record is calculated. Possible values are max_score (default) or max_weight. 3095 type: string 3096 3097 prefix: 3098 description: 3099 Boolean field to indicate that the last word in the query should 3100 be treated as a prefix, and not as a whole word. This is used for building 3101 autocomplete and instant search interfaces. Defaults to true. 3102 type: string 3103 3104 infix: 3105 description: 3106 If infix index is enabled for this field, infix searching can be done on a per-field 3107 basis by sending a comma separated string parameter called infix to the search query. 3108 This parameter can have 3 values; `off` infix search is disabled, which is default 3109 `always` infix search is performed along with regular search 3110 `fallback` infix search is performed if regular search does not produce results 3111 type: string 3112 3113 max_extra_prefix: 3114 description: 3115 There are also 2 parameters that allow you to control the extent of infix searching 3116 max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before 3117 or after the query that can be present in the token. For example query "K2100" has 2 extra 3118 symbols in "6PK2100". By default, any number of prefixes/suffixes can be present for a match. 3119 type: integer 3120 3121 max_extra_suffix: 3122 description: 3123 There are also 2 parameters that allow you to control the extent of infix searching 3124 max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before 3125 or after the query that can be present in the token. For example query "K2100" has 2 extra 3126 symbols in "6PK2100". By default, any number of prefixes/suffixes can be present for a match. 3127 type: integer 3128 3129 filter_by: 3130 description: 3131 Filter conditions for refining your open api validator search results. Separate 3132 multiple conditions with &&. 3133 type: string 3134 example: "num_employees:>100 && country: [USA, UK]" 3135 3136 max_filter_by_candidates: 3137 description: 3138 Controls the number of similar words that Typesense considers during fuzzy search 3139 on filter_by values. Useful for controlling prefix matches like company_name:Acm*. 3140 type: integer 3141 3142 sort_by: 3143 description: 3144 A list of numerical fields and their corresponding sort orders 3145 that will be used for ordering your results. 3146 Up to 3 sort fields can be specified. 3147 The text similarity score is exposed as a special `_text_match` field that 3148 you can use in the list of sorting fields. 3149 If no `sort_by` parameter is specified, results are sorted by 3150 `_text_match:desc,default_sorting_field:desc` 3151 type: string 3152 example: num_employees:desc 3153 3154 facet_by: 3155 description: 3156 A list of fields that will be used for faceting your results 3157 on. Separate multiple fields with a comma. 3158 type: string 3159 3160 max_facet_values: 3161 description: Maximum number of facet values to be returned. 3162 type: integer 3163 3164 facet_query: 3165 description: 3166 Facet values that are returned can now be filtered via this parameter. 3167 The matching facet text is also highlighted. For example, when faceting 3168 by `category`, you can set `facet_query=category:shoe` to return only 3169 facet values that contain the prefix "shoe". 3170 type: string 3171 3172 num_typos: 3173 description: > 3174 The number of typographical errors (1 or 2) that would be tolerated. 3175 Default: 2 3176 type: string 3177 3178 page: 3179 description: Results from this specific page number would be fetched. 3180 type: integer 3181 3182 per_page: 3183 description: "Number of results to fetch per page. Default: 10" 3184 type: integer 3185 3186 limit: 3187 description: > 3188 Number of hits to fetch. Can be used as an alternative to the per_page parameter. 3189 Default: 10. 3190 type: integer 3191 3192 offset: 3193 description: Identifies the starting point to return hits from a result set. Can be used as an alternative to the page parameter. 3194 type: integer 3195 3196 group_by: 3197 description: 3198 You can aggregate search results into groups or buckets by specify 3199 one or more `group_by` fields. Separate multiple fields with a comma. 3200 To group on a particular field, it must be a faceted field. 3201 type: string 3202 3203 group_limit: 3204 description: > 3205 Maximum number of hits to be returned for every group. If the `group_limit` is 3206 set as `K` then only the top K hits in each group are returned in the response. 3207 Default: 3 3208 type: integer 3209 3210 group_missing_values: 3211 description: > 3212 Setting this parameter to true will place all documents that have a null value in the group_by field, into a single group. 3213 Setting this parameter to false, will cause each document with a null value in the group_by field to not be grouped with other documents. 3214 Default: true 3215 type: boolean 3216 3217 include_fields: 3218 description: List of fields from the document to include in the search result 3219 type: string 3220 3221 exclude_fields: 3222 description: List of fields from the document to exclude in the search result 3223 type: string 3224 3225 highlight_full_fields: 3226 description: List of fields which should be highlighted fully without snippeting 3227 type: string 3228 3229 highlight_affix_num_tokens: 3230 description: > 3231 The number of tokens that should surround the highlighted text on each side. 3232 Default: 4 3233 type: integer 3234 3235 highlight_start_tag: 3236 description: > 3237 The start tag used for the highlighted snippets. 3238 Default: `<mark>` 3239 type: string 3240 highlight_end_tag: 3241 description: > 3242 The end tag used for the highlighted snippets. 3243 Default: `</mark>` 3244 type: string 3245 3246 enable_highlight_v1: 3247 description: > 3248 Flag for enabling/disabling the deprecated, old highlight structure in the response. 3249 Default: true 3250 type: boolean 3251 default: true 3252 3253 enable_analytics: 3254 description: > 3255 Flag for enabling/disabling analytics aggregation for specific search 3256 queries (for e.g. those originating from a test script). 3257 type: boolean 3258 default: true 3259 3260 snippet_threshold: 3261 description: > 3262 Field values under this length will be fully highlighted, instead of showing 3263 a snippet of relevant portion. Default: 30 3264 type: integer 3265 3266 synonym_sets: 3267 type: string 3268 description: List of synonym set names to associate with this search query 3269 example: "synonym_set_1,synonym_set_2" 3270 3271 drop_tokens_threshold: 3272 description: > 3273 If the number of results found for a specific query is less than 3274 this number, Typesense will attempt to drop the tokens in the query until 3275 enough results are found. Tokens that have the least individual hits 3276 are dropped first. Set to 0 to disable. Default: 10 3277 type: integer 3278 drop_tokens_mode: 3279 $ref: "#/components/schemas/DropTokensMode" 3280 typo_tokens_threshold: 3281 description: > 3282 If the number of results found for a specific query is less than this number, 3283 Typesense will attempt to look for tokens with more typos until 3284 enough results are found. Default: 100 3285 type: integer 3286 enable_typos_for_alpha_numerical_tokens: 3287 type: boolean 3288 description: > 3289 Set this parameter to false to disable typos on alphanumerical query tokens. Default: true. 3290 3291 filter_curated_hits: 3292 type: boolean 3293 description: > 3294 Whether the filter_by condition of the search query should be applicable to curated results (override definitions, pinned hits, hidden hits, etc.). Default: false 3295 enable_synonyms: 3296 type: boolean 3297 description: > 3298 If you have some synonyms defined but want to disable all of them for a particular search query, set enable_synonyms to false. Default: true 3299 synonym_prefix: 3300 type: boolean 3301 description: > 3302 Allow synonym resolution on word prefixes in the query. Default: false 3303 synonym_num_typos: 3304 type: integer 3305 description: > 3306 Allow synonym resolution on typo-corrected words in the query. Default: 0 3307 3308 pinned_hits: 3309 description: > 3310 A list of records to unconditionally include in the search results 3311 at specific positions. An example use case would be to feature or promote 3312 certain items on the top of search results. 3313 A list of `record_id:hit_position`. Eg: to include a record with ID 123 3314 at Position 1 and another record with ID 456 at Position 5, 3315 you'd specify `123:1,456:5`. 3316 3317 You could also use the Overrides feature to override search results based 3318 on rules. Overrides are applied first, followed by `pinned_hits` and 3319 finally `hidden_hits`. 3320 type: string 3321 3322 hidden_hits: 3323 description: > 3324 A list of records to unconditionally hide from search results. 3325 A list of `record_id`s to hide. Eg: to hide records with IDs 123 and 456, 3326 you'd specify `123,456`. 3327 3328 You could also use the Overrides feature to override search results based 3329 on rules. Overrides are applied first, followed by `pinned_hits` and 3330 finally `hidden_hits`. 3331 type: string 3332 3333 override_tags: 3334 description: Comma separated list of tags to trigger the curations rules that match the tags. 3335 type: string 3336 3337 highlight_fields: 3338 description: > 3339 A list of custom fields that must be highlighted even if you don't query 3340 for them 3341 type: string 3342 3343 split_join_tokens: 3344 description: > 3345 Treat space as typo: search for q=basket ball if q=basketball is not found or vice-versa. 3346 Splitting/joining of tokens will only be attempted if the original query produces no results. 3347 To always trigger this behavior, set value to `always``. 3348 To disable, set value to `off`. Default is `fallback`. 3349 type: string 3350 3351 pre_segmented_query: 3352 description: > 3353 You can index content from any logographic language into Typesense if you 3354 are able to segment / split the text into space-separated words yourself 3355 before indexing and querying. 3356 3357 Set this parameter to true to do the same 3358 type: boolean 3359 3360 preset: 3361 description: > 3362 Search using a bunch of search parameters by setting this parameter to 3363 the name of the existing Preset. 3364 type: string 3365 3366 enable_overrides: 3367 description: > 3368 If you have some overrides defined but want to disable all of them during 3369 query time, you can do that by setting this parameter to false 3370 type: boolean 3371 default: false 3372 3373 prioritize_exact_match: 3374 description: > 3375 Set this parameter to true to ensure that an exact match is ranked above 3376 the others 3377 type: boolean 3378 default: true 3379 max_candidates: 3380 description: > 3381 Control the number of words that Typesense considers for typo and prefix searching. 3382 type: integer 3383 prioritize_token_position: 3384 description: > 3385 Make Typesense prioritize documents where the query words appear earlier in the text. 3386 type: boolean 3387 default: false 3388 prioritize_num_matching_fields: 3389 description: > 3390 Make Typesense prioritize documents where the query words appear in more number of fields. 3391 type: boolean 3392 default: true 3393 enable_typos_for_numerical_tokens: 3394 description: > 3395 Make Typesense disable typos for numerical tokens. 3396 type: boolean 3397 default: true 3398 exhaustive_search: 3399 description: > 3400 Setting this to true will make Typesense consider all prefixes and typo 3401 corrections of the words in the query without stopping early when enough results are found 3402 (drop_tokens_threshold and typo_tokens_threshold configurations are ignored). 3403 type: boolean 3404 search_cutoff_ms: 3405 description: > 3406 Typesense will attempt to return results early if the cutoff time has elapsed. 3407 This is not a strict guarantee and facet computation is not bound by this parameter. 3408 type: integer 3409 use_cache: 3410 description: > 3411 Enable server side caching of search query results. By default, caching is disabled. 3412 type: boolean 3413 cache_ttl: 3414 description: > 3415 The duration (in seconds) that determines how long the search query is cached. 3416 This value can be set on a per-query basis. Default: 60. 3417 type: integer 3418 min_len_1typo: 3419 description: > 3420 Minimum word length for 1-typo correction to be applied. 3421 The value of num_typos is still treated as the maximum allowed typos. 3422 type: integer 3423 min_len_2typo: 3424 description: > 3425 Minimum word length for 2-typo correction to be applied. 3426 The value of num_typos is still treated as the maximum allowed typos. 3427 type: integer 3428 vector_query: 3429 description: > 3430 Vector query expression for fetching documents "closest" to a given query/document vector. 3431 type: string 3432 remote_embedding_timeout_ms: 3433 description: > 3434 Timeout (in milliseconds) for fetching remote embeddings. 3435 type: integer 3436 remote_embedding_num_tries: 3437 description: > 3438 Number of times to retry fetching remote embeddings. 3439 type: integer 3440 facet_strategy: 3441 description: > 3442 Choose the underlying faceting strategy used. Comma separated string of allows values: 3443 exhaustive, top_values or automatic (default). 3444 type: string 3445 stopwords: 3446 description: > 3447 Name of the stopwords set to apply for this search, 3448 the keywords present in the set will be removed from the search query. 3449 type: string 3450 facet_return_parent: 3451 description: > 3452 Comma separated string of nested facet fields whose parent object should be returned in facet response. 3453 type: string 3454 voice_query: 3455 description: > 3456 The base64 encoded audio file in 16 khz 16-bit WAV format. 3457 type: string 3458 conversation: 3459 description: > 3460 Enable conversational search. 3461 type: boolean 3462 conversation_model_id: 3463 description: > 3464 The Id of Conversation Model to be used. 3465 type: string 3466 conversation_id: 3467 description: > 3468 The Id of a previous conversation to continue, this tells Typesense to include prior context when communicating with the LLM. 3469 type: string 3470 3471 MultiSearchParameters: 3472 description: > 3473 Parameters for the multi search API. 3474 type: object 3475 properties: 3476 q: 3477 description: The query text to search for in the collection. 3478 Use * as the search string to return all documents. 3479 This is typically useful when used in conjunction with filter_by. 3480 type: string 3481 3482 query_by: 3483 description: A list of `string` fields that should be queried 3484 against. Multiple fields are separated with a comma. 3485 type: string 3486 3487 query_by_weights: 3488 description: 3489 The relative weight to give each `query_by` field when ranking results. 3490 This can be used to boost fields in priority, when looking for matches. 3491 Multiple fields are separated with a comma. 3492 type: string 3493 3494 text_match_type: 3495 description: 3496 In a multi-field matching context, this parameter determines how the representative text match 3497 score of a record is calculated. Possible values are max_score (default) or max_weight. 3498 type: string 3499 3500 prefix: 3501 description: 3502 Boolean field to indicate that the last word in the query should 3503 be treated as a prefix, and not as a whole word. This is used for building 3504 autocomplete and instant search interfaces. Defaults to true. 3505 type: string 3506 3507 infix: 3508 description: 3509 If infix index is enabled for this field, infix searching can be done on a per-field 3510 basis by sending a comma separated string parameter called infix to the search query. 3511 This parameter can have 3 values; `off` infix search is disabled, which is default 3512 `always` infix search is performed along with regular search 3513 `fallback` infix search is performed if regular search does not produce results 3514 type: string 3515 3516 max_extra_prefix: 3517 description: 3518 There are also 2 parameters that allow you to control the extent of infix searching 3519 max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before 3520 or after the query that can be present in the token. For example query "K2100" has 2 extra 3521 symbols in "6PK2100". By default, any number of prefixes/suffixes can be present for a match. 3522 type: integer 3523 3524 max_extra_suffix: 3525 description: 3526 There are also 2 parameters that allow you to control the extent of infix searching 3527 max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before 3528 or after the query that can be present in the token. For example query "K2100" has 2 extra 3529 symbols in "6PK2100". By default, any number of prefixes/suffixes can be present for a match. 3530 type: integer 3531 3532 filter_by: 3533 description: 3534 Filter conditions for refining youropen api validator search results. Separate 3535 multiple conditions with &&. 3536 type: string 3537 example: "num_employees:>100 && country: [USA, UK]" 3538 3539 sort_by: 3540 description: 3541 A list of numerical fields and their corresponding sort orders 3542 that will be used for ordering your results. 3543 Up to 3 sort fields can be specified. 3544 The text similarity score is exposed as a special `_text_match` field that 3545 you can use in the list of sorting fields. 3546 If no `sort_by` parameter is specified, results are sorted by 3547 `_text_match:desc,default_sorting_field:desc` 3548 type: string 3549 3550 facet_by: 3551 description: 3552 A list of fields that will be used for faceting your results 3553 on. Separate multiple fields with a comma. 3554 type: string 3555 3556 max_facet_values: 3557 description: Maximum number of facet values to be returned. 3558 type: integer 3559 3560 facet_query: 3561 description: 3562 Facet values that are returned can now be filtered via this parameter. 3563 The matching facet text is also highlighted. For example, when faceting 3564 by `category`, you can set `facet_query=category:shoe` to return only 3565 facet values that contain the prefix "shoe". 3566 type: string 3567 3568 num_typos: 3569 description: > 3570 The number of typographical errors (1 or 2) that would be tolerated. 3571 Default: 2 3572 type: string 3573 3574 page: 3575 description: Results from this specific page number would be fetched. 3576 type: integer 3577 3578 per_page: 3579 description: "Number of results to fetch per page. Default: 10" 3580 type: integer 3581 3582 limit: 3583 description: > 3584 Number of hits to fetch. Can be used as an alternative to the per_page parameter. 3585 Default: 10. 3586 type: integer 3587 3588 offset: 3589 description: Identifies the starting point to return hits from a result set. Can be used as an alternative to the page parameter. 3590 type: integer 3591 3592 group_by: 3593 description: 3594 You can aggregate search results into groups or buckets by specify 3595 one or more `group_by` fields. Separate multiple fields with a comma. 3596 To group on a particular field, it must be a faceted field. 3597 type: string 3598 3599 group_limit: 3600 description: > 3601 Maximum number of hits to be returned for every group. If the `group_limit` is 3602 set as `K` then only the top K hits in each group are returned in the response. 3603 Default: 3 3604 type: integer 3605 3606 group_missing_values: 3607 description: > 3608 Setting this parameter to true will place all documents that have a null value in the group_by field, into a single group. 3609 Setting this parameter to false, will cause each document with a null value in the group_by field to not be grouped with other documents. 3610 Default: true 3611 type: boolean 3612 3613 include_fields: 3614 description: List of fields from the document to include in the search result 3615 type: string 3616 3617 exclude_fields: 3618 description: List of fields from the document to exclude in the search result 3619 type: string 3620 3621 highlight_full_fields: 3622 description: List of fields which should be highlighted fully without snippeting 3623 type: string 3624 3625 highlight_affix_num_tokens: 3626 description: > 3627 The number of tokens that should surround the highlighted text on each side. 3628 Default: 4 3629 type: integer 3630 3631 highlight_start_tag: 3632 description: > 3633 The start tag used for the highlighted snippets. 3634 Default: `<mark>` 3635 type: string 3636 highlight_end_tag: 3637 description: > 3638 The end tag used for the highlighted snippets. 3639 Default: `</mark>` 3640 type: string 3641 3642 snippet_threshold: 3643 description: > 3644 Field values under this length will be fully highlighted, instead of showing 3645 a snippet of relevant portion. Default: 30 3646 type: integer 3647 3648 drop_tokens_threshold: 3649 description: > 3650 If the number of results found for a specific query is less than 3651 this number, Typesense will attempt to drop the tokens in the query until 3652 enough results are found. Tokens that have the least individual hits 3653 are dropped first. Set to 0 to disable. Default: 10 3654 type: integer 3655 drop_tokens_mode: 3656 $ref: "#/components/schemas/DropTokensMode" 3657 typo_tokens_threshold: 3658 description: > 3659 If the number of results found for a specific query is less than this number, 3660 Typesense will attempt to look for tokens with more typos until 3661 enough results are found. Default: 100 3662 type: integer 3663 enable_typos_for_alpha_numerical_tokens: 3664 type: boolean 3665 description: > 3666 Set this parameter to false to disable typos on alphanumerical query tokens. Default: true. 3667 3668 filter_curated_hits: 3669 type: boolean 3670 description: > 3671 Whether the filter_by condition of the search query should be applicable to curated results (override definitions, pinned hits, hidden hits, etc.). Default: false 3672 enable_synonyms: 3673 type: boolean 3674 description: > 3675 If you have some synonyms defined but want to disable all of them for a particular search query, set enable_synonyms to false. Default: true 3676 3677 enable_analytics: 3678 description: > 3679 Flag for enabling/disabling analytics aggregation for specific search 3680 queries (for e.g. those originating from a test script). 3681 type: boolean 3682 default: true 3683 3684 synonym_prefix: 3685 type: boolean 3686 description: > 3687 Allow synonym resolution on word prefixes in the query. Default: false 3688 synonym_num_typos: 3689 type: integer 3690 description: > 3691 Allow synonym resolution on typo-corrected words in the query. Default: 0 3692 3693 pinned_hits: 3694 description: > 3695 A list of records to unconditionally include in the search results 3696 at specific positions. An example use case would be to feature or promote 3697 certain items on the top of search results. 3698 A list of `record_id:hit_position`. Eg: to include a record with ID 123 3699 at Position 1 and another record with ID 456 at Position 5, 3700 you'd specify `123:1,456:5`. 3701 3702 You could also use the Overrides feature to override search results based 3703 on rules. Overrides are applied first, followed by `pinned_hits` and 3704 finally `hidden_hits`. 3705 type: string 3706 3707 hidden_hits: 3708 description: > 3709 A list of records to unconditionally hide from search results. 3710 A list of `record_id`s to hide. Eg: to hide records with IDs 123 and 456, 3711 you'd specify `123,456`. 3712 3713 You could also use the Overrides feature to override search results based 3714 on rules. Overrides are applied first, followed by `pinned_hits` and 3715 finally `hidden_hits`. 3716 type: string 3717 3718 override_tags: 3719 description: Comma separated list of tags to trigger the curations rules that match the tags. 3720 type: string 3721 3722 highlight_fields: 3723 description: > 3724 A list of custom fields that must be highlighted even if you don't query 3725 for them 3726 type: string 3727 3728 pre_segmented_query: 3729 description: > 3730 You can index content from any logographic language into Typesense if you 3731 are able to segment / split the text into space-separated words yourself 3732 before indexing and querying. 3733 3734 Set this parameter to true to do the same 3735 type: boolean 3736 default: false 3737 3738 preset: 3739 description: > 3740 Search using a bunch of search parameters by setting this parameter to 3741 the name of the existing Preset. 3742 type: string 3743 3744 enable_overrides: 3745 description: > 3746 If you have some overrides defined but want to disable all of them during 3747 query time, you can do that by setting this parameter to false 3748 type: boolean 3749 default: false 3750 3751 prioritize_exact_match: 3752 description: > 3753 Set this parameter to true to ensure that an exact match is ranked above 3754 the others 3755 type: boolean 3756 default: true 3757 3758 prioritize_token_position: 3759 description: > 3760 Make Typesense prioritize documents where the query words appear earlier in the text. 3761 type: boolean 3762 default: false 3763 3764 prioritize_num_matching_fields: 3765 description: > 3766 Make Typesense prioritize documents where the query words appear in more number of fields. 3767 type: boolean 3768 default: true 3769 3770 enable_typos_for_numerical_tokens: 3771 description: > 3772 Make Typesense disable typos for numerical tokens. 3773 type: boolean 3774 default: true 3775 3776 exhaustive_search: 3777 description: > 3778 Setting this to true will make Typesense consider all prefixes and typo 3779 corrections of the words in the query without stopping early when enough results are found 3780 (drop_tokens_threshold and typo_tokens_threshold configurations are ignored). 3781 type: boolean 3782 search_cutoff_ms: 3783 description: > 3784 Typesense will attempt to return results early if the cutoff time has elapsed. 3785 This is not a strict guarantee and facet computation is not bound by this parameter. 3786 type: integer 3787 use_cache: 3788 description: > 3789 Enable server side caching of search query results. By default, caching is disabled. 3790 type: boolean 3791 cache_ttl: 3792 description: > 3793 The duration (in seconds) that determines how long the search query is cached. 3794 This value can be set on a per-query basis. Default: 60. 3795 type: integer 3796 min_len_1typo: 3797 description: > 3798 Minimum word length for 1-typo correction to be applied. 3799 The value of num_typos is still treated as the maximum allowed typos. 3800 type: integer 3801 min_len_2typo: 3802 description: > 3803 Minimum word length for 2-typo correction to be applied. 3804 The value of num_typos is still treated as the maximum allowed typos. 3805 type: integer 3806 vector_query: 3807 description: > 3808 Vector query expression for fetching documents "closest" to a given query/document vector. 3809 type: string 3810 remote_embedding_timeout_ms: 3811 description: > 3812 Timeout (in milliseconds) for fetching remote embeddings. 3813 type: integer 3814 remote_embedding_num_tries: 3815 description: > 3816 Number of times to retry fetching remote embeddings. 3817 type: integer 3818 facet_strategy: 3819 description: > 3820 Choose the underlying faceting strategy used. Comma separated string of allows values: 3821 exhaustive, top_values or automatic (default). 3822 type: string 3823 stopwords: 3824 description: > 3825 Name of the stopwords set to apply for this search, 3826 the keywords present in the set will be removed from the search query. 3827 type: string 3828 facet_return_parent: 3829 description: > 3830 Comma separated string of nested facet fields whose parent object should be returned in facet response. 3831 type: string 3832 voice_query: 3833 description: > 3834 The base64 encoded audio file in 16 khz 16-bit WAV format. 3835 type: string 3836 conversation: 3837 description: > 3838 Enable conversational search. 3839 type: boolean 3840 conversation_model_id: 3841 description: > 3842 The Id of Conversation Model to be used. 3843 type: string 3844 conversation_id: 3845 description: > 3846 The Id of a previous conversation to continue, this tells Typesense to include prior context when communicating with the LLM. 3847 type: string 3848 MultiSearchSearchesParameter: 3849 type: object 3850 required: 3851 - searches 3852 properties: 3853 union: 3854 type: boolean 3855 default: false 3856 description: When true, merges the search results from each search query into a single ordered set of hits. 3857 searches: 3858 type: array 3859 items: 3860 $ref: "#/components/schemas/MultiSearchCollectionParameters" 3861 MultiSearchCollectionParameters: 3862 allOf: 3863 - $ref: "#/components/schemas/MultiSearchParameters" 3864 - type: object 3865 properties: 3866 collection: 3867 type: string 3868 description: > 3869 The collection to search in. 3870 x-typesense-api-key: 3871 type: string 3872 description: A separate search API key for each search within a multi_search request 3873 rerank_hybrid_matches: 3874 type: boolean 3875 description: > 3876 When true, computes both text match and vector distance scores for all matches in hybrid search. 3877 Documents found only through keyword search will get a vector distance score, and 3878 documents found only through vector search will get a text match score. 3879 default: false 3880 FacetCounts: 3881 type: object 3882 properties: 3883 counts: 3884 type: array 3885 items: 3886 type: object 3887 properties: 3888 count: 3889 type: integer 3890 highlighted: 3891 type: string 3892 value: 3893 type: string 3894 parent: 3895 type: object 3896 field_name: 3897 type: string 3898 stats: 3899 type: object 3900 properties: 3901 max: 3902 type: number 3903 format: double 3904 min: 3905 type: number 3906 format: double 3907 sum: 3908 type: number 3909 format: double 3910 total_values: 3911 type: integer 3912 avg: 3913 type: number 3914 format: double 3915 AnalyticsEventCreateResponse: 3916 type: object 3917 required: 3918 - ok 3919 properties: 3920 ok: 3921 type: boolean 3922 AnalyticsEvent: 3923 type: object 3924 required: 3925 - name 3926 - event_type 3927 - data 3928 properties: 3929 name: 3930 type: string 3931 description: Name of the analytics rule this event corresponds to 3932 event_type: 3933 type: string 3934 description: Type of event (e.g., click, conversion, query, visit) 3935 data: 3936 type: object 3937 description: Event payload 3938 properties: 3939 user_id: 3940 type: string 3941 doc_id: 3942 type: string 3943 doc_ids: 3944 type: array 3945 items: 3946 type: string 3947 q: 3948 type: string 3949 analytics_tag: 3950 type: string 3951 AnalyticsEventsResponse: 3952 type: object 3953 required: 3954 - events 3955 properties: 3956 events: 3957 type: array 3958 items: 3959 type: object 3960 properties: 3961 name: { type: string } 3962 event_type: { type: string } 3963 collection: { type: string } 3964 timestamp: { type: integer, format: int64 } 3965 user_id: { type: string } 3966 doc_id: { type: string } 3967 doc_ids: 3968 type: array 3969 items: { type: string } 3970 query: { type: string } 3971 AnalyticsRuleCreate: 3972 type: object 3973 required: 3974 - name 3975 - type 3976 - collection 3977 - event_type 3978 properties: 3979 name: 3980 type: string 3981 type: 3982 $ref: "#/components/schemas/AnalyticsRuleType" 3983 collection: 3984 type: string 3985 event_type: 3986 type: string 3987 rule_tag: 3988 type: string 3989 params: 3990 type: object 3991 properties: 3992 destination_collection: 3993 type: string 3994 limit: 3995 type: integer 3996 capture_search_requests: 3997 type: boolean 3998 meta_fields: 3999 type: array 4000 items: { type: string } 4001 expand_query: 4002 type: boolean 4003 counter_field: 4004 type: string 4005 weight: 4006 type: integer 4007 AnalyticsRuleType: 4008 type: string 4009 enum: [popular_queries, nohits_queries, counter, log] 4010 AnalyticsRuleUpdate: 4011 type: object 4012 description: Fields allowed to update on an analytics rule 4013 properties: 4014 name: 4015 type: string 4016 rule_tag: 4017 type: string 4018 params: 4019 type: object 4020 properties: 4021 destination_collection: 4022 type: string 4023 limit: 4024 type: integer 4025 capture_search_requests: 4026 type: boolean 4027 meta_fields: 4028 type: array 4029 items: { type: string } 4030 expand_query: 4031 type: boolean 4032 counter_field: 4033 type: string 4034 weight: 4035 type: integer 4036 AnalyticsRule: 4037 allOf: 4038 - $ref: '#/components/schemas/AnalyticsRuleCreate' 4039 - type: object 4040 AnalyticsStatus: 4041 type: object 4042 properties: 4043 popular_prefix_queries: { type: integer } 4044 nohits_prefix_queries: { type: integer } 4045 log_prefix_queries: { type: integer } 4046 query_log_events: { type: integer } 4047 query_counter_events: { type: integer } 4048 doc_log_events: { type: integer } 4049 doc_counter_events: { type: integer } 4050 4051 APIStatsResponse: 4052 type: object 4053 properties: 4054 delete_latency_ms: 4055 type: number 4056 format: double 4057 delete_requests_per_second: 4058 type: number 4059 format: double 4060 import_latency_ms: 4061 type: number 4062 format: double 4063 import_requests_per_second: 4064 type: number 4065 format: double 4066 latency_ms: 4067 type: object 4068 x-go-type: "map[string]float64" 4069 overloaded_requests_per_second: 4070 type: number 4071 format: double 4072 pending_write_batches: 4073 type: number 4074 format: double 4075 requests_per_second: 4076 type: object 4077 x-go-type: "map[string]float64" 4078 search_latency_ms: 4079 type: number 4080 format: double 4081 search_requests_per_second: 4082 type: number 4083 format: double 4084 total_requests_per_second: 4085 type: number 4086 format: double 4087 write_latency_ms: 4088 type: number 4089 format: double 4090 write_requests_per_second: 4091 type: number 4092 format: double 4093 StopwordsSetUpsertSchema: 4094 type: object 4095 properties: 4096 stopwords: 4097 type: array 4098 items: 4099 type: string 4100 locale: 4101 type: string 4102 required: 4103 - stopwords 4104 example: | 4105 {"stopwords": ["Germany", "France", "Italy"], "locale": "en"} 4106 StopwordsSetSchema: 4107 type: object 4108 properties: 4109 id: 4110 type: string 4111 stopwords: 4112 type: array 4113 items: 4114 type: string 4115 locale: 4116 type: string 4117 required: 4118 - id 4119 - stopwords 4120 example: | 4121 {"id": "countries", "stopwords": ["Germany", "France", "Italy"], "locale": "en"} 4122 StopwordsSetRetrieveSchema: 4123 type: object 4124 properties: 4125 stopwords: 4126 $ref: "#/components/schemas/StopwordsSetSchema" 4127 required: 4128 - stopwords 4129 example: | 4130 {"stopwords": {"id": "countries", "stopwords": ["Germany", "France", "Italy"], "locale": "en"}} 4131 StopwordsSetsRetrieveAllSchema: 4132 type: object 4133 properties: 4134 stopwords: 4135 type: array 4136 items: 4137 $ref: "#/components/schemas/StopwordsSetSchema" 4138 required: 4139 - stopwords 4140 example: | 4141 {"stopwords": [{"id": "countries", "stopwords": ["Germany", "France", "Italy"], "locale": "en"}]} 4142 PresetUpsertSchema: 4143 properties: 4144 value: 4145 oneOf: 4146 - $ref: '#/components/schemas/SearchParameters' 4147 - $ref: '#/components/schemas/MultiSearchSearchesParameter' 4148 required: 4149 - value 4150 PresetSchema: 4151 allOf: 4152 - $ref: '#/components/schemas/PresetUpsertSchema' 4153 - type: object 4154 required: 4155 - name 4156 properties: 4157 name: 4158 type: string 4159 PresetsRetrieveSchema: 4160 type: object 4161 required: 4162 - presets 4163 properties: 4164 presets: 4165 type: array 4166 items: 4167 $ref: '#/components/schemas/PresetSchema' 4168 x-go-type: '[]*PresetSchema' 4169 PresetDeleteSchema: 4170 type: object 4171 required: 4172 - name 4173 properties: 4174 name: 4175 type: string 4176 DirtyValues: 4177 type: string 4178 enum: [coerce_or_reject, coerce_or_drop, drop, reject] 4179 IndexAction: 4180 type: string 4181 enum: [create, update, upsert, emplace] 4182 DropTokensMode: 4183 type: string 4184 enum: [right_to_left, left_to_right, both_sides:3] 4185 description: > 4186 Dictates the direction in which the words in the query must be dropped when the original words in the query do not appear in any document. 4187 Values: right_to_left (default), left_to_right, both_sides:3 4188 A note on both_sides:3 - for queries up to 3 tokens (words) in length, this mode will drop tokens from both sides and exhaustively rank all matching results. 4189 If query length is greater than 3 words, Typesense will just fallback to default behavior of right_to_left 4190 ConversationModelCreateSchema: 4191 required: 4192 - model_name 4193 - max_bytes 4194 allOf: 4195 - $ref: '#/components/schemas/ConversationModelUpdateSchema' 4196 - type: object 4197 required: 4198 - model_name 4199 - max_bytes 4200 - history_collection 4201 properties: 4202 model_name: 4203 description: Name of the LLM model offered by OpenAI, Cloudflare or vLLM 4204 type: string 4205 max_bytes: 4206 description: | 4207 The maximum number of bytes to send to the LLM in every API call. Consult the LLM's documentation on the number of bytes supported in the context window. 4208 type: integer 4209 history_collection: 4210 type: string 4211 description: Typesense collection that stores the historical conversations 4212 ConversationModelUpdateSchema: 4213 type: object 4214 properties: 4215 id: 4216 type: string 4217 description: An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. 4218 model_name: 4219 description: Name of the LLM model offered by OpenAI, Cloudflare or vLLM 4220 type: string 4221 api_key: 4222 description: The LLM service's API Key 4223 type: string 4224 history_collection: 4225 type: string 4226 description: Typesense collection that stores the historical conversations 4227 account_id: 4228 description: LLM service's account ID (only applicable for Cloudflare) 4229 type: string 4230 system_prompt: 4231 description: The system prompt that contains special instructions to the LLM 4232 type: string 4233 ttl: 4234 type: integer 4235 description: | 4236 Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) 4237 max_bytes: 4238 description: | 4239 The maximum number of bytes to send to the LLM in every API call. Consult the LLM's documentation on the number of bytes supported in the context window. 4240 type: integer 4241 vllm_url: 4242 description: URL of vLLM service 4243 type: string 4244 ConversationModelSchema: 4245 allOf: 4246 - $ref: '#/components/schemas/ConversationModelCreateSchema' 4247 - type: object 4248 required: 4249 - id 4250 properties: 4251 id: 4252 type: string 4253 description: An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. 4254 StemmingDictionary: 4255 type: object 4256 required: 4257 - id 4258 - words 4259 properties: 4260 id: 4261 type: string 4262 description: Unique identifier for the dictionary 4263 example: irregular-plurals 4264 words: 4265 type: array 4266 description: List of word mappings in the dictionary 4267 items: 4268 type: object 4269 required: 4270 - word 4271 - root 4272 properties: 4273 word: 4274 type: string 4275 description: The word form to be stemmed 4276 example: people 4277 root: 4278 type: string 4279 description: The root form of the word 4280 example: person 4281 NLSearchModelBase: 4282 type: object 4283 properties: 4284 model_name: 4285 type: string 4286 description: Name of the NL model to use 4287 api_key: 4288 type: string 4289 description: API key for the NL model service 4290 api_url: 4291 type: string 4292 description: Custom API URL for the NL model service 4293 max_bytes: 4294 type: integer 4295 description: Maximum number of bytes to process 4296 temperature: 4297 type: number 4298 description: Temperature parameter for the NL model 4299 system_prompt: 4300 type: string 4301 description: System prompt for the NL model 4302 top_p: 4303 type: number 4304 description: Top-p parameter for the NL model (Google-specific) 4305 top_k: 4306 type: integer 4307 description: Top-k parameter for the NL model (Google-specific) 4308 stop_sequences: 4309 type: array 4310 items: 4311 type: string 4312 description: Stop sequences for the NL model (Google-specific) 4313 api_version: 4314 type: string 4315 description: API version for the NL model service 4316 project_id: 4317 type: string 4318 description: Project ID for GCP Vertex AI 4319 access_token: 4320 type: string 4321 description: Access token for GCP Vertex AI 4322 refresh_token: 4323 type: string 4324 description: Refresh token for GCP Vertex AI 4325 client_id: 4326 type: string 4327 description: Client ID for GCP Vertex AI 4328 client_secret: 4329 type: string 4330 description: Client secret for GCP Vertex AI 4331 region: 4332 type: string 4333 description: Region for GCP Vertex AI 4334 max_output_tokens: 4335 type: integer 4336 description: Maximum output tokens for GCP Vertex AI 4337 account_id: 4338 type: string 4339 description: Account ID for Cloudflare-specific models 4340 4341 NLSearchModelCreateSchema: 4342 allOf: 4343 - $ref: '#/components/schemas/NLSearchModelBase' 4344 - type: object 4345 properties: 4346 id: 4347 type: string 4348 description: Optional ID for the NL search model 4349 4350 NLSearchModelSchema: 4351 allOf: 4352 - $ref: '#/components/schemas/NLSearchModelCreateSchema' 4353 - type: object 4354 required: 4355 - id 4356 properties: 4357 id: 4358 type: string 4359 description: ID of the NL search model 4360 4361 NLSearchModelUpdateSchema: 4362 $ref: '#/components/schemas/NLSearchModelCreateSchema' 4363 4364 NLSearchModelDeleteSchema: 4365 type: object 4366 required: 4367 - id 4368 properties: 4369 id: 4370 type: string 4371 description: ID of the deleted NL search model 4372 4373 SynonymItemUpsertSchema: 4374 type: object 4375 required: 4376 - synonyms 4377 properties: 4378 synonyms: 4379 type: array 4380 description: Array of words that should be considered as synonyms 4381 items: 4382 type: string 4383 root: 4384 type: string 4385 description: For 1-way synonyms, indicates the root word that words in the synonyms parameter map to 4386 locale: 4387 type: string 4388 description: Locale for the synonym, leave blank to use the standard tokenizer 4389 symbols_to_index: 4390 type: array 4391 description: By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is 4392 items: 4393 type: string 4394 4395 SynonymItemSchema: 4396 allOf: 4397 - type: object 4398 required: 4399 - id 4400 properties: 4401 id: 4402 type: string 4403 description: Unique identifier for the synonym item 4404 - $ref: "#/components/schemas/SynonymItemUpsertSchema" 4405 4406 SynonymSetCreateSchema: 4407 type: object 4408 required: 4409 - items 4410 properties: 4411 items: 4412 type: array 4413 description: Array of synonym items 4414 items: 4415 $ref: "#/components/schemas/SynonymItemSchema" 4416 4417 SynonymSetSchema: 4418 allOf: 4419 - $ref: "#/components/schemas/SynonymSetCreateSchema" 4420 - type: object 4421 required: 4422 - name 4423 properties: 4424 name: 4425 type: string 4426 description: Name of the synonym set 4427 4428 SynonymSetsRetrieveSchema: 4429 type: object 4430 required: 4431 - synonym_sets 4432 properties: 4433 synonym_sets: 4434 type: array 4435 description: Array of synonym sets 4436 items: 4437 $ref: "#/components/schemas/SynonymSetSchema" 4438 4439 SynonymSetDeleteSchema: 4440 type: object 4441 required: 4442 - name 4443 properties: 4444 name: 4445 type: string 4446 description: Name of the deleted synonym set 4447 4448 SynonymItemDeleteSchema: 4449 type: object 4450 required: 4451 - id 4452 properties: 4453 id: 4454 type: string 4455 description: ID of the deleted synonym item 4456 4457 CurationItemCreateSchema: 4458 type: object 4459 required: 4460 - rule 4461 properties: 4462 rule: 4463 $ref: '#/components/schemas/CurationRule' 4464 includes: 4465 type: array 4466 description: 4467 List of document `id`s that should be included in the search results with their 4468 corresponding `position`s. 4469 items: 4470 $ref: '#/components/schemas/CurationInclude' 4471 excludes: 4472 type: array 4473 description: List of document `id`s that should be excluded from the search results. 4474 items: 4475 $ref: '#/components/schemas/CurationExclude' 4476 filter_by: 4477 type: string 4478 description: > 4479 A filter by clause that is applied to any search query that matches the curation rule. 4480 remove_matched_tokens: 4481 type: boolean 4482 description: > 4483 Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. 4484 metadata: 4485 type: object 4486 description: > 4487 Return a custom JSON object in the Search API response, when this rule is triggered. This can can be used to display a pre-defined message (eg: a promotion banner) on the front-end when a particular rule is triggered. 4488 sort_by: 4489 type: string 4490 description: > 4491 A sort by clause that is applied to any search query that matches the curation rule. 4492 replace_query: 4493 type: string 4494 description: > 4495 Replaces the current search query with this value, when the search query matches the curation rule. 4496 filter_curated_hits: 4497 type: boolean 4498 description: > 4499 When set to true, the filter conditions of the query is applied to the curated records as well. 4500 Default: false. 4501 effective_from_ts: 4502 type: integer 4503 description: > 4504 A Unix timestamp that indicates the date/time from which the curation will be active. You can use this to create rules that start applying from a future point in time. 4505 effective_to_ts: 4506 type: integer 4507 description: > 4508 A Unix timestamp that indicates the date/time until which the curation will be active. You can use this to create rules that stop applying after a period of time. 4509 stop_processing: 4510 type: boolean 4511 description: > 4512 When set to true, curation processing will stop at the first matching rule. When set to false curation processing will continue and multiple curation actions will be triggered in sequence. 4513 Curations are processed in the lexical sort order of their id field. 4514 id: 4515 type: string 4516 description: ID of the curation item 4517 4518 4519 CurationItemSchema: 4520 allOf: 4521 - $ref: '#/components/schemas/CurationItemCreateSchema' 4522 - type: object 4523 required: 4524 - id 4525 properties: 4526 id: 4527 type: string 4528 4529 CurationSetCreateSchema: 4530 type: object 4531 required: 4532 - items 4533 properties: 4534 items: 4535 type: array 4536 description: Array of curation items 4537 items: 4538 $ref: '#/components/schemas/CurationItemCreateSchema' 4539 description: 4540 type: string 4541 description: Optional description for the curation set 4542 4543 CurationSetSchema: 4544 allOf: 4545 - $ref: '#/components/schemas/CurationSetCreateSchema' 4546 - type: object 4547 required: 4548 - name 4549 properties: 4550 name: 4551 type: string 4552 4553 CurationRule: 4554 type: object 4555 properties: 4556 tags: 4557 type: array 4558 description: List of tag values to associate with this curation rule. 4559 items: 4560 type: string 4561 query: 4562 type: string 4563 description: Indicates what search queries should be curated 4564 match: 4565 type: string 4566 description: > 4567 Indicates whether the match on the query term should be `exact` or `contains`. 4568 If we want to match all queries that contained the word `apple`, we will use the `contains` match instead. 4569 enum: 4570 - exact 4571 - contains 4572 filter_by: 4573 type: string 4574 description: > 4575 Indicates that the curation should apply when the filter_by parameter in a search query exactly matches the string specified here (including backticks, spaces, brackets, etc). 4576 4577 CurationInclude: 4578 type: object 4579 required: 4580 - id 4581 - position 4582 properties: 4583 id: 4584 type: string 4585 description: document id that should be included 4586 position: 4587 type: integer 4588 description: position number where document should be included in the search results 4589 4590 CurationExclude: 4591 type: object 4592 required: 4593 - id 4594 properties: 4595 id: 4596 type: string 4597 description: document id that should be excluded from the search results. 4598 4599 CurationSetDeleteSchema: 4600 type: object 4601 required: 4602 - name 4603 properties: 4604 name: 4605 type: string 4606 description: Name of the deleted curation set 4607 CurationItemDeleteSchema: 4608 type: object 4609 required: 4610 - id 4611 properties: 4612 id: 4613 type: string 4614 description: ID of the deleted curation item 4615 4616 securitySchemes: 4617 api_key_header: 4618 type: apiKey 4619 name: X-TYPESENSE-API-KEY 4620 in: header