14,953
edits
No edit summary |
|||
| Line 27: | Line 27: | ||
== Create the index == | == Create the index == | ||
Elasticsearch: [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#mappings Create index API | Elasticsearch Guide [8.15] | Elastic] | Elasticsearch: [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#mappings Create index API | Elasticsearch Guide [8.15] | Elastic]<ref>[https://opster.com/guides/elasticsearch/search-apis/elasticsearch-strings-keyword-vs-text-vs-wildcard/ Elasticsearch Keyword VS. Text - Strings Types Explained]</ref> | ||
<pre> | <pre> | ||
PUT /MY_INXEX | PUT /MY_INXEX | ||
| Line 33: | Line 33: | ||
"mappings": { | "mappings": { | ||
"properties": { | "properties": { | ||
"id": { "type": "keyword" }, | |||
"field1": { "type": "text" } | "field1": { "type": "text" } | ||
} | } | ||
| Line 47: | Line 48: | ||
) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; | ) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; | ||
</pre> | </pre> | ||
== References == | == References == | ||