Examples of stored()


Examples of org.elasticsearch.index.mapper.FieldMapper.stored()

                    Formatter formatter = new SimpleHTMLFormatter(field.preTags()[0], field.postTags()[0]);
                    Highlighter highlighter = new Highlighter(formatter, DEFAULT_ENCODER, queryScorer);
                    highlighter.setTextFragmenter(fragmenter);

                    List<Object> textsToHighlight;
                    if (mapper.stored()) {
                        try {
                            Document doc = hitContext.reader().document(hitContext.docId(), new SingleFieldSelector(mapper.names().indexName()));
                            textsToHighlight = new ArrayList<Object>(doc.getFields().size());
                            for (Fieldable docField : doc.getFields()) {
                                if (docField.stringValue() != null) {
View Full Code Here

Examples of org.elasticsearch.index.mapper.FieldMapper.stored()

                        added = true;
                        context.fieldNames().add("*");
                    } else {
                        FieldMapper fieldMapper = context.mapperService().smartNameFieldMapper(name);
                        if (fieldMapper != null) {
                            if (fieldMapper.stored()) {
                                added = true;
                                context.fieldNames().add(name);
                            } else {
                                SearchScript searchScript = context.scriptService().search(context.lookup(), "mvel", "_source." + fieldMapper.names().fullName(), null);
                                context.scriptFields().add(new ScriptFieldsContext.ScriptField(name, searchScript, true));
View Full Code Here

Examples of org.elasticsearch.index.mapper.FieldMapper.stored()

                if ("*".equals(name)) {
                    context.fieldNames().add("*");
                } else {
                    FieldMapper fieldMapper = context.mapperService().smartNameFieldMapper(name);
                    if (fieldMapper != null) {
                        if (fieldMapper.stored()) {
                            context.fieldNames().add(name);
                        } else {
                            SearchScript searchScript = context.scriptService().search(context.lookup(), "mvel", "_source." + fieldMapper.names().fullName(), null);
                            context.scriptFields().add(new ScriptFieldsContext.ScriptField(name, searchScript, true));
                        }
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.