Class SimpleQQParser

  • All Implemented Interfaces:
    QualityQueryParser

    public class SimpleQQParser
    extends Object
    implements QualityQueryParser
    Simplistic quality query parser. A Lucene query is created by passing the value of the specified QualityQuery name-value pair(s) into a Lucene's QueryParser using StandardAnalyzer.
    • Constructor Detail

      • SimpleQQParser

        public SimpleQQParser​(String[] qqNames,
                              String indexField)
        Constructor of a simple qq parser.
        Parameters:
        qqNames - name-value pairs of quality query to use for creating the query
        indexField - corresponding index field
      • SimpleQQParser

        public SimpleQQParser​(String qqName,
                              String indexField)
        Constructor of a simple qq parser.
        Parameters:
        qqName - name-value pair of quality query to use for creating the query
        indexField - corresponding index field
    • Method Detail

      • parse

        public org.apache.lucene.search.Query parse​(QualityQuery qq)
                                             throws org.apache.lucene.queryParser.ParseException
        Description copied from interface: QualityQueryParser
        Parse a given QualityQuery into a Lucene query.
        Specified by:
        parse in interface QualityQueryParser
        Parameters:
        qq - the quality query to be parsed.
        Throws:
        org.apache.lucene.queryParser.ParseException - if parsing failed.