Package org.elasticsearch.index.mapper.core.StringFieldMapper

Examples of org.elasticsearch.index.mapper.core.StringFieldMapper.ValueAndBoost


        this.analyzer = analyzer;
    }

    @Override
    protected void parseCreateField(ParseContext context, List<Field> fields) throws IOException {
        ValueAndBoost valueAndBoost = StringFieldMapper.parseCreateFieldForString(context, null /* Out null value is an int so we convert*/, boost);
        if (valueAndBoost.value() == null && nullValue() == null) {
            return;
        }

        if (fieldType.indexOptions() != IndexOptions.NONE || fieldType.stored() || hasDocValues()) {
            int count;
            if (valueAndBoost.value() == null) {
                count = nullValue();
            } else {
                count = countPositions(analyzer.analyzer().tokenStream(name(), valueAndBoost.value()));
            }
            addIntegerFields(context, fields, count, valueAndBoost.boost());
        }
        if (fields.isEmpty()) {
            context.ignoredValue(names.indexName(), valueAndBoost.value());
        }
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.index.mapper.core.StringFieldMapper.ValueAndBoost

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.