Elasticsearch REST API
Full-text indexing and search is supported by Elasticsearch. In the local development environment, you can access the Elasticsearch server at https://localhost:9200.
Index
When you execute the reindex action, all objects with supported data types that have the Text Search flag enabled are indexed.
Supported Data Types
Max Data Type
Mapping Elasticsearch Data Type
Boolean
Boolean
date
time
timestamp
Date
number
percent
rollup
Double
Integer
Long
address
code
content
currency_amount
dynamic_relationship
email
identifier
option_list
quantity
phone_number
relationship
status
string
string_localized
text
text_localized
url
Text
uuid
Keyword
Index Structure
Elasticsearch has no strict constraint between types and fields. In cases where two fields with the same name have different types, the fields must have the same data type. Field full identifiers cannot be used as index field names, which means that record UUIDs are used for indexing. For more information, see https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html#field-conflicts.
Max Data Type
Elasticsearch Field Name
Description
primary_content
The record UUID and primary field value.
record_content
All field values exclude:
Record UUID
Primary field value
relationship field value
dynamic_relationship field value
related_content
relationship field value and dynamic_relationship field value
option_list
relationship
dynamic_relationship
Record UUID
_Record UUID
Record UUID is the readable text value. When prepended with an underscore, this is the actual value in the database. Following is an example Record UUID value for a dynamic relationship for the Showcase object:
"0cd6c065-5648-4f38-b7e4-af1f3c267993":"System Administrator"
Following is an example _Record UUID value for the same relationship and object:
"_0cd6c065-5648-4f38-b7e4-af1f3c267993":["764f0869-8b2a-4e43-8f23-88f593863eff","8b283436-18f9-3cb7-a1f8-2d330fe154cf"]
All other supported data types except:
option_list
relationship
dynamic_relationship
Record UUID
Tagged Records multiple dynamic relationship
tag
The tag function supports querying records through tags. The value is an array of tagged record UUIDs.
* 
Elasticsearch fields that start with underscores are for storage purposes, are not indexed, and cannot be searched.
Useful Index URLs
To execute reindexing:
https://<hostname>/search/indexer?index_action=reindex
To check whether full-text reindexing is complete:
https://<hostname>/<instance>/check_indexing_status
To find a document in Elasticsearch:
https://localhost:9200/cbea5c2e-2c69-45f1-b990-a77d100f9bda/294ae5eb-952b-467e-a2fc-d27751221d2a/41f19ff6-2738-4000-8bfd-a18950caa1d1
Where:
cbea5c2e-2c69-45f1-b990-a77d100f9bda is the index name,
294ae5eb-952b-467e-a2fc-d27751221d2a is the Showcase object record UUID, and
41f19ff6-2738-4000-8bfd-a18950caa1d1 is a single Showcase record UUID.
Search
Search queries with the Elasticsearch DSL and the auto-complete search filter are currently supported. For more information, see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html.
The search URL is /search.
Search Parameters
Parameter
Description
q
The text of the query. Can be set as a single url parameter.
type
The type of objects to search. Multiple types can be specified in a comma-separated list. Can be set as a single url parameter.
_source
The result fields expected from the specified search options. Must be specified as field UUIDs. Multiple fields can be specified in a comma-separated list. Can be set as a single url parameter.
order_by
The field by which to order results, specified as a field UUID. In the current implementation, this value must be in the _source parameter. Can be set as a single url parameter.
order_option
For order_by, you can set asc or desc. If not specified, asc is the default. Can be set as a single url parameter.
size
The number of records to return. If not specified, 25 records are returned by default. Can be set as a single url parameter.
include_inactive
Whether to return inactive records. Values are true or false. Can be set as a single url parameter.
query
A JSON string that specifies the Elasticsearch DSL.
search_filter
A JSON string that specifies the auto-complete search filter. For more information, see the Max how-to article How to implement auto-complete search filters to restrict matches in relationship fields. You can also use the Configure Auto-Complete Search Filter option in Form Designer.
* 
If the same parameter is in the URL and the request body, the URL parameter value takes priority.
Search Examples
Globally query servicemax:
POST https://localhost:8080/search?q=servicemax
Query the text showcase in records of an object:
* 
In this sample, the UUID value for the target object is 016e5041-d28e-32b2-b2ac-2db3f1406411.
POST https://localhost:8080/search?q=showcase&type=016e5041-d28e-32b2-b2ac-2db3f1406411
To return the first 5 records found with the text showcase:
POST https://localhost:8080/search?q=servicemax&type=016e5041-d28e-32b2-b2ac-2db3f1406411&size=5
Query the text developer in an object and the User object:
POST https://localhost:8080/search?q=developer&type=016e5041-d28e-32b2-b2ac-2db3f1406411,8b283436-18f9-3cb7-a1f8-2d330fe154cf&size=10
Return only the name or username field:
POST https://localhost:8080/search?q=developer&type=016e5041-d28e-32b2-b2ac-2db3f1406411,8b283436-18f9-3cb7-a1f8-2d330fe154cf&size=10&_source=c74f2dd8-b910-11e0-87b3-00ff79122e2e,d77220e1-0617-429e-a7cc-3b0fea9b5e06
Query the _all field:
POST https://localhost:8080/search?type=016e5041-d28e-32b2-b2ac-2db3f1406411,8b283436-18f9-3cb7-a1f8-2d330fe154cf&size=10

