<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>index on INFINI Pizza</title><link>/tags/index/</link><description>Recent content in index on INFINI Pizza</description><generator>Hugo -- gohugo.io</generator><atom:link href="/tags/index/index.xml" rel="self" type="application/rss+xml"/><item><title>Create a document</title><link>/docs/references/document/create/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/references/document/create/</guid><description>Create a document # Creates a new document.
Examples # Insert a JSON document into the my-collection collection:
POST /my-collection/_doc { &amp;#34;message&amp;#34;: &amp;#34;GET /search HTTP/1.1 200 1070000&amp;#34;, &amp;#34;org&amp;#34;: { &amp;#34;id&amp;#34;: &amp;#34;infini&amp;#34; } } The API returns the following result:
{ &amp;#34;_id&amp;#34;: &amp;#34;0,0&amp;#34;, &amp;#34;_version&amp;#34;: 1, &amp;#34;_namespace&amp;#34;: &amp;#34;default&amp;#34;, &amp;#34;_collection&amp;#34;: &amp;#34;my-collection&amp;#34;, &amp;#34;result&amp;#34;: &amp;#34;created&amp;#34;, ... } The API supports passing a customized UUID as the document identify, eg:
POST /my-collection/_doc/news_001 { &amp;#34;message&amp;#34;: &amp;#34;GET /search HTTP/1.</description></item><item><title>Create an index</title><link>/docs/references/index/create/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/references/index/create/</guid><description>Create an index # Creates a new index under a collectioin.
Examples # The following request creates a new index called my-index under collection my-namespace:my-collection
PUT /my-namespace:my-collection/_index/my_index Request # PUT /&amp;lt;target&amp;gt;/_index/&amp;lt;name&amp;gt; Path parameters # &amp;lt;target&amp;gt;
(Required, string) The collection which the index belongs to.
&amp;lt;name&amp;gt;
(Required, string) Name of the index you wish to create.</description></item><item><title>Delete an index</title><link>/docs/references/index/delete/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/references/index/delete/</guid><description>Delete an index # Deletes an existing index under a collectioin.
Examples # The following request deletes the index called my-index under collection my-namespace:my-collection
DELETE /my-namespace:my-collection/_index/my_index Request # DELETE /&amp;lt;target&amp;gt;/_index/&amp;lt;name&amp;gt; Path parameters # &amp;lt;target&amp;gt;
(Required, string) The collection which the index will be removed from.
&amp;lt;name&amp;gt;
(Required, string) Name of the index you wish to delete.</description></item><item><title>Get collection index</title><link>/docs/references/collection/get_index/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/references/collection/get_index/</guid><description>Get collection index # See the following documents:
Get index Get index alias Get index mapping Get index settings</description></item><item><title>Get index</title><link>/docs/references/index/get/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/references/index/get/</guid><description>Get index # Returns information about one or more indices
Examples # Get the information of all indices:
GET /_index Get the information of the index named my-index under collection my-collection:
GET /my-collection/_index/my-index Request # GET /_index GET /&amp;lt;target&amp;gt;/_index GET /&amp;lt;target&amp;gt;/_index/&amp;lt;index&amp;gt; Path Parameters # target
(Required, String) Comma-separated, names of the collections to specify (wildcard supported)
index
(Required, String) Comma-separated, names of the indices to get (wildcard supported)</description></item><item><title>Get index mapping</title><link>/docs/references/index/get_mapping/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/references/index/get_mapping/</guid><description>Get index mapping # Returns mapping information about one or more indices under the specified collection.
Examples # Get the mapping information of the my-index index under collection my-collection:
GET /my-collection/_index/my-index/_mapping Request # GET /&amp;lt;target&amp;gt;/_index/&amp;lt;index&amp;gt;/_mapping GET /&amp;lt;target&amp;gt;/_index/_mapping Path Parameters # target
(Required, String) Comma-separated, names of the collections to specify (wildcard supported)
index
(Optional, String) Comma-separated, names of the indices to get (wildcard supported)</description></item><item><title>Get index setting</title><link>/docs/references/index/get_settings/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/references/index/get_settings/</guid><description>Get index setting # Returns setting information about one or more indices under the specified collection.
Examples # Get the setting information of the my-index index under collection my-collection:
GET /my-collection/_index/my-index/_setting Request # GET /&amp;lt;target&amp;gt;/_index/&amp;lt;index&amp;gt;/_setting GET /&amp;lt;target&amp;gt;/_index/_setting Path Parameters # target
(Required, String) Comma-separated, names of the collections to specify (wildcard supported)
index
(Optional, String) Comma-separated, names of the indices to get (wildcard supported)</description></item><item><title>Index</title><link>/docs/references/index/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/references/index/</guid><description>Index # An index is a specialized data structure designed to improve search performance by efficiently organizing and storing data for quick retrieval. Each collection has a default index called default. You can create additional indices, each tailored to specific use cases to enhance search speed.
An index can manage various aspects such as mappings, settings, and aliases:
Mappings: Define the schema of the index layout, specifying how fields in the documents are indexed and stored.</description></item><item><title>Fetch a document</title><link>/docs/references/document/fetch/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/references/document/fetch/</guid><description>Fetch a document # Retrieve an existing document by specifying its unique identifier.
Examples # Fetch a document from the my-collection collection with customized uuid news_001:
GET /my-collection/_doc/news_001 The API returns the following result:
{ &amp;#34;_id&amp;#34;: &amp;#34;0,0&amp;#34;, &amp;#34;_version&amp;#34;: 1, &amp;#34;_collection&amp;#34;: &amp;#34;default:my-collection&amp;#34;, &amp;#34;_key&amp;#34; : &amp;#34;news_001&amp;#34;, &amp;#34;found&amp;#34;: true, &amp;#34;_source&amp;#34; : { &amp;#34;message&amp;#34;: &amp;#34;GET /search HTTP/1.1 200 1070000&amp;#34;, &amp;#34;org&amp;#34;: { &amp;#34;id&amp;#34;: &amp;#34;infini&amp;#34; } } } As you can see, the customized uuid are represented as _key within the document, and there is also a _id returned with value 0,0, this is the internal id generated by Pizza, and it is guaranteed to be unique, so you can also fetch this document by this value like this:</description></item><item><title>Replace a document</title><link>/docs/references/document/replace/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/references/document/replace/</guid><description>Replace a document # Replace an existing document by specifying its unique identifier and the new content.
Examples # Replace a document news_001 of the collection my-collection with new content:
PUT /my-collection/_doc/news_001 { &amp;#34;message&amp;#34;: &amp;#34;GET /search HTTP/1.1 200 1070000&amp;#34;, &amp;#34;org&amp;#34;: { &amp;#34;id&amp;#34;: &amp;#34;infinilabs&amp;#34; } } The API returns as following result:
{&amp;#34;_id&amp;#34;:&amp;#34;0,0&amp;#34;, &amp;#34;_key&amp;#34;:&amp;#34;news_001&amp;#34;, &amp;#34;result&amp;#34;:&amp;#34;updated&amp;#34;} After the document modification, If you perform the fetch request:
GET /my-collection/_doc/news_001 It returns an updated document like:</description></item><item><title>Partial update a document</title><link>/docs/references/document/partial_update/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/references/document/partial_update/</guid><description>Partial update a document # Sometimes we may only need to update a portion fields of the document.
Examples # Update the org.id field of the document news_001 in the collection my-collection:
PUT /my-collection/_doc/news_001/_update { &amp;#34;sync&amp;#34;:{ &amp;#34;replace&amp;#34;:{ &amp;#34;org&amp;#34;: { &amp;#34;id&amp;#34;: &amp;#34;infinilabs&amp;#34; } } } } The API returns as following result:
{&amp;#34;_id&amp;#34;:&amp;#34;0,0&amp;#34;, &amp;#34;_key&amp;#34;:&amp;#34;news_001&amp;#34;, &amp;#34;result&amp;#34;:&amp;#34;updated&amp;#34;} Pizza using the method of fetching a document, then merging partial updates and replacing it.</description></item><item><title>Delete a document</title><link>/docs/references/document/delete/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/references/document/delete/</guid><description>Delete a document # Delete a specific document from the specified collection by specifying its unique identifier.
Examples # Delete the document 0,0 from collection my-collection:
DELETE /my-collection/_doc/0,0 The API returns the following result:
{ &amp;#34;_id&amp;#34;: &amp;#34;0,0&amp;#34;, &amp;#34;result&amp;#34;: &amp;#34;deleted&amp;#34;, ... } Request # DELETE /&amp;lt;target&amp;gt;/_doc/&amp;lt;doc_id&amp;gt; Path parameters # &amp;lt;target&amp;gt;
(Required, string) Name of the collection to target. &amp;lt;doc_id&amp;gt;
(Required, string) Unique identifier for the document, support both _key or _id.</description></item><item><title>Batch document operation</title><link>/docs/references/document/bulk/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/references/document/bulk/</guid><description>Batch document operation # Provides a efficient way to perform multiple index, create, delete, and update operations in a single request.
Examples # POST /_bulk { &amp;#34;index&amp;#34; : { &amp;#34;_index&amp;#34; : &amp;#34;test&amp;#34;, &amp;#34;_id&amp;#34; : &amp;#34;1&amp;#34; } } { &amp;#34;field1&amp;#34; : &amp;#34;value1&amp;#34; } { &amp;#34;delete&amp;#34; : { &amp;#34;_index&amp;#34; : &amp;#34;test&amp;#34;, &amp;#34;_id&amp;#34; : &amp;#34;2&amp;#34; } } { &amp;#34;create&amp;#34; : { &amp;#34;_index&amp;#34; : &amp;#34;test&amp;#34;, &amp;#34;_id&amp;#34; : &amp;#34;3&amp;#34; } } { &amp;#34;field1&amp;#34; : &amp;#34;value3&amp;#34; } { &amp;#34;update&amp;#34; : {&amp;#34;_id&amp;#34; : &amp;#34;1&amp;#34;, &amp;#34;_index&amp;#34; : &amp;#34;test&amp;#34;} } { &amp;#34;doc&amp;#34; : {&amp;#34;field2&amp;#34; : &amp;#34;value2&amp;#34;} } The API returns the following result:</description></item></channel></rss>