private void handleParentFieldInnerHits(SearchContext context, InnerHitsContext innerHitsContext) throws IOException { QueryShardContext queryShardContext = context.getQueryShardContext(); DocumentMapper documentMapper = queryShardContext.documentMapper(typeName); if (documentMapper == null) { if (innerHitBuilder.isIgnoreUnmapped() == false) { throw new IllegalStateException("[" + query.getName() + "] no mapping found for type [" + typeName + "]"); } else { return; } } String name = innerHitBuilder.getName() != null ? innerHitBuilder.getName() : documentMapper.type(); ParentChildInnerHitSubContext parentChildInnerHits = new ParentChildInnerHitSubContext( name, context, queryShardContext.getMapperService(), documentMapper ); setupInnerHitsContext(queryShardContext, parentChildInnerHits); innerHitsContext.addInnerHitDefinition(parentChildInnerHits); }
private void handleParentFieldInnerHits(SearchContext context, InnerHitsContext innerHitsContext) throws IOException { QueryShardContext queryShardContext = context.getQueryShardContext(); DocumentMapper documentMapper = queryShardContext.documentMapper(typeName); if (documentMapper == null) { if (innerHitBuilder.isIgnoreUnmapped() == false) { throw new IllegalStateException("[" + query.getName() + "] no mapping found for type [" + typeName + "]"); } else { return; } } String name = innerHitBuilder.getName() != null ? innerHitBuilder.getName() : documentMapper.type(); ParentChildInnerHitSubContext parentChildInnerHits = new ParentChildInnerHitSubContext( name, context, queryShardContext.getMapperService(), documentMapper ); setupInnerHitsContext(queryShardContext, parentChildInnerHits); innerHitsContext.addInnerHitDefinition(parentChildInnerHits); }
private void handleParentFieldInnerHits(SearchContext context, InnerHitsContext innerHitsContext) throws IOException { QueryShardContext queryShardContext = context.getQueryShardContext(); DocumentMapper documentMapper = queryShardContext.documentMapper(typeName); if (documentMapper == null) { if (innerHitBuilder.isIgnoreUnmapped() == false) { throw new IllegalStateException("[" + query.getName() + "] no mapping found for type [" + typeName + "]"); } else { return; } } String name = innerHitBuilder.getName() != null ? innerHitBuilder.getName() : documentMapper.type(); ParentChildInnerHitSubContext parentChildInnerHits = new ParentChildInnerHitSubContext( name, context, queryShardContext.getMapperService(), documentMapper ); setupInnerHitsContext(queryShardContext, parentChildInnerHits); innerHitsContext.addInnerHitDefinition(parentChildInnerHits); }
DocumentMapper parentDocMapper = context.documentMapper(type); if (parentDocMapper == null) { if (ignoreUnmapped) {
DocumentMapper parentDocMapper = context.documentMapper(type); if (parentDocMapper == null) { if (ignoreUnmapped) {
DocumentMapper parentDocMapper = context.documentMapper(type); if (parentDocMapper == null) { if (ignoreUnmapped) {