Direct (non-broker) Indexing Endpoints
Endpoints to use if data is being sent directly to Elasticsearch to be indexed, and no message broker is set up to use GraphGrid Search.
Direct Index
Indexes a policy that does not utilize a broker.
Base URL: /1.0/search/{{clusterName}}/directIndexPolicy/{{policyName}}/{{indexStrategy}}
Method: GET
Parameter | Description |
---|---|
indexStrategy string | The index strategy to be used for indexing. |
Request
curl --location --request GET "${API_BASE}/1.0/search/default/directIndexPolicy/gg-dev-index-policy/default_partial" \
--header "Authorization: Bearer ${BEARER_TOKEN}"
Response
{
"metadata": {
"description": "Generated index policy for node types: [Movie, Person].",
"displayName": "example-index-policy",
"createdAt": "2021-03-12T18:57:14.247Z",
"updatedAt": "2021-03-12T18:57:14.248Z",
"versions": [],
"state": "OFFLINE"
},
"caption": {
"priority": [
{
"property": "title"
},
{
"property": "name"
},
{
"property": "address"
},
{
"property": "phone"
},
{
"property": "grn"
}
]
},
"parameter": null,
"hardFilter": null,
"indexes": {
"movie": {
"indexData": {
"description": "Generated 'movie' index from the 'Movie' node type.",
"displayName": "movie",
"caption": {
"priority": []
}
},
"indexStrategies": {
"defaultBroker": {
"producer": "MATCH (n:`Movie`) WHERE n.grn IN {idList} WITH n AS `movie` RETURN `movie`",
"anchorLabel": "Movie",
"anchorId": "movie.grn",
"anchor": "movie",
"batchSize": "1000",
"parallel": "false",
"retries": "0",
"iterateList": "true",
"broker": "DIRECT"
},
"defaultPartial": {
"producer": "MATCH (n:`Movie`) WHERE n.updatedAt > n.lastSearchIndexedAt WITH n AS `movie` RETURN `movie`",
"anchorLabel": "Movie",
"anchorId": "movie.grn",
"anchor": "movie",
"batchSize": "1000",
"parallel": "false",
"retries": "0",
"iterateList": "true",
"broker": "DIRECT"
},
"defaultFull": {
"producer": "MATCH (n:`Movie`) WITH n AS `movie` RETURN `movie`",
"anchorLabel": "Movie",
"anchorId": "movie.grn",
"anchor": "movie",
"batchSize": "1000",
"parallel": "false",
"retries": "0",
"iterateList": "true",
"broker": "DIRECT"
}
},
"settings": {},
"mappings": null,
"schema": {
"createdAt": {
"schema": {
"generatorStrategies": {
"defaultBroker": "",
"defaultPartial": "",
"defaultFull": ""
}
},
"searchQuery": {},
"viewRequirements": {}
},
"grn": {
"schema": {
"generatorStrategies": {
"defaultBroker": "",
"defaultPartial": "",
"defaultFull": ""
}
},
"searchQuery": {},
"viewRequirements": {}
},
"lastSearchIndexedAt": {
"schema": {
"generatorStrategies": {
"defaultBroker": "",
"defaultPartial": "",
"defaultFull": ""
}
},
"searchQuery": {},
"viewRequirements": {}
},
"tagline": {
"schema": {
"generatorStrategies": {
"defaultBroker": "",
"defaultPartial": "",
"defaultFull": ""
}
},
"searchQuery": {},
"viewRequirements": {}
},
"title": {
"schema": {
"generatorStrategies": {
"defaultBroker": "",
"defaultPartial": "",
"defaultFull": ""
}
},
"searchQuery": {},
"viewRequirements": {}
},
"released": {
"schema": {
"generatorStrategies": {
"defaultBroker": "",
"defaultPartial": "",
"defaultFull": ""
}
},
"searchQuery": {},
"viewRequirements": {}
},
"updatedAt": {
"schema": {
"generatorStrategies": {
"defaultBroker": "",
"defaultPartial": "",
"defaultFull": ""
}
},
"searchQuery": {},
"viewRequirements": {}
}
},
"hardFilter": null,
"viewRequirements": {}
},
"person": {
"indexData": {
"description": "Generated 'person' index from the 'Person' node type.",
"displayName": "person",
"caption": {
"priority": []
}
},
"indexStrategies": {
"defaultBroker": {
"producer": "MATCH (n:`Person`) WHERE n.grn IN {idList} WITH n AS `person` RETURN `person`",
"anchorLabel": "Person",
"anchorId": "person.grn",
"anchor": "person",
"batchSize": "1000",
"parallel": "false",
"retries": "0",
"iterateList": "true",
"broker": "DIRECT"
},
"defaultPartial": {
"producer": "MATCH (n:`Person`) WHERE n.updatedAt > n.lastSearchIndexedAt WITH n AS `person` RETURN `person`",
"anchorLabel": "Person",
"anchorId": "person.grn",
"anchor": "person",
"batchSize": "1000",
"parallel": "false",
"retries": "0",
"iterateList": "true",
"broker": "DIRECT"
},
"defaultFull": {
"producer": "MATCH (n:`Person`) WITH n AS `person` RETURN `person`",
"anchorLabel": "Person",
"anchorId": "person.grn",
"anchor": "person",
"batchSize": "1000",
"parallel": "false",
"retries": "0",
"iterateList": "true",
"broker": "DIRECT"
}
},
"settings": {},
"mappings": null,
"schema": {
"createdAt": {
"schema": {
"generatorStrategies": {
"defaultBroker": "",
"defaultPartial": "",
"defaultFull": ""
}
},
"searchQuery": {},
"viewRequirements": {}
},
"grn": {
"schema": {
"generatorStrategies": {
"defaultBroker": "",
"defaultPartial": "",
"defaultFull": ""
}
},
"searchQuery": {},
"viewRequirements": {}
},
"lastSearchIndexedAt": {
"schema": {
"generatorStrategies": {
"defaultBroker": "",
"defaultPartial": "",
"defaultFull": ""
}
},
"searchQuery": {},
"viewRequirements": {}
},
"born": {
"schema": {
"generatorStrategies": {
"defaultBroker": "",
"defaultPartial": "",
"defaultFull": ""
}
},
"searchQuery": {},
"viewRequirements": {}
},
"name": {
"schema": {
"generatorStrategies": {
"defaultBroker": "",
"defaultPartial": "",
"defaultFull": ""
}
},
"searchQuery": {},
"viewRequirements": {}
},
"lon": {
"schema": {
"generatorStrategies": {
"defaultBroker": "",
"defaultPartial": "",
"defaultFull": ""
}
},
"searchQuery": {},
"viewRequirements": {}
},
"lat": {
"schema": {
"generatorStrategies": {
"defaultBroker": "",
"defaultPartial": "",
"defaultFull": ""
}
},
"searchQuery": {},
"viewRequirements": {}
},
"updatedAt": {
"schema": {
"generatorStrategies": {
"defaultBroker": "",
"defaultPartial": "",
"defaultFull": ""
}
},
"searchQuery": {},
"viewRequirements": {}
}
},
"hardFilter": null,
"viewRequirements": {}
}
},
"globals": {},
"views": {}
}
Custom Direct Index with Index Policy
Indexes a specific index property for a policy that does not utilize a broker. Requires an Index Policy to be passed in.
Base URL: /1.0/search/{clusterName}/directIndex/{policyName}/{indexName}/{indexStrategyName}
Method: POST
Parameter | Description |
---|---|
indexName string | The index for which the automatic indexing will be set up |
indexStrategy string | The index strategy to be used for indexing. |
Request
curl --location --request GET "${API_BASE}/1.0/search/default/directIndexPolicy/gg-dev-index-policy/defaultFull" \
--header "Authorization: Bearer ${BEARER_TOKEN}" \
--header 'Content-Type: application/json' \
--data-raw '{
"nodeTypes" : [
"person"
]
}'
Response
{
"metadata": {
"description": "Generated index policy for node types: Person.",
"displayName": "person-index",
"createdAt": "2018-07-17T13:59:37-04:00",
"updatedAt": "2018-07-17T13:59:38-04:00",
"state": "OFFLINE",
"versions": []
},
"indexes": {
"person": {
"indexData": {
"description": "Generated 'person' index from the 'Person' node type.",
"displayName": "person"
},
"indexStrategies": {
"defaultPartial": {
"producer": "MATCH (n:`Person`) WHERE n.updatedAt > n.lastSearchIndexedAt WITH n AS person RETURN person",
"anchorLabel": "Person",
"anchorId": "person.grn",
"anchor": "person",
"batchSize": "1000",
"parallel": "true",
"retries": "0",
"iterateList": "true"
}
},
"schema": {
"born": {
"schema": {
"generatorStrategies": {
"defaultPartial": ""
}
},
"searchQuery": {},
"tokenizer": null,
"suggester": null
},
"name": {
"schema": {
"generatorStrategies": {
"defaultPartial": ""
}
},
"searchQuery": {},
"tokenizer": null,
"suggester": null
}
}
}
},
"globals": {}
}