{
"query": {
"match": {
"_all": "servicemax"
}
}
}
Query a specific field:
POST https://localhost:8080/search?type=8b283436-18f9-3cb7-a1f8-2d330fe154cf

{
"query": {
"match": {
"d77220e1-0617-429e-a7cc-3b0fea9b5e06": "system"
}
}
}
Query a specific field with exact matching:
POST http://localhost:8080/search?type=8b283436-18f9-3cb7-a1f8-2d330fe154cf

{
"query": {
"match": {
"d77220e1-0617-429e-a7cc-3b0fea9b5e06": "system"
}
}
}
Query multiple objects and multiple fields:
POST https://localhost:8080/search?type=016e5041-d28e-32b2-b2ac-2db3f1406411,8b283436-18f9-3cb7-a1f8-2d330fe154cf

{
"query" : {
"bool" : {
"should" : [
{
"match" : {
"d77220e1-0617-429e-a7cc-3b0fea9b5e06": "system"
}
},
{
"match" : {
"c74f2dd8-b910-11e0-87b3-00ff79122e2e": "showcase"
}
}
]
}}
}
Search with filters and specify all parameters in request body:
POST https://localhost:8080/search

{
"type": "016e5041-d28e-32b2-b2ac-2db3f1406411",
"_source": "c74f2dd8-b910-11e0-87b3-00ff79122e2e",
"order_by": "c74f2dd8-b910-11e0-87b3-00ff79122e2e",
"order_option": "desc",
"query": {
"match": {
"c74f2dd8-b910-11e0-87b3-00ff79122e2e": "business"
}
},
"search_filter": [
{
"clause": "io_name is not null"
}
]
}
Search for field objects with matching Short Description and Datatype values and an Identifier field value of identifier:
POST https://localhost:8080/search

{
"type": "18a79edb-06b0-32ef-a3ae-42bc00dc98a0",
"_source": "c73849e2-b910-11e0-87b3-00ff79122e2e,78f92a42-0228-419f-b455-601c4fff85e6",
"query": {
"match": {
"78f92a42-0228-419f-b455-601c4fff85e6": "Datatype"
}
},
"search_filter": [
{
"object": "18a79edb-06b0-32ef-a3ae-42bc00dc98a0",
"connector": "AND",
"type": "object",
"rules": [
{
"field": "6c47ea42-b910-11e0-9a37-00ff79122e2e",
"operator": "equal",
"value": [
{
"value": "identifier",
"type": "value"
}
],
"type": "rule"
}
]
}
]
}
Return fields with many different data types:
POST https://localhost:8080/search

