mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 15:17:30 -04:00
[DOCS] Update my-index examples (#60132)
Changes the following example index names to `my-index-000001` for consistency: * `my-index` * `my_index` * `myindex`
This commit is contained in:
parent
20c5f7edff
commit
441c3a21b1
150 changed files with 593 additions and 592 deletions
|
@ -46,19 +46,19 @@ relevance `_score` of each document:
|
|||
|
||||
[source,console]
|
||||
-------------------------------------
|
||||
PUT my_index/_doc/1?refresh
|
||||
PUT my-index-000001/_doc/1?refresh
|
||||
{
|
||||
"text": "quick brown fox",
|
||||
"popularity": 1
|
||||
}
|
||||
|
||||
PUT my_index/_doc/2?refresh
|
||||
PUT my-index-000001/_doc/2?refresh
|
||||
{
|
||||
"text": "quick fox",
|
||||
"popularity": 5
|
||||
}
|
||||
|
||||
GET my_index/_search
|
||||
GET my-index-000001/_search
|
||||
{
|
||||
"query": {
|
||||
"function_score": {
|
||||
|
@ -90,12 +90,12 @@ store, enabled by default on all fields except for <<text,analyzed `text` fields
|
|||
|
||||
[source,console]
|
||||
-------------------------------
|
||||
PUT my_index/_doc/1?refresh
|
||||
PUT my-index-000001/_doc/1?refresh
|
||||
{
|
||||
"cost_price": 100
|
||||
}
|
||||
|
||||
GET my_index/_search
|
||||
GET my-index-000001/_search
|
||||
{
|
||||
"script_fields": {
|
||||
"sales_price": {
|
||||
|
@ -167,7 +167,7 @@ For instance:
|
|||
|
||||
[source,console]
|
||||
-------------------------------
|
||||
PUT my_index
|
||||
PUT my-index-000001
|
||||
{
|
||||
"mappings": {
|
||||
"properties": {
|
||||
|
@ -181,13 +181,13 @@ PUT my_index
|
|||
}
|
||||
}
|
||||
|
||||
PUT my_index/_doc/1?refresh
|
||||
PUT my-index-000001/_doc/1?refresh
|
||||
{
|
||||
"first_name": "Barry",
|
||||
"last_name": "White"
|
||||
}
|
||||
|
||||
GET my_index/_search
|
||||
GET my-index-000001/_search
|
||||
{
|
||||
"script_fields": {
|
||||
"full_name": {
|
||||
|
@ -210,7 +210,7 @@ _Stored fields_ -- fields explicitly marked as
|
|||
|
||||
[source,console]
|
||||
-------------------------------
|
||||
PUT my_index
|
||||
PUT my-index-000001
|
||||
{
|
||||
"mappings": {
|
||||
"properties": {
|
||||
|
@ -226,13 +226,13 @@ PUT my_index
|
|||
}
|
||||
}
|
||||
|
||||
PUT my_index/_doc/1?refresh
|
||||
PUT my-index-000001/_doc/1?refresh
|
||||
{
|
||||
"full_name": "Alice Ball",
|
||||
"title": "Professor"
|
||||
}
|
||||
|
||||
GET my_index/_search
|
||||
GET my-index-000001/_search
|
||||
{
|
||||
"script_fields": {
|
||||
"name_with_title": {
|
||||
|
|
|
@ -22,12 +22,12 @@ For example, the following script is used in a search request to return a
|
|||
|
||||
[source,console]
|
||||
-------------------------------------
|
||||
PUT my_index/_doc/1
|
||||
PUT my-index-000001/_doc/1
|
||||
{
|
||||
"my_field": 5
|
||||
}
|
||||
|
||||
GET my_index/_search
|
||||
GET my-index-000001/_search
|
||||
{
|
||||
"script_fields": {
|
||||
"my_doubled_field": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue