Class Hop

java.lang.Object
org.elasticsearch.client.graph.Hop
All Implemented Interfaces:
ToXContent, ToXContentFragment

public class Hop
extends java.lang.Object
implements ToXContentFragment
A Hop represents one of potentially many stages in a graph exploration. Each Hop identifies one or more fields in which it will attempt to find terms that are significantly connected to the previous Hop. Each field is identified using a VertexRequest

An example series of Hops on webserver logs would be:

  1. an initial Hop to find the top ten IPAddresses trying to access urls containing the word "admin"
  2. a secondary Hop to see which other URLs those IPAddresses were trying to access

Optionally, each hop can contain a "guiding query" that further limits the set of documents considered. In our weblog example above we might choose to constrain the second hop to only look at log records that had a reponse code of 404.

If absent, the list of VertexRequests is inherited from the prior Hop's list to avoid repeating the fields that will be examined at each stage.