Package org.apache.solr.search.mlt
Class SimpleMLTQParser
java.lang.Object
org.apache.solr.search.QParser
org.apache.solr.search.mlt.SimpleMLTQParser
- Direct Known Subclasses:
CloudMLTQParser
-
Field Summary
Fields inherited from class org.apache.solr.search.QParser
FLAG_FILTER, flags, localParams, localParamsEnd, params, qstr, query, recurseCount, req, stringIncludingLocalParams, valFollowedParams -
Constructor Summary
ConstructorsConstructorDescriptionSimpleMLTQParser(String qstr, org.apache.solr.common.params.SolrParams localParams, org.apache.solr.common.params.SolrParams params, SolrQueryRequest req) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.lucene.search.QuerycreateIdQuery(String defaultField, String uniqueValue) org.apache.lucene.search.BooleanQueryexclude(org.apache.lucene.search.BooleanQuery boostedMLTQuery, org.apache.lucene.search.Query docIdQuery) exclude current document from resultsprotected String[]Retrieves text and string fields fom the schemaorg.apache.lucene.search.Queryparse()Create and return theQueryobject represented byqstr.protected org.apache.lucene.search.BooleanQueryparseMLTQuery(Supplier<String[]> fieldsFallback, org.apache.solr.search.mlt.AbstractMLTQParser.MLTInvoker invoker) protected org.apache.lucene.search.BooleanQueryparseMLTQuery(Supplier<String[]> fieldsFallback, org.apache.solr.search.mlt.AbstractMLTQParser.MLTInvoker invoker, org.apache.lucene.search.Query docIdQuery) Methods inherited from class org.apache.solr.search.QParser
addDebugInfo, getDefaultHighlightFields, getFlags, getHighlightQuery, getLocalParams, getParam, getParams, getParser, getParser, getParser, getPrefixQueryMinPrefixLength, getQuery, getReq, getSortSpec, getString, isFilter, parseAsValueSource, setFlags, setIsFilter, setLocalParams, setParams, setReq, setString, subQuery
-
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:QParserCreate and return theQueryobject represented byqstr. Null MAY be returned to signify there was no input (e.g. no query string) to parse. -
createIdQuery
-
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
-