public class TermScoreConfig
extends java.lang.Object
implements com.exalead.util.Checkable, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
TermScoreConfig.Type |
Modifier and Type | Field and Description |
---|---|
java.lang.String |
customExpr |
java.lang.String |
customLuaScript |
static java.lang.String |
DEFAULT_TYPE |
java.lang.String |
scoreMap |
java.lang.String |
type |
Constructor and Description |
---|
TermScoreConfig() |
TermScoreConfig(java.lang.String type) |
TermScoreConfig(TermScoreConfig o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
check(boolean deep,
java.lang.String errorContext)
Checks this TermScoreConfig.
|
static TermScoreConfig |
fromString(java.lang.String s)
String representation of this TermScoreConfig.
|
java.lang.String |
getCustomExpr() |
java.lang.String |
getCustomLuaScript() |
java.lang.String |
getScoreMap()
Comma-separated list of target weights for the ranking scores.
XXX: Should be cleanly documented elsewhere. |
java.lang.String |
getType()
Select the ranking policy (
Value can be null or one of
RANK_TFIDF
TFIDF
RANK
BM25
BM25F
NO_RANKING
IDF
RANK_IDF
CUSTOM
CUSTOM_LUA
) for the terms
|
TermScoreConfig.Type |
getTypeAsEnum()
Select the ranking policy (
Value can be null or one of
RANK_TFIDF
TFIDF
RANK
BM25
BM25F
NO_RANKING
IDF
RANK_IDF
CUSTOM
CUSTOM_LUA
) for the terms
|
static boolean |
isA(java.lang.String str,
TermScoreConfig.Type item) |
static boolean |
isOneOf(java.lang.String str,
TermScoreConfig.Type... items) |
TermScoreConfig |
makeCopy()
Creates and returns a deep copy of this TermScoreConfig.
|
static TermScoreConfig |
readFrom(java.io.InputStream is)
Read this TermScoreConfig from an XML fragment.
|
void |
setCustomExpr(java.lang.String customExpr) |
void |
setCustomLuaScript(java.lang.String customLuaScript) |
void |
setScoreMap(java.lang.String scoreMap)
Comma-separated list of target weights for the ranking scores.
XXX: Should be cleanly documented elsewhere. |
void |
setType(java.lang.String type)
Select the ranking policy (
Value can be null or one of
RANK_TFIDF
TFIDF
RANK
BM25
BM25F
NO_RANKING
IDF
RANK_IDF
CUSTOM
CUSTOM_LUA
) for the terms
|
void |
setType(TermScoreConfig.Type item)
Select the ranking policy (
Value can be null or one of
RANK_TFIDF
TFIDF
RANK
BM25
BM25F
NO_RANKING
IDF
RANK_IDF
CUSTOM
CUSTOM_LUA
) for the terms
|
java.lang.String |
toString()
String representation of this TermScoreConfig.
|
TermScoreConfig |
withCustomExpr(java.lang.String customExpr) |
TermScoreConfig |
withCustomLuaScript(java.lang.String customLuaScript) |
TermScoreConfig |
withScoreMap(java.lang.String scoreMap) |
TermScoreConfig |
withType(java.lang.String type) |
void |
writeTo(java.io.OutputStream os)
Write this TermScoreConfig as an XML fragment
|
public java.lang.String type
public static final java.lang.String DEFAULT_TYPE
public java.lang.String scoreMap
public java.lang.String customExpr
public java.lang.String customLuaScript
public TermScoreConfig()
public TermScoreConfig(java.lang.String type)
public TermScoreConfig(TermScoreConfig o)
public static boolean isA(java.lang.String str, TermScoreConfig.Type item)
public static boolean isOneOf(java.lang.String str, TermScoreConfig.Type... items)
public void setType(TermScoreConfig.Type item)
public TermScoreConfig.Type getTypeAsEnum()
public void setType(java.lang.String type)
public java.lang.String getType()
public TermScoreConfig withType(java.lang.String type)
public void setScoreMap(java.lang.String scoreMap)
public java.lang.String getScoreMap()
public TermScoreConfig withScoreMap(java.lang.String scoreMap)
public void setCustomExpr(java.lang.String customExpr)
public java.lang.String getCustomExpr()
public TermScoreConfig withCustomExpr(java.lang.String customExpr)
public void setCustomLuaScript(java.lang.String customLuaScript)
public java.lang.String getCustomLuaScript()
public TermScoreConfig withCustomLuaScript(java.lang.String customLuaScript)
public TermScoreConfig makeCopy()
public static TermScoreConfig readFrom(java.io.InputStream is) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public void writeTo(java.io.OutputStream os) throws javax.xml.bind.JAXBException, java.io.IOException
javax.xml.bind.JAXBException
java.io.IOException
public static TermScoreConfig fromString(java.lang.String s) throws javax.xml.bind.JAXBException, java.io.UnsupportedEncodingException
javax.xml.bind.JAXBException
java.io.UnsupportedEncodingException
public java.lang.String toString()
toString
in class java.lang.Object
public void check(boolean deep, java.lang.String errorContext) throws com.exalead.util.TypedException
check
in interface com.exalead.util.Checkable
com.exalead.util.TypedException
Copyright © 2013 Dassault Systèmes, All Rights Reserved.