Package org.elasticsearch.common.xcontent

Examples of org.elasticsearch.common.xcontent.XContentParser.text()


        while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {
            if (token == XContentParser.Token.FIELD_NAME) {
                currentFieldName = parser.currentName();
            } else if (token.isValue()) {
                if ("_name".equals(currentFieldName)) {
                    filterName = parser.text();
                } else if ("_cache".equals(currentFieldName)) {
                    cache = parser.booleanValue();
                } else if ("_cache_key".equals(currentFieldName) || "_cacheKey".equals(currentFieldName)) {
                    cacheKey = new CacheKeyFilter.Key(parser.text());
                } else {
View Full Code Here


                if ("_name".equals(currentFieldName)) {
                    filterName = parser.text();
                } else if ("_cache".equals(currentFieldName)) {
                    cache = parser.booleanValue();
                } else if ("_cache_key".equals(currentFieldName) || "_cacheKey".equals(currentFieldName)) {
                    cacheKey = new CacheKeyFilter.Key(parser.text());
                } else {
                    fieldName = currentFieldName;
                    value = parser.text();
                }
            }
View Full Code Here

                    cache = parser.booleanValue();
                } else if ("_cache_key".equals(currentFieldName) || "_cacheKey".equals(currentFieldName)) {
                    cacheKey = new CacheKeyFilter.Key(parser.text());
                } else {
                    fieldName = currentFieldName;
                    value = parser.text();
                }
            }
        }

        if (fieldName == null) {
View Full Code Here

                currentFieldName = parser.currentName();
            } else if (token.isValue()) {
                if ("boost".equals(currentFieldName)) {
                    boost = parser.floatValue();
                } else if ("norms_field".equals(currentFieldName) || "normsField".equals(currentFieldName)) {
                    normsField = parseContext.indexName(parser.text());
                }
            }
        }

        if (boost == 1.0f && normsField == null) {
View Full Code Here

        while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {
            if (token == XContentParser.Token.FIELD_NAME) {
                currentFieldName = parser.currentName();
            } else if (token.isValue()) {
                if ("field".equals(currentFieldName)) {
                    fieldName = parser.text();
                } else if ("_name".equals(currentFieldName)) {
                    filterName = parser.text();
                }
            }
        }
View Full Code Here

                currentFieldName = parser.currentName();
            } else if (token.isValue()) {
                if ("field".equals(currentFieldName)) {
                    fieldName = parser.text();
                } else if ("_name".equals(currentFieldName)) {
                    filterName = parser.text();
                }
            }
        }

        if (fieldName == null) {
View Full Code Here

                if ("boost".equals(currentFieldName)) {
                    boost = parser.floatValue();
                } else if ("_cache".equals(currentFieldName)) {
                    cache = parser.booleanValue();
                } else if ("_cache_key".equals(currentFieldName) || "_cacheKey".equals(currentFieldName)) {
                    cacheKey = new CacheKeyFilter.Key(parser.text());
                }
            }
        }
        if (query == null) {
            throw new QueryParsingException(parseContext.index(), "[filtered] requires 'query' element");
View Full Code Here

                } else if ("filter".equals(currentFieldName)) {
                    filter = parseContext.parseInnerFilter();
                }
            } else if (token.isValue()) {
                if ("path".equals(currentFieldName)) {
                    path = parser.text();
                } else if ("boost".equals(currentFieldName)) {
                    boost = parser.floatValue();
                } else if ("_scope".equals(currentFieldName)) {
                    scope = parser.text();
                } else if ("score_mode".equals(currentFieldName) || "scoreMode".equals(scoreMode)) {
View Full Code Here

                if ("path".equals(currentFieldName)) {
                    path = parser.text();
                } else if ("boost".equals(currentFieldName)) {
                    boost = parser.floatValue();
                } else if ("_scope".equals(currentFieldName)) {
                    scope = parser.text();
                } else if ("score_mode".equals(currentFieldName) || "scoreMode".equals(scoreMode)) {
                    String sScoreMode = parser.text();
                    if ("avg".equals(sScoreMode)) {
                        scoreMode = BlockJoinQuery.ScoreMode.Avg;
                    } else if ("max".equals(sScoreMode)) {
View Full Code Here

                } else if ("boost".equals(currentFieldName)) {
                    boost = parser.floatValue();
                } else if ("_scope".equals(currentFieldName)) {
                    scope = parser.text();
                } else if ("score_mode".equals(currentFieldName) || "scoreMode".equals(scoreMode)) {
                    String sScoreMode = parser.text();
                    if ("avg".equals(sScoreMode)) {
                        scoreMode = BlockJoinQuery.ScoreMode.Avg;
                    } else if ("max".equals(sScoreMode)) {
                        scoreMode = BlockJoinQuery.ScoreMode.Max;
                    } else if ("total".equals(sScoreMode)) {
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.