A newer version of this documentation is available.

View Latest

Request Structure

    March 16, 2025
    + 12
    Full Text Index supports the JSON structure for the query request and the response.

    This topic explains the JSON fields use in the query.

    Json fields information of search request:

    Table 1. JSON fields in the query
    Field Description

    query

    The query specific details.

    size/limit

    The number of results/hits requested related to pagination.

    from/offset

    Related to pagination, this field indicates the starting point in the sorted result set (according to the score by default) from which the “size” amount of hits are taken to display.

    explain

    if set true, the response will include additional search score explanations.

    highlight

    Allows setting the additional highlighting on the result set of matching terms.

    sort

    The order by which the result set is sorted.

    fields

    The fields value to be included in a hit in the result set. The fields should be indexed.

    Example:

    JSON
    curl -XPOST -H "Content-Type: application/json" -u username:password http://localhost:8094/api/index//query -d '{ "query": { "query": "united" }, "collections":["airport"], "fields":["airportname","country"] }'

    facets

    Aggregate information to be collected from the result set.

    Example:

    JSON
    "facets": { "type": { "size": 5, "field": "type" } }

    search_after

    Related to pagination, this field fetches the “size” number of results after the specified value in the sorted result set.

    search_before

    Related to pagination, this field fetches the “size” number of results before the specified value in the sorted result set.

    score

    Related to pagination, this field fetches the “size” number of results after the specified value in the sorted result set.

    collections

    Specifies the set of collections to which search would be limited.

    includeLocations

    when set to true, this field returns the location of the occurrence of the search term in the document which has been hit.