Class CloudMLTQParser


public class CloudMLTQParser extends SimpleMLTQParser
  • Constructor Details

    • CloudMLTQParser

      public CloudMLTQParser(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.
      Overrides:
      parse in class SimpleMLTQParser
      See Also:
    • likeDoc

      protected org.apache.lucene.search.Query likeDoc(org.apache.lucene.queries.mlt.MoreLikeThis moreLikeThis, org.apache.solr.common.SolrDocument doc) throws IOException
      Throws:
      IOException
    • getFieldsFromDoc

      protected String[] getFieldsFromDoc(org.apache.solr.common.SolrDocument doc)
    • 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