Examples of ElasticsearchParseException


Examples of org.elasticsearch.ElasticsearchParseException

                    } else if ("from_node".equals(currentFieldName) || "fromNode".equals(currentFieldName)) {
                        fromNode = parser.text();
                    } else if ("to_node".equals(currentFieldName) || "toNode".equals(currentFieldName)) {
                        toNode = parser.text();
                    } else {
                        throw new ElasticsearchParseException("[move] command does not support field [" + currentFieldName + "]");
                    }
                } else {
                    throw new ElasticsearchParseException("[move] command does not support complex json tokens [" + token + "]");
                }
            }
            if (index == null) {
                throw new ElasticsearchParseException("[move] command missing the index parameter");
            }
            if (shardId == -1) {
                throw new ElasticsearchParseException("[move] command missing the shard parameter");
            }
            if (fromNode == null) {
                throw new ElasticsearchParseException("[move] command missing the from_node parameter");
            }
            if (toNode == null) {
                throw new ElasticsearchParseException("[move] command missing the to_node parameter");
            }
            return new MoveAllocationCommand(new ShardId(index, shardId), fromNode, toNode);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.