LowLevel Support for using PUT to set Settings and Mappings at same time
See original GitHub issueI am trying to set up an Edge NGram Tokenizer on my index. I currently create the index mapping using Client.LowLevel.IndicesPutMappingPost
which I get from a .json file.
I was hoping to add Settings to this .json file and submit them along with the mapping in one shot.
Example from Documentation:
PUT my_index
{
"settings": {
"analysis": {
"analyzer": {
"autocomplete": {
"tokenizer": "autocomplete",
"filter": [
"lowercase"
]
},
"autocomplete_search": {
"tokenizer": "lowercase"
}
},
"tokenizer": {
"autocomplete": {
"type": "edge_ngram",
"min_gram": 2,
"max_gram": 10,
"token_chars": [
"letter"
]
}
}
}
},
"mappings": {
"doc": {
"properties": {
"title": {
"type": "text",
"analyzer": "autocomplete",
"search_analyzer": "autocomplete_search"
}
}
}
}
}
I tried using Client.LowLevel.IndexPut
but this requires a type
, which is not allowed in the example above.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Configure an index using a low level rest Client
I want to create a new index and to do this I am following the ... indexSettings = Settings.builder() .put("index.number_of_shards", ...
Read more >Index mapping request in ElasticSearch using NEST in C# ...
To make a call with the low level client to create an index and mapping at the same time var client = new...
Read more >Low-level Python client
This getting started guide illustrates how to connect to OpenSearch, index documents, and run queries. For the client source code, see the opensearch-py...
Read more >Mappings and field types
This section provides an example for how to create an index mapping and how to add a document to it that will get...
Read more >Hibernate Search 6.2.1.Final: Reference Documentation
Hibernate Search, full text search for your entities - Reference Documentation.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You’re absolutely one of the use cases of the low level client, I am beyond happy you found a home there even when the high level client was not your cup of tea 👍 💯
PUT my_index
Is exposed under
client.LowLevel.IndicesCreate
IndexPut
is a PUT operation on/index/type/id
e.g the Index APIhttps://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#_automatic_id_generation