public class Signal extends Object implements Serializable, Cloneable, Comparable
Modifier and Type | Class and Description |
---|---|
static class |
Signal.SimpleSignalCompare
Compares using type, query, docId, and principal.
|
Modifier and Type | Field and Description |
---|---|
static String |
CLICK
Signal type click that results from clicking a search result link
|
static String |
RATING
Signal type rating for that results from rating a search result
|
Constructor and Description |
---|
Signal() |
Modifier and Type | Method and Description |
---|---|
protected Signal |
clone() |
int |
compareTo(Object o) |
boolean |
equals(Object obj) |
String |
getDocId() |
long |
getDocOrdinal() |
RelevancyFeatureVector |
getFeatureVector() |
Locale |
getLocale() |
AttivioPrincipal |
getPrincipal() |
String |
getQuery() |
long |
getQueryTimestamp() |
String |
getRelevancyModelName() |
String[] |
getRelevancyModelNames() |
long |
getRelevancyModelVersion() |
static Signal |
getSignal(QueryResponse queryResponse,
int documentIndex)
Create a click signal with a strength of one
|
static Signal |
getSignal(QueryResponse queryResponse,
int documentIndex,
String signalType)
Create a signal with a signal strength of one
|
static Signal |
getSignal(QueryResponse queryResponse,
int documentIndex,
String signalType,
double signalStrength)
Create a signal
|
long |
getSignalTimestamp() |
String |
getType() |
double |
getWeight() |
int |
hashCode() |
boolean |
isTTL()
Get if TTL will be honored for this signal.
|
boolean |
isValid() |
static int |
nullCompare(Comparable o1,
Comparable o2) |
void |
setDocId(String docId) |
void |
setDocOrdinal(long docOrdinal) |
void |
setFeatureVector(RelevancyFeatureVector featureVector) |
void |
setLocale(Locale locale) |
void |
setPrincipal(AttivioPrincipal principal) |
void |
setQuery(String query) |
void |
setQueryTimestamp(long queryTimestamp) |
void |
setRelevancyModelName(String relevancyModelName) |
void |
setRelevancyModelNames(String... relevancyModelNames) |
void |
setRelevancyModelVersion(long relevancyModelVersion) |
void |
setSignalTimestamp(long signalTimestamp) |
void |
setTTL(boolean value)
Get if TTL will be honored for this signal.
|
void |
setType(String type) |
void |
setWeight(double weight) |
String |
toString() |
public static final String CLICK
public static final String RATING
public static Signal getSignal(QueryResponse queryResponse, int documentIndex, String signalType, double signalStrength)
queryResponse
- documentIndex
- the index from the offset of the document to associate with the signalsignalType
- the type of the signal (click, rate, screen time)signalStrength
- the strength of the signalpublic static Signal getSignal(QueryResponse queryResponse, int documentIndex, String signalType)
queryResponse
- documentIndex
- the index from the offset of the document to associate with the signalsignalType
- the type of the signal (click, rate, screen time)public static Signal getSignal(QueryResponse queryResponse, int documentIndex)
queryResponse
- documentIndex
- the index from the offset of the document to associate with the signalpublic String getType()
public void setType(String type)
type
- the signalType to setpublic double getWeight()
public boolean isTTL()
If this is false
, then the signal will be persistent and will not be deleted automatically.
public void setTTL(boolean value)
If this is false
, then the signal will be persistent and will not be deleted automatically.
public void setWeight(double weight)
weight
- the signal weight to setpublic String getRelevancyModelName()
public void setRelevancyModelName(String relevancyModelName)
relevancyModelName
- the relevancyModelName to setpublic long getRelevancyModelVersion()
public void setRelevancyModelVersion(long relevancyModelVersion)
relevancyModelVersion
- the relevancyModelVersion to setpublic long getQueryTimestamp()
public void setQueryTimestamp(long queryTimestamp)
queryTimestamp
- the queryTimestamp to setpublic long getSignalTimestamp()
public void setSignalTimestamp(long signalTimestamp)
signalTimestamp
- the queryTimestamp to setpublic RelevancyFeatureVector getFeatureVector()
public void setFeatureVector(RelevancyFeatureVector featureVector)
featureVector
- the featureVector to setpublic AttivioPrincipal getPrincipal()
public void setPrincipal(AttivioPrincipal principal)
principal
- the principal to setpublic String getDocId()
public void setDocId(String docId)
docId
- the docId to setpublic long getDocOrdinal()
public void setDocOrdinal(long docOrdinal)
docOrdinal
- the docOrdinal to setpublic String getQuery()
public void setQuery(String query)
query
- the query to setpublic Locale getLocale()
public void setLocale(Locale locale)
locale
- the locale to setpublic String[] getRelevancyModelNames()
public void setRelevancyModelNames(String... relevancyModelNames)
relevancyModelNames
- the relevancyModelNames to setpublic boolean isValid()
protected Signal clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public static int nullCompare(Comparable o1, Comparable o2)
public int compareTo(Object o)
compareTo
in interface Comparable
Copyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.