Codota Logo
InnerHitBuilder.isIgnoreUnmapped
Code IndexAdd Codota to your IDE (free)

How to use
isIgnoreUnmapped
method
in
org.elasticsearch.index.query.InnerHitBuilder

Best Java code snippets using org.elasticsearch.index.query.InnerHitBuilder.isIgnoreUnmapped (Showing top 10 results out of 315)

  • Common ways to obtain InnerHitBuilder
private void myMethod () {
InnerHitBuilder i =
  • Codota IconXContentParser parser;InnerHitBuilder.fromXContent(parser)
  • Codota IconStreamInput streamInput;streamInput.readOptionalWriteable(InnerHitBuilder::new)
  • Smart code suggestions by Codota
}
origin: org.elasticsearch/elasticsearch

  @Override
  protected void doBuild(SearchContext parentSearchContext,
           InnerHitsContext innerHitsContext) throws IOException {
    QueryShardContext queryShardContext = parentSearchContext.getQueryShardContext();
    ObjectMapper nestedObjectMapper = queryShardContext.getObjectMapper(path);
    if (nestedObjectMapper == null) {
      if (innerHitBuilder.isIgnoreUnmapped() == false) {
        throw new IllegalStateException("[" + query.getName() + "] no mapping found for type [" + path + "]");
      } else {
        return;
      }
    }
    String name =  innerHitBuilder.getName() != null ? innerHitBuilder.getName() : nestedObjectMapper.fullPath();
    ObjectMapper parentObjectMapper = queryShardContext.nestedScope().nextLevel(nestedObjectMapper);
    NestedInnerHitSubContext nestedInnerHits = new NestedInnerHitSubContext(
      name, parentSearchContext, parentObjectMapper, nestedObjectMapper
    );
    setupInnerHitsContext(queryShardContext, nestedInnerHits);
    queryShardContext.nestedScope().previousLevel();
    innerHitsContext.addInnerHitDefinition(nestedInnerHits);
  }
}
origin: org.elasticsearch.plugin/parent-join-client

private void handleJoinFieldInnerHits(SearchContext context, InnerHitsContext innerHitsContext) throws IOException {
  QueryShardContext queryShardContext = context.getQueryShardContext();
  ParentJoinFieldMapper joinFieldMapper = ParentJoinFieldMapper.getMapper(context.mapperService());
  if (joinFieldMapper != null) {
    String name = innerHitBuilder.getName() != null ? innerHitBuilder.getName() : typeName;
    JoinFieldInnerHitSubContext joinFieldInnerHits = new JoinFieldInnerHitSubContext(name, context, typeName,
      fetchChildInnerHits, joinFieldMapper);
    setupInnerHitsContext(queryShardContext, joinFieldInnerHits);
    innerHitsContext.addInnerHitDefinition(joinFieldInnerHits);
  } else {
    if (innerHitBuilder.isIgnoreUnmapped() == false) {
      throw new IllegalStateException("no join field has been configured");
    }
  }
}
origin: com.strapdata.elasticsearch.plugin/parent-join

private void handleJoinFieldInnerHits(SearchContext context, InnerHitsContext innerHitsContext) throws IOException {
  QueryShardContext queryShardContext = context.getQueryShardContext();
  ParentJoinFieldMapper joinFieldMapper = ParentJoinFieldMapper.getMapper(context.mapperService());
  if (joinFieldMapper != null) {
    String name = innerHitBuilder.getName() != null ? innerHitBuilder.getName() : typeName;
    JoinFieldInnerHitSubContext joinFieldInnerHits = new JoinFieldInnerHitSubContext(name, context, typeName,
      fetchChildInnerHits, joinFieldMapper);
    setupInnerHitsContext(queryShardContext, joinFieldInnerHits);
    innerHitsContext.addInnerHitDefinition(joinFieldInnerHits);
  } else {
    if (innerHitBuilder.isIgnoreUnmapped() == false) {
      throw new IllegalStateException("no join field has been configured");
    }
  }
}
origin: org.codelibs.elasticsearch.module/parent-join

