A newer version of this documentation is available.

View Latest

Request Structure

      +
      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.

      Highlighting

      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:

      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:

      "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.