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