Sample Response Body
{
"query": {
"query": "string",
"includeFacets": true,
"filters": {},
"sort": {},
"advancedSort": {},
"page": 0,
"pageSize": 0
},
"total": 0,
"totalPages": 0,
"hits": [
{
"explanation": {
"description": "string",
"details": [
{
"description": "string",
"details": [
{}
],
"value": 0
}
],
"value": 0
},
"fields": {},
"highlights": {},
"innerHits": {},
"matchedQueries": [
"string"
],
"score": 0,
"sorts": [
{}
],
"id": "string",
"index": "string",
"parent": "string",
"routing": "string",
"source": {},
"type": "string",
"version": 0
}
],
"facets": [
{
"name": "string",
"otherCount": 0,
"buckets": {}
}
]
}
Where:
- query returns the query you used for the search.
- total is the total number of results that the search process found.
- totalPages is the total number of pages of results.
- hits is an array of the search results. Will be empty ([]) if there are 0 results.
- The main elements of each hit result are:
- highlights – this provides the main elements of the hit some examples of highlights are:
- slides.title – this is the title of the slide that the search result was found in (hit)
- name – this is the name of the document of the hit
- slides.textContent – this is the slide content of the hit
- innerHits – this is the more detailed informaiton on the hit
- score – This is the calculated value of how well the hit matches the search query. The higher the number the better the match.
- source – This is information on the file that the hit was in
- type – This is the type of item the hit was found on. This will always be file.
- facets are the breakdown of the search results. It will provide numbers of how many results are found for each facet and a breakdown of how many in the facet were found in each item (bucket).
- name is the name of the facet. The possible facets are:
- metadata
- parentFolderId
- fileType
- Tags – each will be listed as their own element with the naming convention of metadata-<metaDataTypeID>
- otherCount is the number of search results that have unclassified file extension. This number will almost always be 0.
- buckets is a list of items (in the specific bucket) that the search results (hits) were found in with the value being the number of results in the bucket. Examples of buckets:
- parentFolderId – the IDs of the folders that the hits are in
- fileType – the number of hits that are of each fileType
- metadata-<ID> – where <ID> is the ID fo the MetadataType (Tag) – This will show the number of hits for each option, the option will be the element key and the hit count will be the value.