Package org.apache.solr.ltr.model
Class DefaultWrapperModel
- java.lang.Object
- 
- org.apache.solr.ltr.model.LTRScoringModel
- 
- org.apache.solr.ltr.model.AdapterModel
- 
- org.apache.solr.ltr.model.WrapperModel
- 
- org.apache.solr.ltr.model.DefaultWrapperModel
 
 
 
 
- 
 public class DefaultWrapperModel extends WrapperModel A scoring model that fetches the wrapped model fromSolrResourceLoader.This model uses SolrResourceLoader.openResource(String)for fetching the wrapped model. If you give a relative path forparams/resource, this model will try to load the wrapped model from the instance directory (i.e. ${solr.solr.home}). Otherwise, seek through classpaths.Example configuration: { "class": "org.apache.solr.ltr.model.DefaultWrapperModel", "name": "myWrapperModelName", "params": { "resource": "models/myModel.json" } }- See Also:
- SolrResourceLoader.openResource(String)
 
- 
- 
Field Summary- 
Fields inherited from class org.apache.solr.ltr.model.WrapperModelmodel
 - 
Fields inherited from class org.apache.solr.ltr.model.AdapterModelsolrResourceLoader
 - 
Fields inherited from class org.apache.solr.ltr.model.LTRScoringModelfeatures, name, norms
 
- 
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>fetchModelMap()protected InputStreamopenInputStream()protected Map<String,Object>parseInputStream(InputStream in)voidsetResource(String resource)StringtoString()protected voidvalidate()Validate that settings make sense and throwsModelExceptionif they do not make sense.- 
Methods inherited from class org.apache.solr.ltr.model.WrapperModelequals, explain, getAllFeatures, getFeatures, getNormalizerExplanation, getNorms, hashCode, normalizeFeaturesInPlace, score, updateModel
 - 
Methods inherited from class org.apache.solr.ltr.model.AdapterModelinit
 - 
Methods inherited from class org.apache.solr.ltr.model.LTRScoringModelgetFeatureStoreName, getInstance, getName, getParams
 
- 
 
- 
- 
- 
Method Detail- 
setResourcepublic void setResource(String resource) 
 - 
validateprotected void validate() throws ModelExceptionDescription copied from class:LTRScoringModelValidate that settings make sense and throwsModelExceptionif they do not make sense.- Overrides:
- validatein class- WrapperModel
- Throws:
- ModelException
 
 - 
fetchModelMappublic Map<String,Object> fetchModelMap() throws ModelException - Specified by:
- fetchModelMapin class- WrapperModel
- Throws:
- ModelException
 
 - 
openInputStreamprotected InputStream openInputStream() throws IOException - Throws:
- IOException
 
 - 
parseInputStreamprotected Map<String,Object> parseInputStream(InputStream in) throws IOException - Throws:
- IOException
 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- WrapperModel
 
 
- 
 
-