/** * Constructs a json path with an offset. The offset will result an <tt>offset</tt> * number of path elements to not be included in {@link #pathAsText(String)}. */ public ContentPath(int offset) { this.delimiter = '.'; this.sb = new StringBuilder(); this.offset = offset; reset(); }
public void reset(XContentParser parser, Document document, SourceToParse source) { this.parser = parser; this.document = document; if (document != null) { this.documents = new ArrayList<>(); this.documents.add(document); } else { this.documents = null; } this.uid = null; this.version = null; this.id = null; this.sourceToParse = source; this.source = source == null ? null : sourceToParse.source(); this.path.reset(); this.allEntries = new AllEntries(); this.docBoost = 1.0f; this.dynamicMappingsUpdate = null; }