Package org.elasticsearch.common.xcontent.XContentParser

Examples of org.elasticsearch.common.xcontent.XContentParser.NumberType


                        weight = weightValue.longValue(); // always parse a long to make sure we don't get overflow
                        checkWeight(weight);
                    }
                } else if (token == XContentParser.Token.VALUE_NUMBER) {
                    if (Fields.CONTENT_FIELD_NAME_WEIGHT.equals(currentFieldName)) {
                        NumberType numberType = parser.numberType();
                        if (NumberType.LONG != numberType && NumberType.INT != numberType) {
                            throw new ElasticsearchIllegalArgumentException("Weight must be an integer, but was [" + parser.numberValue() + "]");
                        }
                        weight = parser.longValue(); // always parse a long to make sure we don't get overflow
                        checkWeight(weight);
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.xcontent.XContentParser.NumberType

Copyright © 2018 www.massapicom. 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.