/** * The source of the document (As a map). */ @SuppressWarnings({"unchecked"}) public Map<String, Object> sourceAsMap() throws ElasticsearchParseException { if (source == null) { return null; } if (sourceAsMap != null) { return sourceAsMap; } sourceAsMap = SourceLookup.sourceAsMap(source); return sourceAsMap; }
/** * The source of the document as a map (can be {@code null}). */ public Map<String, Object> getSourceAsMap() { if (source == null) { return null; } if (sourceAsMap != null) { return sourceAsMap; } sourceAsMap = SourceLookup.sourceAsMap(source); return sourceAsMap; }
@SuppressWarnings({"unchecked"}) @Override public Map<String, Object> sourceAsMap() throws ElasticsearchParseException { if (source == null) { return null; } if (sourceAsMap != null) { return sourceAsMap; } sourceAsMap = SourceLookup.sourceAsMap(source); return sourceAsMap; }
/** * The source of the document as a map (can be {@code null}). */ public Map<String, Object> getSourceAsMap() { if (source == null) { return null; } if (sourceAsMap != null) { return sourceAsMap; } sourceAsMap = SourceLookup.sourceAsMap(source); return sourceAsMap; }
/** * The source of the document (As a map). */ @SuppressWarnings({"unchecked"}) public Map<String, Object> sourceAsMap() throws ElasticsearchParseException { if (source == null) { return null; } if (sourceAsMap != null) { return sourceAsMap; } sourceAsMap = SourceLookup.sourceAsMap(source); return sourceAsMap; }
/** * The source of the document as a map (can be <tt>null</tt>). */ public Map<String, Object> getSourceAsMap() throws ElasticsearchParseException { if (source == null) { return null; } if (sourceAsMap != null) { return sourceAsMap; } sourceAsMap = SourceLookup.sourceAsMap(source); return sourceAsMap; }
/** * The source of the document (As a map). */ @SuppressWarnings({"unchecked"}) public Map<String, Object> sourceAsMap() throws ElasticsearchParseException { if (source == null) { return null; } if (sourceAsMap != null) { return sourceAsMap; } sourceAsMap = SourceLookup.sourceAsMap(source); return sourceAsMap; }
/** * The source of the document as a map (can be {@code null}). */ public Map<String, Object> getSourceAsMap() { if (source == null) { return null; } if (sourceAsMap != null) { return sourceAsMap; } sourceAsMap = SourceLookup.sourceAsMap(source); return sourceAsMap; }
/** * The source of the document (As a map). */ @SuppressWarnings({"unchecked"}) public Map<String, Object> sourceAsMap() throws ElasticsearchParseException { if (source == null) { return null; } if (sourceAsMap != null) { return sourceAsMap; } sourceAsMap = SourceLookup.sourceAsMap(source); return sourceAsMap; }
/** * The source of the document (As a map). */ @SuppressWarnings({"unchecked"}) public Map<String, Object> sourceAsMap() throws ElasticsearchParseException { if (source == null) { return null; } if (sourceAsMap != null) { return sourceAsMap; } sourceAsMap = SourceLookup.sourceAsMap(source); return sourceAsMap; }
public JsonDocumentModelReader(String json) { byte[] bytes = json.getBytes(); source = SourceLookup.sourceAsMap(new BytesArray(bytes, 0, bytes.length)); }
try { final Map<String, Object> sourceMap = SourceLookup .sourceAsMap(content); if (RECOMMENDED_ITEMS_FROM_USER.equals(action)) { final ItemsFromUserHandler handler = new ItemsFromUserHandler(
@Override public ActionListener<SearchResponse> wrap(SearchRequest request, ActionListener<SearchResponse> listener) throws CannotWrapException { checkCorrectType(request); checkScroll(request); checkNotAlreadyWrapped(request); checkSource(request); checkIndex(request); final long startTime = System.nanoTime(); final Map<String, Object> source = SourceLookup.sourceAsMap(request.source()); warnIfQueryBinary(source); final int size = NumberUtil.getInt(source.get(SIZE), 10); final int from = NumberUtil.getInt(source.get(FROM), 0); checkSizeAndFrom(size, from); final IndexInfo scriptInfo = getScriptInfo(request.indices()[0]); List<SearchResultModifier> modifiers = produceModifiers(scriptInfo, source); request.source(buildBytes(source)); return createActionListener(request, listener, source, size, from, new WrappingActionListener(listener, startTime, modifiers, scriptInfo, settings)); }