{
"type": "294ae5eb-952b-467e-a2fc-d27751221d2a",
"_source": "50be4c40-d099-45e2-a45d-269c70f7a979,6a0d41f8-942d-40ca-bd59-d006a804d52a,9a441b46-4850-4345-8b2a-23df655a8612,5d1ed041-9ea6-4962-a80a-d1432ec6a527,e80c5419-7b89-41c0-a223-448c5f0ed1bf,117f2e36-0756-4652-816b-d8ed175d9628,eca64d35-2338-4445-b87d-07597bcf4bbb,c32e2b7d-9f14-48e1-b9d7-a67c3301bda7,503afcc9-f978-4f99-a835-4025e52e149a,4ca4801a-6b15-491e-87c7-27e8f088b28c,17ff7527-f11c-4f27-98dc-73d729550969,bd81be5b-aa4a-4aa7-a889-bb5c07673dd7,854ab534-2511-4404-bf19-c74ab80ae91e,0cd6c065-5648-4f38-b7e4-af1f3c267993",
"query": {
"match": {
"0cd6c065-5648-4f38-b7e4-af1f3c267993": "system"
}
},
"search_filter": [
{
"object": "294ae5eb-952b-467e-a2fc-d27751221d2a",
"connector": "AND",
"type": "object",
"rules": [
{
"field": "8b9f108c-a1a2-4623-955c-647cd5f978b1",
"operator": "is_not_null",
"value": null,
"type": "rule"
}
]
}
]
}
Query by tag:
* 
In this sample, the tag record UUID is af10c8fd-9c8f-422c-ae71-d1791dba7151.
POST https://localhost:8080/search

{
"query": {
"match": {
"tag": "af10c8fd-9c8f-422c-ae71-d1791dba7151"
}
}
}
Query by the UUID of the related record:
* 
This example queries for records of the Showcase object with the Showcase Dynamic Relationship field set to the Standard User role.
POST https://localhost:8080/search

{
"type": "294ae5eb-952b-467e-a2fc-d27751221d2a",
"query": {
"match": {
"_0cd6c065-5648-4f38-b7e4-af1f3c267993": "91504adf-2564-49c7-a612-9956b796b5a2"
}
}
}
Query with request highlighting:
POST https://localhost:8080/search

{
"type": "71b7ae3e-b21e-11e0-90ab-001ec93afa2c",
"query": {
"bool": {
"should": [
{
"wildcard": {
"7d04de0d-af8b-4ec1-9261-b6d404fcf638": {
"value": "*bpm*"
}
}
},
{
"wildcard": {
"7203f9ba-b21e-11e0-90ab-001ec93afa2c": {
"value": "*bpm*"
}
}
}
]
}
},
"highlight": {
"fields": {
"*": {
"fragment_size": 50,
"number_of_fragments": 3
}
},
"require_field_match": false
}
}
* 
Specify fragment_size to configure fragment content length, and number_of_fragments to define the maximum number of fragments. For more details on other parameters that support request highlighting, see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-highlighting.html.
Sample Returned Results
[
{
"highlight": {
"io_name": [
"Max <em>BPM</em>"
],
"name": [
"Max <em>BPM</em>"
],
"io_identifier": [
"<em>bpm</em>"
],
"io_description": [
"Max <em>BPM</em> – Business Process Management. This is"
]
},
"_object_name": "Application",
"_record": "6c2e57e1-0bfe-4261-8da3-64d076db9b1e",
"_record_name": "Max BPM",
"_score": "2.0",
"_object": "71b7ae3e-b21e-11e0-90ab-001ec93afa2c"
},
{
"highlight": {
"io_application": [
"Max <em>BPM</em>"
],
"io_description": [
" the processes in Max <em>BPM</em> use. This logic, also"
]
},
"_object_name": "Application",
"_record": "ae5a99b2-b7c8-4bbc-90d2-dfca254d67a7",
"_record_name": "Max BRM",
"_score": "1.0",
"_object": "71b7ae3e-b21e-11e0-90ab-001ec93afa2c"
}
]
Query with auto_complete client:
GET http://localhost:8080/search?q=business&client=auto_complete&type=016e5041-d28e-32b2-b2ac-2db3f1406411
Query on application scope type:
* 
In this sample, 7a4979b5-ceb1-47a9-842b-7c761748fbc5 represents the UUID for the Max Designer application.
GET http://localhost:8080/search?q=business&type=7a4979b5-ceb1-47a9-842b-7c761748fbc5&scope_type=application
Query on an uploaded attachment:
You can find attachment filenames by using the Search All option on the Networktab of the Developer Tools pane in Google Chrome to generate a POST request. Check the response for the filename and send the following request:
POST https://<hostname>search

