Package org.elasticsearch.common.xcontent

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


            } else {
                builder.startArray("mappings");
                for (ObjectObjectCursor<String, CompressedString> cursor : indexTemplateMetaData.mappings()) {
                    byte[] data = cursor.value.uncompressed();
                    XContentParser parser = XContentFactory.xContent(data).createParser(data);
                    Map<String, Object> mapping = parser.mapOrderedAndClose();
                    builder.map(mapping);
                }
                builder.endArray();
            }
View Full Code Here


            try {
                // TODO: we should avoid reparsing search_request here
                // but it's terribly difficult to slice the underlying byte
                // buffer to get just the search request.
                parser = XContentFactory.xContent(source).createParser(source);
                Map<String, Object> asMap = parser.mapOrderedAndClose();

                String queryHint = (String) asMap.get("query_hint");
                if (queryHint != null) {
                    setQueryHint(queryHint);
                }
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.