Class SimpleMLTQParser

java.lang.Object
org.apache.solr.search.QParser
org.apache.solr.search.mlt.SimpleMLTQParser
Direct Known Subclasses:
CloudMLTQParser

public class SimpleMLTQParser extends QParser
  • Constructor Details

    • SimpleMLTQParser

      public SimpleMLTQParser(String qstr, org.apache.solr.common.params.SolrParams localParams, org.apache.solr.common.params.SolrParams params, SolrQueryRequest req)
  • Method Details

    • parse

      public org.apache.lucene.search.Query parse()
      Description copied from class: QParser
      Create and return the Query object represented by qstr. Null MAY be returned to signify there was no input (e.g. no query string) to parse.
      Specified by:
      parse in class QParser
      See Also:
    • createIdQuery

      protected org.apache.lucene.search.Query createIdQuery(String defaultField, String uniqueValue)
    • getFieldsFromSchema

      protected String[] getFieldsFromSchema()
      Retrieves text and string fields fom the schema
    • exclude

      public org.apache.lucene.search.BooleanQuery exclude(org.apache.lucene.search.BooleanQuery boostedMLTQuery, org.apache.lucene.search.Query docIdQuery)
      exclude current document from results
    • parseMLTQuery

      protected org.apache.lucene.search.BooleanQuery parseMLTQuery(Supplier<String[]> fieldsFallback, org.apache.solr.search.mlt.AbstractMLTQParser.MLTInvoker invoker, org.apache.lucene.search.Query docIdQuery) throws IOException
      Throws:
      IOException
    • parseMLTQuery

      protected org.apache.lucene.search.BooleanQuery parseMLTQuery(Supplier<String[]> fieldsFallback, org.apache.solr.search.mlt.AbstractMLTQParser.MLTInvoker invoker) throws IOException
      Throws:
      IOException