{
"include_inactive": true,
"q": "test.txt",
"_source": "78f92a42-0228-419f-b455-601c4fff85e6,1389724a-537d-4c76-8203-6e94f0c48129,584b3176-1db6-4bd3-aa4a-2cf7de65838c,117f2e36-0756-4652-816b-d8ed175d9628,8620ee14-5611-4722-842d-84f4354c67dc",
"search_fields": "id,name:50,content",
"scope_type": ""
}
Sample Returned Results
The following sample results include multiple existing files with the same filename because no filters were specified in the request body.
[
{
"_io_updated_by": "764f0869-8b2a-4e43-8f23-88f593863eff",
"io_updated_by": "System Administrator",
"_object_name": "Document",
"io_owner": "System Administrator",
"_record": "db2f0f15-1d96-46d2-a0d8-978ce973b57f",
"_record_name": "file.pdf",
"io_updated_on": "2017-11-20T06:56:50.174Z",
"_score": "682.2858",
"io_active": true,
"_io_owner": "764f0869-8b2a-4e43-8f23-88f593863eff",
"_object": "6875c504-b21e-11e0-90ab-001ec93afa2c"
},
{
"_io_updated_by": "764f0869-8b2a-4e43-8f23-88f593863eff",
"io_updated_by": "System Administrator",
"_object_name": "Version",
"io_owner": "System Administrator",
"_record": "2dfc8ee2-4868-4485-bba4-d7a7400a89ba",
"_record_name": "file.pdf",
"io_updated_on": "2017-11-20T06:56:50.174Z",
"_score": "682.2858",
"io_active": true,
"_io_owner": "764f0869-8b2a-4e43-8f23-88f593863eff",
"_object": "6bd99fd6-b21e-11e0-90ab-001ec93afa2c"
},
{
"_object_name": "Version",
"_record": "676ba4ca-582e-4b29-8bfb-cba291cfcc58",
"_record_name": "test.txt",
"doc_type": "f",
"_score": "15.217022",
"io_active": true,
"_object": "6bd99fd6-b21e-11e0-90ab-001ec93afa2c"
}
]
Search with output_context:
GET http://localhost:8080/search?q=bpm&type=016e5041-d28e-32b2-b2ac-2db3f1406411,71b7ae3e-b21e-11e0-90ab-001ec93afa2c&size=10&_source=117f2e36-0756-4652-816b-d8ed175d9628,224517f5-bdaa-4ff1-a021-54bcc3162c2e,f6260c83-0229-4a59-97da-cb451457feea&output_context=true
Sample Returned Results
{
"context": {
"71b7ae3e-b21e-11e0-90ab-001ec93afa2c": {
"io_application": {
"datatype": "io_relationship",
"name": "Application"
},
"io_custodian": {
"datatype": "io_relationship",
"name": "Custodian"
},
"io_owner": {
"datatype": "io_relationship",
"name": "Owner"
}
},
"016e5041-d28e-32b2-b2ac-2db3f1406411": {
"io_application": {
"datatype": "io_relationship",
"name": "Application"
},
"io_custodian": {
"datatype": "io_relationship",
"name": "Custodian"
},
"io_owner": {
"datatype": "io_relationship",
"name": "Owner"
}
}
},
"records": [
{
"io_application": "Max",
"_io_application": "6c0f1c54-71dd-4271-8865-d17f14cea59f",
"io_custodian": "ServiceMax",
"_object_name": "Application",
"io_owner": "Sam Dai",
"_io_custodian": "c9d336e0-824c-4be1-9bf2-feff5261b69e",
"_record": "6c2e57e1-0bfe-4261-8da3-64d076db9b1e",
"_record_name": "Max BPM",
"_score": "3.920701",
"_io_owner": "9e992754-f4cd-4a0a-820e-99ae54a455fc",
"_object": "71b7ae3e-b21e-11e0-90ab-001ec93afa2c"
},
{
"io_application": "Max BPM",
"_io_application": "6c2e57e1-0bfe-4261-8da3-64d076db9b1e",
"io_custodian": "ServiceMax",
"_object_name": "Application",
"io_owner": "Sam Dai",
"_io_custodian": "c9d336e0-824c-4be1-9bf2-feff5261b69e",
"_record": "ae5a99b2-b7c8-4bbc-90d2-dfca254d67a7",
"_record_name": "Max BRM",
"_score": "2.766375",
"_io_owner": "9e992754-f4cd-4a0a-820e-99ae54a455fc",
"_object": "71b7ae3e-b21e-11e0-90ab-001ec93afa2c"
},
{
"io_application": "Max ESB",
"_io_application": "2077a249-ceca-443c-a068-ca1479f94f61",
"io_custodian": "ServiceMax",
"_object_name": "Object",
"io_owner": "Johnny Song",
"_io_custodian": "c9d336e0-824c-4be1-9bf2-feff5261b69e",
"_record": "143a2e83-1d8f-40ab-8e67-05ec5874f202",
"_record_name": "Initiate Process",
"_score": "2.3391395",
"_io_owner": "bbab3234-b9dc-11e0-adfd-00ff8314382b",
"_object": "016e5041-d28e-32b2-b2ac-2db3f1406411"
},
{
"io_application": "Max ESB",
"_io_application": "2077a249-ceca-443c-a068-ca1479f94f61",
"io_custodian": "ServiceMax",
"_object_name": "Object",
"io_owner": "Johnny Song",
"_io_custodian": "c9d336e0-824c-4be1-9bf2-feff5261b69e",
"_record": "edcc5cbe-aa1d-437a-b801-4ee36fadf350",
"_record_name": "Send To Process",
"_score": "1.8815696",
"_io_owner": "bbab3234-b9dc-11e0-adfd-00ff8314382b",
"_object": "016e5041-d28e-32b2-b2ac-2db3f1406411"
}
]
}
Auto-complete suggest for prefix query:
POST https://localhost:8080/suggest

