elastic.co/guide/en/elasticsearch/reference/1.7/disk.html

я пытаюсь отправить несколько документов в индекс с упругим поисковым индексом, выдается следующее исключение, и вставка не завершена.

org.elasticsearch.action.NoShardAvailableActionException

Эластичный поиск verion используется :asticsearch-1.7.2

Исключение в деталях:

Caused by: org.elasticsearch.action.NoShardAvailableActionException: [test_events_20170805][0] null
at org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.perform(TransportShardSingleOperationAction.java:175)
at org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.start(TransportShardSingleOperationAction.java:155)
at org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:89)
at org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:55)
at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:75)
at org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$TransportHandler.messageReceived(TransportShardSingleOperationAction.java:258)
at org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$TransportHandler.messageReceived(TransportShardSingleOperationAction.java:240)
at org.elasticsearch.transport.netty.MessageChannelHandler.handleRequest(MessageChannelHandler.java:222)
at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:114)
at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)

Заранее спасибо!

Ниже показано состояние моего кластера: curl -XGET 'HTTP: // локальный: 9200 / _cluster / здоровье довольно = верно'

{
  "cluster_name" : "test-services",
  "status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 377,
  "active_shards" : 377,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 377,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0
}

Ниже приведен шаблон для создания индекса

{
"template" : "test_events_*"
     , "settings" : {
        "analysis": {
        "analyzer": {
            "std_with_spaces": {
                "type": "custom",
                "tokenizer": "keyword",
                "filter": ["lowercase", "asciifolding"]
            }
        }
    }
    , "number_of_shards" : 1
}
, "mappings" :
{ "TestEvent" : { "dynamic": "strict", "_meta" : { "authority": "com.test", "type": "published", "version": "1" }, "properties" : {
"aliasName" : { "type" : "string", "description" : "The aliasName is free text human readable name." }
, "description" : { "type" : "string", "description" : "The description is a free human readable text describing or naming the object." }
, "id" : { "type" : "string", "index" : "not_analyzed", "description" : "Master resource identifier" }
, "association" : { "type" : "string", "index" : "not_analyzed", "description" : "Contains links or IDs to associated documents and content." }
, "name" : { "type" : "string", "analyzer" : "std_with_spaces", "description" : "The name is any free human readable and possibly non unique text naming the object." }
, "tag" : { "type" : "string" }
, "recordDateTime" : { "type" : "date" }
, "systemOfRecord" : { "type" : "string", "analyzer" : "std_with_spaces" }
, "createdDateTime" : { "type" : "date" }
 }}}
}

Ниже приведен фрагмент сценария вставки данных:

PUT /website/blog/123 /* this might not be correct, written for an idea*/
{
  "id": "EDE-1",
  "description":  "Just trying this out...",
  "createdDateTime":  "2017-08-28T02:12:21",
  "recordDateTime":  "2017-08-28T02:12:21",
  "aliasName": "test",
  "name": "test_name",
  "association": "test_association",
  "tag": "tag1",
  "systemOfRecord": "record1"
}

Примечание: фрагмент вставки данных - это фиктивные данные, которые я создал. Но в целом, данные представлены в моей заявке в CSV-файл. Приложение преобразует данные csv в объект json и вставляет их в датированный индекс.

Ответы на вопрос(0)

Ваш ответ на вопрос