private void handleJoinFieldInnerHits(SearchContext context, InnerHitsContext innerHitsContext) throws IOException {
  QueryShardContext queryShardContext = context.getQueryShardContext();
  ParentJoinFieldMapper joinFieldMapper = ParentJoinFieldMapper.getMapper(context.mapperService());
  if (joinFieldMapper != null) {
    String name = innerHitBuilder.getName() != null ? innerHitBuilder.getName() : typeName;
    JoinFieldInnerHitSubContext joinFieldInnerHits = new JoinFieldInnerHitSubContext(name, context, typeName,
      fetchChildInnerHits, joinFieldMapper);
    setupInnerHitsContext(queryShardContext, joinFieldInnerHits);
    innerHitsContext.addInnerHitDefinition(joinFieldInnerHits);
  } else {
    if (innerHitBuilder.isIgnoreUnmapped() == false) {
      throw new IllegalStateException("no join field has been configured");
    }
  }
}
origin: org.elasticsearch.plugin/parent-join-client

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);
}
origin: org.codelibs.elasticsearch.module/parent-join

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);
}
origin: com.strapdata.elasticsearch.plugin/parent-join

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);
}
origin: apache/servicemix-bundles

  @Override
  protected void doBuild(SearchContext parentSearchContext,
           InnerHitsContext innerHitsContext) throws IOException {
    QueryShardContext queryShardContext = parentSearchContext.getQueryShardContext();
    ObjectMapper nestedObjectMapper = queryShardContext.getObjectMapper(path);
    if (nestedObjectMapper == null) {
      if (innerHitBuilder.isIgnoreUnmapped() == false) {
        throw new IllegalStateException("[" + query.getName() + "] no mapping found for type [" + path + "]");
      } else {
        return;
      }
    }
    String name =  innerHitBuilder.getName() != null ? innerHitBuilder.getName() : nestedObjectMapper.fullPath();
    ObjectMapper parentObjectMapper = queryShardContext.nestedScope().nextLevel(nestedObjectMapper);
    NestedInnerHitSubContext nestedInnerHits = new NestedInnerHitSubContext(
      name, parentSearchContext, parentObjectMapper, nestedObjectMapper
    );
    setupInnerHitsContext(queryShardContext, nestedInnerHits);
    queryShardContext.nestedScope().previousLevel();
    innerHitsContext.addInnerHitDefinition(nestedInnerHits);
  }
}
origin: com.strapdata.elasticsearch/elasticsearch

  @Override
  public void build(SearchContext parentSearchContext,
           InnerHitsContext innerHitsContext) throws IOException {
    QueryShardContext queryShardContext = parentSearchContext.getQueryShardContext();
    ObjectMapper nestedObjectMapper = queryShardContext.getObjectMapper(path);
    if (nestedObjectMapper == null) {
      if (innerHitBuilder.isIgnoreUnmapped() == false) {
        throw new IllegalStateException("[" + query.getName() + "] no mapping found for type [" + path + "]");
      } else {
        return;
      }
    }
    String name =  innerHitBuilder.getName() != null ? innerHitBuilder.getName() : nestedObjectMapper.fullPath();
    ObjectMapper parentObjectMapper = queryShardContext.nestedScope().nextLevel(nestedObjectMapper);
    NestedInnerHitSubContext nestedInnerHits = new NestedInnerHitSubContext(
      name, parentSearchContext, parentObjectMapper, nestedObjectMapper
    );
    setupInnerHitsContext(queryShardContext, nestedInnerHits);
    queryShardContext.nestedScope().previousLevel();
    innerHitsContext.addInnerHitDefinition(nestedInnerHits);
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

  @Override
  protected void doBuild(SearchContext parentSearchContext,
           InnerHitsContext innerHitsContext) throws IOException {
    QueryShardContext queryShardContext = parentSearchContext.getQueryShardContext();
    ObjectMapper nestedObjectMapper = queryShardContext.getObjectMapper(path);
    if (nestedObjectMapper == null) {
      if (innerHitBuilder.isIgnoreUnmapped() == false) {
        throw new IllegalStateException("[" + query.getName() + "] no mapping found for type [" + path + "]");
      } else {
        return;
      }
    }
    String name =  innerHitBuilder.getName() != null ? innerHitBuilder.getName() : nestedObjectMapper.fullPath();
    ObjectMapper parentObjectMapper = queryShardContext.nestedScope().nextLevel(nestedObjectMapper);
    NestedInnerHitSubContext nestedInnerHits = new NestedInnerHitSubContext(
      name, parentSearchContext, parentObjectMapper, nestedObjectMapper
    );
    setupInnerHitsContext(queryShardContext, nestedInnerHits);
    queryShardContext.nestedScope().previousLevel();
    innerHitsContext.addInnerHitDefinition(nestedInnerHits);
  }
}
org.elasticsearch.index.queryInnerHitBuilderisIgnoreUnmapped

Javadoc

Whether to include inner hits in the search response hits if required mappings is missing

Popular methods of InnerHitBuilder

  • fromXContent
  • getName
  • <init>
    Read from a stream.
  • setIgnoreUnmapped
  • getDocValueFields
    Gets the docvalue fields.
  • getFetchSourceContext
  • getFrom
  • getHighlightBuilder
  • getScriptFields
  • getSize
  • getSorts
  • getStoredFieldsContext
    Gets the stored fields context.
  • getSorts,
  • getStoredFieldsContext,
  • isExplain,
  • isTrackScores,
  • isVersion,
  • setStoredFieldNames,
  • toXContent,
  • writeToBWC,
  • writeToCollapseBWC

Popular in Java

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • getContentResolver (Context)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now