Search Status Expect

    A Full Text Search Response Object is composed of multiple child objects that provides important information.

    Status

    The status object includes the number of successful and failed partition indexes queries.

    We recommend that the status object be checked for failures as a preferred alternative to relying on HTTP response codes alone. For example, FTS returns an HTTP 200 response in case of partition index failures or timeouts (not consistency timeouts). This is done so that you can choose to accept partial results in an application. However, this also means FTS returns an HTTP 200 response even when ALL partition indexes fail.

    Refer to the following table for more information about the possible status messages.

    Table 1. Response Object Status Values
    Status Description

    HTTP 400

    Returned when an error is detected when validating the inputs. The text error message accompanying the status describes the problem.

    HTTP 412

    Returned when the consistency requirements are not satisfied within the specified timeout. The JSON structure accompanying the status provides information about the current consistency levels.

    HTTP 200

    Returned when an error is detected during query execution. The errors might be contained in the JSON section named "status".

    Total

    The total field returns an integer representing the total number of partition indexes queried. This value varies depending on how your index is configured, the platform you are running on, and whether you are querying an index or an index alias. Each index has a setting for the number of vBuckets per pindex. For example, when running on a cluster with 1024 vBuckets and with an index setting of 171 vBuckets per pindex, the total number of partition indexes is 6. When you query an index alias, total is the sum of all the partition indexes in each index that is included in the definition of the index alias.

    Successful

    This field returns the total number of partition indexes successfully queried. This integer value can range from 0 to the total number of partition indexes.

    Example Status: Successful
     "status": {
         "total": 6,
         "failed": 0,
         "successful": 6
    },
    Failed

    This field returns the total number of partition indexes with failed queries. This integer value can range from 0 to the total number of partition indexes. If the number is greater than 0, the response object contains an errors array.

    Errors

    This field returns an array of error messages as reported by individual partition indexes. This array only appears if the field "failed" is greater than 0.

    Example Status: Failure
    "status": {
        "total":6,
        "failed":3,
        "successful":6,
        "errors":{
            "IndexClient - http://127.0.0.1:9201/api/pindex/beer-search_447fd6df2d6f4b54_0a44bddb":"context deadline exceeded",
             "IndexClient - http://127.0.0.1:9201/api/pindex/beer-search_447fd6df2d6f4b54_24e7ea2d":"context deadline exceeded",
             ...
        }
    }

    Search Response Score

    Scoring of results, according to relevancy, allows users to obtain result-sets that only contain documents awarded the highest scores. This keeps result-sets manageably small, even when the total number of documents returned is extremely large. The response returns the score of the search query.

    Scores are directly dependent on the search criteria. Changing the search criteria can vary the score, and therefore, scores are not comparable across searches.

    For more details on scores, follow the link Scoring