Meta Engines
NOTE: Meta Engines are only available in the Elastic Cloud and Self-Managed version of App Search, with a Platinum License.
Meta Engines are primarily managed through the Engines API.
Meta Engines have a type
property of meta
, and support a source_engines
property.
curl -X POST 'https://localhost:3002/api/as/v1/engines' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxxxx' \
-d '{
"name": "national-parks",
"type": "meta",
"source_engines": [
"eastern-national-parks",
"western-national-parks"
]
}'
curl -X POST 'https://localhost:3002/api/as/v1/engines' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxxxx' \
-d '{
"name": "national-parks",
"type": "meta",
"source_engines": [
"eastern-national-parks",
"western-national-parks"
]
}'
curl -X POST 'https://localhost:3002/api/as/v1/engines' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxxxx' \
-d '{
"name": "national-parks",
"type": "meta",
"source_engines": [
"eastern-national-parks",
"western-national-parks"
]
}'
curl -X POST 'https://localhost:3002/api/as/v1/engines' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxxxx' \
-d '{
"name": "national-parks",
"type": "meta",
"source_engines": [
"eastern-national-parks",
"western-national-parks"
]
}'
curl -X POST 'https://localhost:3002/api/as/v1/engines' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxxxx' \
-d '{
"name": "national-parks",
"type": "meta",
"source_engines": [
"eastern-national-parks",
"western-national-parks"
]
}'
curl -X POST 'https://localhost:3002/api/as/v1/engines' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxxxx' \
-d '{
"name": "national-parks",
"type": "meta",
"source_engines": [
"eastern-national-parks",
"western-national-parks"
]
}'
Documents will have the following fields to help orient yourself within Meta Engine documents:
{
// The Scoped Document ID, which is the canonical ID for documents within a Meta Engine
// context. This is the Engine Name and Document ID joined with a pipe character ("|").
"id": "eastern-national-parks|park_acadia",
{
"_meta": {
// Source Engine document belongs to
"engine": "eastern-national-parks",
// Un-scoped Document ID
"id": "park_acadia"
},
}
}
The _engine
field can be used to filter documents by Source Engine.
curl -X POST 'https://localhost:3002/api/as/v1/engines/national-parks/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
"query": "",
"filters": {
"_engine": ["eastern-national-parks"]
}
}'
curl -X POST 'https://localhost:3002/api/as/v1/engines/national-parks/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
"query": "",
"filters": {
"_engine": ["eastern-national-parks"]
}
}'
curl -X POST 'https://localhost:3002/api/as/v1/engines/national-parks/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
"query": "",
"filters": {
"_engine": ["eastern-national-parks"]
}
}'
curl -X POST 'https://localhost:3002/api/as/v1/engines/national-parks/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
"query": "",
"filters": {
"_engine": ["eastern-national-parks"]
}
}'
curl -X POST 'https://localhost:3002/api/as/v1/engines/national-parks/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
"query": "",
"filters": {
"_engine": ["eastern-national-parks"]
}
}'
curl -X POST 'https://localhost:3002/api/as/v1/engines/national-parks/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \
-d '{
"query": "",
"filters": {
"_engine": ["eastern-national-parks"]
}
}'
Any other API endpoint within a Meta Engine that requires a Document ID as a parameter will require a Scoped Document ID to be used.
curl -X POST 'https://localhost:3002/api/as/v1/engines/national-parks/curations' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxxxxxxxx' \
-d '{
"queries": [
"acadia"
],
"promoted": [
"eastern-national-parks|park_acadia"
]
}'
curl -X POST 'https://localhost:3002/api/as/v1/engines/national-parks/curations' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxxxxxxxx' \
-d '{
"queries": [
"acadia"
],
"promoted": [
"eastern-national-parks|park_acadia"
]
}'
curl -X POST 'https://localhost:3002/api/as/v1/engines/national-parks/curations' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxxxxxxxx' \
-d '{
"queries": [
"acadia"
],
"promoted": [
"eastern-national-parks|park_acadia"
]
}'
curl -X POST 'https://localhost:3002/api/as/v1/engines/national-parks/curations' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxxxxxxxx' \
-d '{
"queries": [
"acadia"
],
"promoted": [
"eastern-national-parks|park_acadia"
]
}'
curl -X POST 'https://localhost:3002/api/as/v1/engines/national-parks/curations' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxxxxxxxx' \
-d '{
"queries": [
"acadia"
],
"promoted": [
"eastern-national-parks|park_acadia"
]
}'
curl -X POST 'https://localhost:3002/api/as/v1/engines/national-parks/curations' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxxxxxxxxxx' \
-d '{
"queries": [
"acadia"
],
"promoted": [
"eastern-national-parks|park_acadia"
]
}'
In addition to the Engines API, the following endpoints can be used with Meta Engines:
Add Source Engines
This feature is available to Elastic Cloud and self-managed App Search deployments. See Meta Engines in the self-managed App Search documentation.
Remove Source Engines
This feature is available to Elastic Cloud and self-managed App Search deployments. See Meta Engines in the self-managed App Search documentation.