Package org.apache.lucene.queryparser.flexible.core.processors

Examples of org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessorPipeline


  @Test(expected=IllegalArgumentException.class)
  public void testTwigQueryNodeWithMoreThan2Children()
  throws Exception {
    final KeywordQueryParser parser = new KeywordQueryParser();
    final QueryNodeProcessorPipeline pipeline = new QueryNodeProcessorPipeline();
    pipeline.add(new QueryNodeProcessorImpl() {
      @Override
      protected List<QueryNode> setChildrenOrder(final List<QueryNode> children)
      throws QueryNodeException {
        return children;
      }
View Full Code Here


    QueryConfigHandler spanQueryConfigHandler = new SpansQueryConfigHandler();
    spanQueryConfigHandler.set(SpansQueryConfigHandler.UNIQUE_FIELD, "index");

    // set up the processor pipeline with the ConfigHandler
    // and create the pipeline for this simple demo
    QueryNodeProcessorPipeline spanProcessorPipeline = new QueryNodeProcessorPipeline(
        spanQueryConfigHandler);
    // @see SpansValidatorQueryNodeProcessor
    spanProcessorPipeline.add(new SpansValidatorQueryNodeProcessor());
    // @see UniqueFieldQueryNodeProcessor
    spanProcessorPipeline.add(new UniqueFieldQueryNodeProcessor());

    // print to show out the QueryNode tree before being processed
    if (VERBOSE) System.out.println(queryTree);

    // Process the QueryTree using our new Processors
    queryTree = spanProcessorPipeline.process(queryTree);

    // print to show out the QueryNode tree after being processed
    if (VERBOSE) System.out.println(queryTree);

    // create a instance off the Builder
View Full Code Here

  @Override
  public void setUp() throws Exception {
    super.setUp();

    this.spanProcessorPipeline = new QueryNodeProcessorPipeline();
    this.spanQueryConfigHandler = new SpansQueryConfigHandler();
    this.spansQueryTreeBuilder = new SpansQueryTreeBuilder();

    // set up the processor pipeline
    this.spanProcessorPipeline
View Full Code Here

TOP

Related Classes of org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessorPipeline

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.