Arjun Menon
Arjun Menon

Reputation: 703

Specifying data type and analyzer while creating index

I am using elastic search to index my data and i was able to do it with the following POST request http://localhost:9200/index/type/id { JSON data over here }

Yesterday while i was going through some of the elastic tutorials i found one person mentioning about setting analyzer to those fields where we are planning to do full text search.I found during my googling that mapping API can be used to update datatypes and analyzer, but in my case i want to do it as i am creating index.

How can i do it?

Upvotes: 0

Views: 144

Answers (1)

primoz
primoz

Reputation: 895

You can create index with custom settings (and mappings) in the first request and then index your data with second request. In this case you can not do both at the same time.

However if you index your data first and index does not exist yet, it will be created automatically with default settings. You can then update your mappings.

Source: Index

Upvotes: 1

Related Questions