/**
   * Sets the query configuration handler that will be used during query processing. It can be
   * <code>null</code>. It's also set to the processor returned by {@link #getQueryNodeProcessor()}.
   *
   * @param config the query configuration handler used during query processing, it can be <code>
   *     null</code>
   * @see #getQueryConfigHandler()
   * @see QueryConfigHandler
   */
  public void setQueryConfigHandler(QueryConfigHandler config) {
    this.config = config;
    QueryNodeProcessor processor = getQueryNodeProcessor();

    if (processor != null) {
      processor.setQueryConfigHandler(config);
    }
  }
  /**
   * Creates a query parser helper object using the specified configuration, text parser, processor
   * and builder.
   *
   * @param queryConfigHandler the query configuration handler that will be initially set to this
   *     helper
   * @param syntaxParser the text parser that will be initially set to this helper
   * @param processor the query processor that will be initially set to this helper
   * @param builder the query builder that will be initially set to this helper
   * @see QueryNodeProcessor
   * @see SyntaxParser
   * @see QueryBuilder
   * @see QueryConfigHandler
   */
  public QueryParserHelper(
      QueryConfigHandler queryConfigHandler,
      SyntaxParser syntaxParser,
      QueryNodeProcessor processor,
      QueryBuilder builder) {
    this.syntaxParser = syntaxParser;
    this.config = queryConfigHandler;
    this.processor = processor;
    this.builder = builder;

    if (processor != null) {
      processor.setQueryConfigHandler(queryConfigHandler);
    }
  }