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
public class SimpleMLTQParser extends QParser
-
-
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
Constructors Constructor Description SimpleMLTQParser(String qstr, org.apache.solr.common.params.SolrParams localParams, org.apache.solr.common.params.SolrParams params, SolrQueryRequest req)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.lucene.search.Query
createIdQuery(String defaultField, String uniqueValue)
org.apache.lucene.search.BooleanQuery
exclude(org.apache.lucene.search.BooleanQuery boostedMLTQuery, org.apache.lucene.search.Query docIdQuery)
exclude current document from resultsprotected String[]
getFieldsFromSchema()
Retrieves text and string fields fom the schemaorg.apache.lucene.search.Query
parse()
Create and return theQuery
object represented byqstr
.protected org.apache.lucene.search.BooleanQuery
parseMLTQuery(Supplier<String[]> fieldsFallback, org.apache.solr.search.mlt.AbstractMLTQParser.MLTInvoker invoker)
protected org.apache.lucene.search.BooleanQuery
parseMLTQuery(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, getQuery, getReq, getSortSpec, getString, isFilter, setFlags, setIsFilter, setLocalParams, setParams, setReq, setString, subQuery
-
-
-
-
Constructor Detail
-
SimpleMLTQParser
public SimpleMLTQParser(String qstr, org.apache.solr.common.params.SolrParams localParams, org.apache.solr.common.params.SolrParams params, SolrQueryRequest req)
-
-
Method Detail
-
parse
public org.apache.lucene.search.Query parse()
Description copied from class:QParser
Create and return theQuery
object represented byqstr
. Null MAY be returned to signify there was no input (e.g. no query string) to parse.- Specified by:
parse
in classQParser
- See Also:
QParser.getQuery()
-
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
-
-