{
"suggest": {
"type-suggest" : {
"prefix" : "Notificat",
"completion" : {
"size": 20,
"field" : "c74f2dd8-b910-11e0-87b3-00ff79122e2e.suggest"
}
}
}
}
Sample Returned Results
{
"_shards": {
"total": "1",
"successful": "1",
"failed": "0"
},
"hits": {
"total": "0",
"max_score": "unsupported",
"hits": []
},
"took": "9",
"timed_out": false,
"suggest": {
"type-suggest": [
{
"text": "Notificat",
"offset": "0",
"length": "9",
"options": [
{
"text": "Notification",
"_index": "max_records_index",
"_type": "016e5041-d28e-32b2-b2ac-2db3f1406411",
"_id": "806fe4af-40ef-4882-a0a0-7c59ec257df7",
"_score": "unsupported",
"contexts": {
"type": [
"null",
"016e5041-d28e-32b2-b2ac-2db3f1406411"
]
}
},
{
"text": "Notification Request",
"_index": "max_records_index",
"_type": "016e5041-d28e-32b2-b2ac-2db3f1406411",
"_id": "80f2cfbe-5db8-4c1a-aa60-492fa9345897",
"_score": "unsupported",
"contexts": {
"type": [
"null",
"016e5041-d28e-32b2-b2ac-2db3f1406411"
]
}
},
{
"text": "Notification Template",
"_index": "max_records_index",
"_type": "016e5041-d28e-32b2-b2ac-2db3f1406411",
"_id": "66124250-e151-4da0-9f89-2d3b9f0206f4",
"_score": "unsupported",
"contexts": {
"type": [
"null",
"016e5041-d28e-32b2-b2ac-2db3f1406411"
]
}
}
]
}
]
}
}
Auto-complete suggest for prefix query with category filter:
POST https://localhost:8080/suggest

