0

I have Elasticsearch 2.3.2 and Lucene 5.5.0. Some indexes were already existing in my nodes with documents. To search them I was using

GET /index/type/id

But when I created a new index. I have to search with

GET /index/type/id?routing=routing_name

To search with previous query method how should I create Index. I do see that records mapping structure is same as old data. Also, why do I need to specify routing? In previous, it was not the case.

According to ElasticSearch documentation by default, we don't need to specify routing as id is default routing parameter. also, I have not specified {routing: {required: true}}anywhere while creating an index or adding a record.

owais
  • 4,752
  • 5
  • 31
  • 41
  • It seems that routing came into action because of some config, upon the new index creation. Have a look at: https://stackoverflow.com/a/34171199/945214 – gargkshitiz May 11 '18 at 06:15
  • Are you indexing your documents using custom _route parameter? – Aman B May 17 '18 at 08:05
  • Do you have _routing required in your mapping? e.g. `"mappings": { "_doc": { "_routing": { "required": true } } }` – Aman B May 17 '18 at 08:06
  • Did you create a parent-child relationship in your new index? – Archit Saxena May 18 '18 at 11:06
  • please post the mapping for the index which requires routing and does not require routing ? It very well could be picking it up from index templates ? Would be speculating without the mapping – keety May 21 '18 at 14:30

0 Answers0