Example usage for org.apache.lucene.queryparser.flexible.standard.processors FuzzyQueryNodeProcessor FuzzyQueryNodeProcessor

List of usage examples for org.apache.lucene.queryparser.flexible.standard.processors FuzzyQueryNodeProcessor FuzzyQueryNodeProcessor

Introduction

In this page you can find the example usage for org.apache.lucene.queryparser.flexible.standard.processors FuzzyQueryNodeProcessor FuzzyQueryNodeProcessor.

Prototype

FuzzyQueryNodeProcessor

Source Link

Usage

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  ww  w . j av a2  s .  co m*/
     * 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//from   w  w w  .  j ava2  s.  co 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());
}