@Override protected void parseCreateField(ParseContext context, List<IndexableField> fields) throws IOException { boolean parent = context.docMapper().isParent(context.sourceToParse().type()); if (parent) { fields.add(new SortedDocValuesField(parentJoinField.fieldType().name(), new BytesRef(context.sourceToParse().id())));
@Override protected void parseCreateField(ParseContext context, List<Field> fields) throws IOException { boolean parent = context.docMapper().isParent(context.type()); if (parent) { addJoinFieldIfNeeded(fields, parentJoinFieldType, context.id());
@Override protected void parseCreateField(ParseContext context, List<IndexableField> fields) throws IOException { boolean parent = context.docMapper().isParent(context.sourceToParse().type()); if (parent) { fields.add(new SortedDocValuesField(parentJoinField.fieldType().name(), new BytesRef(context.sourceToParse().id())));
@Override protected void parseCreateField(ParseContext context, List<IndexableField> fields) throws IOException { boolean parent = context.docMapper().isParent(context.sourceToParse().type()); if (parent) { fields.add(new SortedDocValuesField(parentJoinField.fieldType().name(), new BytesRef(context.sourceToParse().id())));
@Override protected void parseCreateField(ParseContext context, List<IndexableField> fields) throws IOException { boolean parent = context.docMapper().isParent(context.sourceToParse().type()); if (parent) { fields.add(new SortedDocValuesField(parentJoinField.fieldType().name(), new BytesRef(context.sourceToParse().id())));
@Override public void createField(ParseContext context, Object value) throws IOException { String parentId = (String) value; boolean parent = context.docMapper().isParent(context.type()); if (parent) { //addJoinFieldIfNeeded(context, parentJoinFieldType, context.id()); context.doc().add(new SortedDocValuesField(parentJoinField.fieldType().name(), new BytesRef(context.id()))); } if (!active()) { return; } context.doc().add(new SortedDocValuesField(fieldType.name(), new BytesRef(parentId))); //addJoinFieldIfNeeded(context, childJoinFieldType, parentId); // we have parent mapping, yet no value was set, ignore it... }