{
"suggest": {
"type-suggest" : {
"prefix" : "Notificat",
"completion" : {
"size": 20,
"field" : "c74f2dd8-b910-11e0-87b3-00ff79122e2e.suggest",
"contexts": {
"type": [
"016e5041-d28e-32b2-b2ac-2db3f1406411"
]
}
}
}
}
}
Sample Returned Results
{
"_shards": {
"total": "1",
"successful": "1",
"failed": "0"
},
"hits": {
"total": "0",
"max_score": "unsupported",
"hits": []
},
"took": "0",
"timed_out": false,
"suggest": {
"type-suggest": [
{
"text": "Notificat",
"offset": "0",
"length": "9",
"options": [
{
"text": "Notification",
"_index": "max_records_index",
"_type": "016e5041-d28e-32b2-b2ac-2db3f1406411",
"_id": "806fe4af-40ef-4882-a0a0-7c59ec257df7",
"_score": "unsupported",
"contexts": {
"type": [
"016e5041-d28e-32b2-b2ac-2db3f1406411"
]
}
},
{
"text": "Notification Request",
"_index": "max_records_index",
"_type": "016e5041-d28e-32b2-b2ac-2db3f1406411",
"_id": "80f2cfbe-5db8-4c1a-aa60-492fa9345897",
"_score": "unsupported",
"contexts": {
"type": [
"016e5041-d28e-32b2-b2ac-2db3f1406411"
]
}
},
{
"text": "Notification Template",
"_index": "max_records_index",
"_type": "016e5041-d28e-32b2-b2ac-2db3f1406411",
"_id": "66124250-e151-4da0-9f89-2d3b9f0206f4",
"_score": "unsupported",
"contexts": {
"type": [
"016e5041-d28e-32b2-b2ac-2db3f1406411"
]
}
}
]
}
]
}
}
Auto-complete suggest on multiple fields:
POST https://localhost:8080/suggest

