Skip to main content
Version: 2.0

Broker Indexing Endpoints

Endpoints to use if a broker is set up to use GraphGrid Search.

Broker Index Policy Full

Create documents and store them for each index. Uses the broker method specified in the index strategies. Returns a 200 OK response.

Base URL: /1.0/search/{{clusterName}}/brokerIndexPolicyFull/{{policyName}}/{{indexStrategy}}
Method: POST

ParameterDescription
clusterName stringThe GraphGrid Cluster with an Index Policy.
policyName stringThe name used to load the index policy from S3.
indexStrategy stringThe index strategy to be used for indexing (if using generated strategies this should be brokerFull).

Broker Index Policy Partial

Create documents and store them for each index for nodes where updatedAt > lastSearchIndexedAt. Uses the broker method specified in the index strategies. Returns a 200 OK response.

Base URL: /1.0/search/{{clusterName}}/brokerIndexPolicyPartial/{{policyName}}/{{indexStrategy}}
Method: POST

ParameterDescription
clusterName stringThe GraphGrid Cluster with an Index Policy.
policyName stringThe name used to load the index policy from S3.
indexStrategy stringThe index strategy to be used for indexing (if using generated strategies this should be brokerPartial)ß.

Broker Index Full

Create documents and storeß them for the specified index. Uses the broker method specified in the index strategies. Returns a 200 OK response.

Base URL: /1.0/search/{{clusterName}}/brokerIndexFull/{{policyName}}/{{indexName}}/{{indexStrategy}}
Method:POST

ParameterDescription
clusterName stringThe GraphGrid Cluster with an Index Policy.
policyName stringThe name used to load the index policy from S3.
indexName stringThe name of the index to create documents for.
indexStrategy stringThe index strategy to be used for indexing. If using generated strategies this should be brokerFull.

Broker Index Partial

Create documents and store them for the specified index. Only indexes nodes where updatedAt > lastSearchIndexedAt. Uses the broker method specified in the index strategies. Returns a 200 OK response.

Base URL: /1.0/search/{{clusterName}}/brokerIndexPartial/{{policyName}}/{{indexName}}/{{indexStrategy}}
Method: POST

ParameterDescription
clusterName stringThe GraphGrid Cluster with an Index Policy.
policyName stringThe name used to load the index policy from S3.
indexName stringThe name of the index to create documents for.
indexStrategy stringThe index strategy to be used for indexing. If using generated strategies this should be brokerPartial.

Broker Continuous Indexing Triggers

The continuous index make use of custom apoc broker integrations. They work by picking up changes on the graph, doing some simple processing in Geequel, and then sending messages to a configured broker (RabbitMQ, SQS, or Kafka). Our modules listen to the broker(s), pulls the new messages, and then kicks off the java-based processing.

The endpoints for adding triggers to the graph return a 200 OK response if successful

RabbitMQ

curl --location --request POST "${API_BASE}/1.0/search/default/rabbitmqContinuousIndexingTrigger/gg-dev-index-policy/defaultBroker" \
--header "Authorization: Bearer ${BEARER_TOKEN}"

Kafka

curl --location --request POST "${API_BASE}/1.0/search/default/kafkaContinuousIndexingTrigger/gg-dev-index-policy/defaultBroker" \
--header "Authorization: Bearer ${BEARER_TOKEN}"

SQS

curl --location --request POST "${API_BASE}/1.0/search/default/sqsContinuousIndexingTrigger/gg-dev-index-policy/defaultBroker" \
--header "Authorization: Bearer ${BEARER_TOKEN}"

To check that Continuous Indexing is running use this Geequel query in ONgDB:

CALL apoc.trigger.list

This will return a list of all the apoc triggers that are running. You should see the name of the index policy with continuousIndexing hyphenated at the end of it.

To remove the indexing trigger run:

CALL apoc.trigger.remove("<trigger_name>")