java.lang.Object
org.elasticsearch.protocol.xpack.graph.Vertex
- All Implemented Interfaces:
org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentFragment
A vertex in a graph response represents a single term (a field and value pair)
which appears in one or more documents found as part of the graph exploration.
A vertex term could be a bank account number, an email address, a hashtag or any
other term that appears in documents and is interesting to represent in a network.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn identifier (implements hashcode and equals) that represents a unique key for aVertexNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params -
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Vertex.VertexIdA convenience method for creating aVertex.VertexIdbooleanlonggetBg()If theGraphExploreRequest.useSignificance(boolean)is true (the default) this statistic is available.longgetFg()If theGraphExploreRequest.useSignificance(boolean)is true (the default) this statistic is available.getField()intgetId()getTerm()doubleThe weight of a vertex is an accumulation of all of theConnections that are linked to thisVertexas part of a graph exploration.inthashCode()voidsetFg(long fg) voidsetWeight(double weight) toString()org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Constructor Details
-
Vertex
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
getId
- Returns:
- a
Vertex.VertexIdobject that uniquely identifies this Vertex
-
createId
A convenience method for creating aVertex.VertexId- Parameters:
field- the fieldterm- the term- Returns:
- a
Vertex.VertexIdthat can be used for looking up vertices
-
toString
-
getField
-
getTerm
-
getWeight
public double getWeight()The weight of a vertex is an accumulation of all of theConnections that are linked to thisVertexas part of a graph exploration. It is used internally to identify the most interesting vertices to be returned.- Returns:
- a measure of the
Vertex's relative importance.
-
setWeight
public void setWeight(double weight) -
getBg
public long getBg()If theGraphExploreRequest.useSignificance(boolean)is true (the default) this statistic is available.- Returns:
- the number of documents in the index that contain this term (see bg_count in the significant_terms aggregation)
-
getFg
public long getFg()If theGraphExploreRequest.useSignificance(boolean)is true (the default) this statistic is available. Together withgetBg()these numbers are used to derive the significance of a term.- Returns:
- the number of documents in the sample of best matching documents that contain this term (see fg_count in the significant_terms aggregation)
-
setFg
public void setFg(long fg) -
getHopDepth
public int getHopDepth()- Returns:
- the sequence number in the series of hops where this Vertex term was first encountered
-