Index request does not work after adding mapping to the index

Hello,

I have a problem with adding new documents to an index (called "map") when there is already mapping defined. When the mapping does not exist then I am able to create new documents from my Java program. Here is the mapping that blocks inserting new documents:

PUT map/_mapping/map
{
"properties" : {
"search_popularity_last_hit_date": {
"type": "date"
},
"search_popularity_last_score": {
"type": "double"
}
}
}

The Java program uses the IndexRequest class to create new documents. It looks like that it runs okay because there are no errors reported but the documents are not created at all.

Any idea what can be the problem?

Best,
Antal Nagy

What document type are you using in your Java application? Assuming you are using Elasticsearch 6.x, you can only have one document type per index. The mapping you posted defines a mapping for a document type called map. If your Java application uses another document type, then that is the cause of your problem.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.