List of usage examples for org.apache.lucene.queryparser.flexible.core.processors RemoveDeletedQueryNodesProcessor RemoveDeletedQueryNodesProcessor
public RemoveDeletedQueryNodesProcessor()
From source file:com.sindicetech.siren.qparser.keyword.processors.KeywordQueryNodeProcessorPipeline.java
License:Open Source License
public KeywordQueryNodeProcessorPipeline(final QueryConfigHandler queryConfig) { super(queryConfig); this.add(new TopLevelQueryNodeProcessor()); this.add(new AllowTwigProcessor()); this.add(new WildcardNodeQueryNodeProcessor()); this.add(new RootLevelTwigQueryNodeProcessor()); this.add(new ChangeDefaultOperatorNodeProcessor()); // QNamesProcessor must be before the DatatypeProcessor as it can modify the datatype label this.add(new QNamesProcessor()); this.add(new WildcardQueryNodeProcessor()); this.add(new FuzzyQueryNodeProcessor()); this.add(new PhraseQueryNodeProcessor()); this.add(new OpenRangeQueryNodeProcessor()); // assign datatype to query nodes this.add(new DatatypeProcessor()); // assign query type to query nodes this.add(new QueryTypeProcessor()); // transfer span slop to boolean query nodes this.add(new SpanGroupQueryProcessor()); // this processor creates a NodeNumericRangeQuery from a FieldQueryNode, // with both bounds equal. This is why it is before DatatypeAnalyzerProcessor this.add(new NodeNumericQueryNodeProcessor()); this.add(new NodeNumericRangeQueryNodeProcessor()); this.add(new TermRangeQueryNodeProcessor()); this.add(new LowercaseExpandedTermsQueryNodeProcessor()); this.add(new DatatypeAnalyzerProcessor()); this.add(new PhraseSlopQueryNodeProcessor()); this.add(new DefaultPhraseSlopQueryNodeProcessor()); this.add(new AllowFuzzyAndWildcardProcessor()); this.add(new AllowLeadingWildcardProcessor()); this.add(new GroupQueryNodeProcessor()); /*//from w ww.ja va2 s . com * TODO GroupQueryNodeProcessor is deprecated in Lucene4.0 in favour to * BooleanQuery2ModifierNodeProcessor. Try to apply changes done in SIREn * to it. */ // add(new BooleanQuery2ModifierNodeProcessor()); this.add(new NoChildOptimizationQueryNodeProcessor()); this.add(new RemoveDeletedQueryNodesProcessor()); this.add(new RemoveEmptyNonLeafQueryNodeProcessor()); this.add(new BooleanSingleChildOptimizationQueryNodeProcessor()); this.add(new MultiNodeTermRewriteMethodProcessor()); this.add(new NodeBooleanQueryNodeProcessor()); this.add(new NotSupportedQueryProcessor()); }
From source file:org.sindice.siren.qparser.keyword.processors.KeywordQueryNodeProcessorPipeline.java
License:Apache License
public KeywordQueryNodeProcessorPipeline(final QueryConfigHandler queryConfig) { super(queryConfig); this.add(new TopLevelQueryNodeProcessor()); this.add(new AllowTwigProcessor()); this.add(new WildcardNodeQueryNodeProcessor()); this.add(new RootLevelTwigQueryNodeProcessor()); this.add(new ChangeDefaultOperatorNodeProcessor()); this.add(new WildcardQueryNodeProcessor()); this.add(new FuzzyQueryNodeProcessor()); this.add(new QNamesProcessor()); this.add(new PhraseQueryNodeProcessor()); this.add(new DatatypeQueryNodeProcessor()); // Ranges/*ww w. j ava2 s . c o m*/ this.add(new OpenRangeQueryNodeProcessor()); // this processor creates a NodeNumericRangeQuery from a FieldQueryNode, // with both bounds equal. This is why it is before DatatypeAnalyzerProcessor this.add(new NodeNumericQueryNodeProcessor()); this.add(new NodeNumericRangeQueryNodeProcessor()); this.add(new TermRangeQueryNodeProcessor()); this.add(new LowercaseExpandedTermsQueryNodeProcessor()); this.add(new DatatypeAnalyzerProcessor()); this.add(new PhraseSlopQueryNodeProcessor()); this.add(new DefaultPhraseSlopQueryNodeProcessor()); this.add(new AllowFuzzyAndWildcardProcessor()); this.add(new AllowLeadingWildcardProcessor()); this.add(new GroupQueryNodeProcessor()); /* * TODO GroupQueryNodeProcessor is deprecated in Lucene4.0 in favour to * BooleanQuery2ModifierNodeProcessor. Try to apply changes done in SIREn * to it. */ // add(new BooleanQuery2ModifierNodeProcessor()); this.add(new NoChildOptimizationQueryNodeProcessor()); this.add(new RemoveDeletedQueryNodesProcessor()); this.add(new RemoveEmptyNonLeafQueryNodeProcessor()); this.add(new BooleanSingleChildOptimizationQueryNodeProcessor()); this.add(new MultiNodeTermRewriteMethodProcessor()); this.add(new NodeBooleanQueryNodeProcessor()); this.add(new NotSupportedQueryProcessor()); }