Package org.apache.solr.ltr.search
Class LTRQParserPlugin
- java.lang.Object
-
- org.apache.solr.search.QParserPlugin
-
- org.apache.solr.ltr.search.LTRQParserPlugin
-
- All Implemented Interfaces:
AutoCloseable,org.apache.lucene.util.ResourceLoaderAware,SolrInfoBean,SolrMetricProducer,ManagedResourceObserver,NamedListInitializedPlugin
public class LTRQParserPlugin extends QParserPlugin implements org.apache.lucene.util.ResourceLoaderAware, ManagedResourceObserver
Plug into solr a rerank model.Learning to Rank Query Parser Syntax: rq={!ltr model=6029760550880411648 reRankDocs=300 efi.myCompanyQueryIntent=0.98}
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classLTRQParserPlugin.LTRQParser-
Nested classes/interfaces inherited from interface org.apache.solr.core.SolrInfoBean
SolrInfoBean.Category, SolrInfoBean.Group
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_INTERLEAVING_ALGORITHMquery parser plugin: default interleaving algorithmstatic intDEFAULT_RERANK_DOCSquery parser plugin: default number of documents to rerankstatic StringINTERLEAVING_ALGORITHMquery parser plugin:the param that selects the interleaving algorithm to usestatic StringMODELquery parser plugin: the name of the attribute for setting the modelstatic StringNAMEstatic StringRERANK_DOCSquery parser plugin:the param that will select how the number of document to rerank-
Fields inherited from class org.apache.solr.search.QParserPlugin
DEFAULT_QTYPE, standardPlugins
-
-
Constructor Summary
Constructors Constructor Description LTRQParserPlugin()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description QParsercreateParser(String qstr, org.apache.solr.common.params.SolrParams localParams, org.apache.solr.common.params.SolrParams params, SolrQueryRequest req)static Map<String,String[]>extractEFIParams(org.apache.solr.common.params.SolrParams localParams)Given a set of local SolrParams, extract all of the efi.key=value params into a mapvoidinform(org.apache.lucene.util.ResourceLoader loader)voidinit(org.apache.solr.common.util.NamedList<?> args)voidonManagedResourceInitialized(org.apache.solr.common.util.NamedList<?> args, ManagedResource res)-
Methods inherited from class org.apache.solr.search.QParserPlugin
getCategory, getDescription, getName, getSolrMetricsContext, initializeMetrics
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.solr.metrics.SolrMetricProducer
close
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
MODEL
public static final String MODEL
query parser plugin: the name of the attribute for setting the model- See Also:
- Constant Field Values
-
DEFAULT_RERANK_DOCS
public static final int DEFAULT_RERANK_DOCS
query parser plugin: default number of documents to rerank- See Also:
- Constant Field Values
-
RERANK_DOCS
public static final String RERANK_DOCS
query parser plugin:the param that will select how the number of document to rerank- See Also:
- Constant Field Values
-
DEFAULT_INTERLEAVING_ALGORITHM
public static final String DEFAULT_INTERLEAVING_ALGORITHM
query parser plugin: default interleaving algorithm- See Also:
- Constant Field Values
-
INTERLEAVING_ALGORITHM
public static final String INTERLEAVING_ALGORITHM
query parser plugin:the param that selects the interleaving algorithm to use- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(org.apache.solr.common.util.NamedList<?> args)
- Specified by:
initin interfaceNamedListInitializedPlugin
-
createParser
public QParser createParser(String qstr, org.apache.solr.common.params.SolrParams localParams, org.apache.solr.common.params.SolrParams params, SolrQueryRequest req)
- Specified by:
createParserin classQParserPlugin
-
extractEFIParams
public static Map<String,String[]> extractEFIParams(org.apache.solr.common.params.SolrParams localParams)
Given a set of local SolrParams, extract all of the efi.key=value params into a map- Parameters:
localParams- Local request parameters that might conatin efi params- Returns:
- Map of efi params, where the key is the name of the efi param, and the value is the value of the efi param
-
inform
public void inform(org.apache.lucene.util.ResourceLoader loader) throws IOException- Specified by:
informin interfaceorg.apache.lucene.util.ResourceLoaderAware- Throws:
IOException
-
onManagedResourceInitialized
public void onManagedResourceInitialized(org.apache.solr.common.util.NamedList<?> args, ManagedResource res) throws org.apache.solr.common.SolrException- Specified by:
onManagedResourceInitializedin interfaceManagedResourceObserver- Throws:
org.apache.solr.common.SolrException
-
-