{
"suggest": {
"type-suggest" : {
"prefix" : "system set",
"completion" : {
"size": 5,
"field" : "cfbbfafa-b366-11e0-9e9b-001ec93afa2c.suggest"
}
},
"type2-suggest" : {
"prefix" : "noti",
"completion" : {
"size": 5,
"field" : "c74f2dd8-b910-11e0-87b3-00ff79122e2e.suggest"
}
}
}
}
Sample Returned Results
{
"_shards": {
"total": "1",
"successful": "1",
"failed": "0"
},
"hits": {
"total": "0",
"max_score": "0.0",
"hits": []
},
"took": "378",
"timed_out": false,
"suggest": {
"type-suggest": [
{
"text": "system set",
"offset": "0",
"length": "10",
"options": [
{
"text": "System Setting",
"_index": "max_records_index",
"_type": "86291014-1bd9-358b-a56b-8ddae7e8af24",
"_id": "26677fcc-b84d-4a96-9b60-ceb35e618f82",
"_score": "1.0",
"contexts": {
"type": [
"null",
"86291014-1bd9-358b-a56b-8ddae7e8af24"
]
}
},
{
"text": "System Setting",
"_index": "max_records_index",
"_type": "86291014-1bd9-358b-a56b-8ddae7e8af24",
"_id": "7c4642a9-c16b-46f7-9211-9645b3c65bff",
"_score": "1.0",
"contexts": {
"type": [
"null",
"86291014-1bd9-358b-a56b-8ddae7e8af24"
]
}
},
{
"text": "System Setting Supported Languages",
"_index": "max_records_index",
"_type": "86291014-1bd9-358b-a56b-8ddae7e8af24",
"_id": "3ba2e704-244f-43fd-84bd-1cb4f63e51c3",
"_score": "1.0",
"contexts": {
"type": [
"null",
"86291014-1bd9-358b-a56b-8ddae7e8af24"
]
}
},
{
"text": "System Setting of Email Credential is not enabled,",
"_index": "max_records_index",
"_type": "86291014-1bd9-358b-a56b-8ddae7e8af24",
"_id": "6681d136-7b87-4612-9ea8-270e6c27a185",
"_score": "1.0",
"contexts": {
"type": [
"null",
"86291014-1bd9-358b-a56b-8ddae7e8af24"
]
}
},
{
"text": "System Settings",
"_index": "max_records_index",
"_type": "86291014-1bd9-358b-a56b-8ddae7e8af24",
"_id": "635918da-b9ec-41c9-bb5b-08c9de66d445",
"_score": "1.0",
"contexts": {
"type": [
"null",
"86291014-1bd9-358b-a56b-8ddae7e8af24"
]
}
}
]
}
],
"type2-suggest": [
{
"text": "noti",
"offset": "0",
"length": "4",
"options": [
{
"text": "Notification",
"_index": "max_records_index",
"_type": "016e5041-d28e-32b2-b2ac-2db3f1406411",
"_id": "806fe4af-40ef-4882-a0a0-7c59ec257df7",
"_score": "1.0",
"contexts": {
"type": [
"null",
"016e5041-d28e-32b2-b2ac-2db3f1406411"
]
}
},
{
"text": "Notification Request",
"_index": "max_records_index",
"_type": "016e5041-d28e-32b2-b2ac-2db3f1406411",
"_id": "80f2cfbe-5db8-4c1a-aa60-492fa9345897",
"_score": "1.0",
"contexts": {
"type": [
"null",
"016e5041-d28e-32b2-b2ac-2db3f1406411"
]
}
},
{
"text": "Notification Template",
"_index": "max_records_index",
"_type": "016e5041-d28e-32b2-b2ac-2db3f1406411",
"_id": "66124250-e151-4da0-9f89-2d3b9f0206f4",
"_score": "1.0",
"contexts": {
"type": [
"null",
"016e5041-d28e-32b2-b2ac-2db3f1406411"
]
}
}
]
}
]
}
Auto-complete suggest on object suggest field:
POST https://localhost:8080/suggest

{
"_source": true,
"suggest": {
"type-suggest" : {
"prefix" : "UI Unit T",
"completion" : {
"size": 20,
"field" : "294ae5eb-952b-467e-a2fc-d27751221d2a_t.suggest"
}
}
}
}
Sample Returned Results
{
"_shards": {
"total": "1",
"successful": "1",
"failed": "0"
},
"hits": {
"total": "0",
"max_score": "unsupported",
"hits": []
},
"took": "1",
"timed_out": false,
"suggest": {
"type-suggest": [
{
"text": "UI Unit T",
"offset": "0",
"length": "9",
"options": [
{
"text": "UI Unit Test Sample Record",
"_index": "max_records_index",
"_type": "294ae5eb-952b-467e-a2fc-d27751221d2a",
"_id": "41f19ff6-2738-4000-8bfd-a18950caa1d1",
"_score": "unsupported"
},
{
"text": "UI Unit Test Sample Record 2",
"_index": "max_records_index",
"_type": "294ae5eb-952b-467e-a2fc-d27751221d2a",
"_id": "42f64596-c42f-4ba2-8138-cc40188d2a88",
"_score": "unsupported"
}
]
}
]
}
}
For more information:
Was this helpful?