/** * Returns the document identifier. */ public DocId getDocId() { if (docId == null) { docId = block.getIdExtractor().getDocId(doc); } return docId; }
/** * Returns the document identifier. */ public DocId getDocId() { if (docId == null) { docId = block.getIdExtractor().getDocId(doc); } return docId; }
private void execute(OperationContext ctx, CRUDFindRequest findRequest, List<QueryPlanDoc> parents) { OperationContext nodeCtx=ctx.getDerivedOperationContext(node.getMetadata().getName(),findRequest); LOGGER.debug("execute {}: entity={}, findRequest.query={}, projection={}, sort={}", node.getName(), nodeCtx.getEntityName(), findRequest.getQuery(),findRequest.getProjection(),findRequest.getSort()); // note the response is not used, but find method changes the supplied context. finder.find(nodeCtx,findRequest); LOGGER.debug("execute {}: storing documents", node.getName()); for(DocCtx doc:nodeCtx.getDocuments()) { DocId id=docIdx.getDocId(doc.getOutputDocument()); if(documentCache!=null) { JsonDoc jdoc=documentCache.get(id); if(jdoc==null) { jdoc=doc.getOutputDocument(); documentCache.put(id,jdoc); } } QueryPlanDoc qplanDoc=new QueryPlanDoc(doc.getOutputDocument(),id,node); docs.add(qplanDoc); } if(parents!=null) { for(QueryPlanDoc parent:parents) { parent.addChildren(node,docs); } } } }
DocCtx doc=docStream.next(); if(!doc.hasErrors()) { DocId id = docIdx.getDocId(doc); List<QueryExpression> idList = new ArrayList<>(identityFields.length); for (int ix = 0; ix < identityFields.length; ix++) {
DocCtx doc=docStream.next(); if(!doc.hasErrors()) { DocId id = docIdx.getDocId(doc); List<QueryExpression> idList = new ArrayList<>(identityFields.length); for (int ix = 0; ix < identityFields.length; ix++) {