summaryrefslogtreecommitdiff
path: root/rest-api-spec/api/search.json
blob: 9c279bc740d568fb5361e2d675ab33b0135745d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
{
  "search": {
    "documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-search.html",
    "methods": ["GET", "POST"],
    "url": {
      "path": "/_search",
      "paths": ["/_search", "/{index}/_search", "/{index}/{type}/_search"],
      "parts": {
        "index": {
         "type" : "list",
         "description" : "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"
        },
        "type": {
          "type" : "list",
          "description" : "A comma-separated list of document types to search; leave empty to perform the operation on all types"
        }
      },
      "params": {
        "analyzer": {
          "type" : "string",
          "description" : "The analyzer to use for the query string"
        },
        "analyze_wildcard": {
          "type" : "boolean",
          "description" : "Specify whether wildcard and prefix queries should be analyzed (default: false)"
        },
        "default_operator": {
          "type" : "enum",
          "options" : ["AND","OR"],
          "default" : "OR",
          "description" : "The default operator for query string query (AND or OR)"
        },
        "df": {
          "type" : "string",
          "description" : "The field to use as default where no field prefix is given in the query string"
        },
        "explain": {
          "type" : "boolean",
          "description" : "Specify whether to return detailed information about score computation as part of a hit"
        },
        "fields": {
          "type" : "list",
          "description" : "A comma-separated list of fields to return as part of a hit"
        },
        "from": {
          "type" : "number",
          "description" : "Starting offset (default: 0)"
        },
        "ignore_unavailable": {
            "type" : "boolean",
            "description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
        },
        "allow_no_indices": {
            "type" : "boolean",
            "description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
        },
        "expand_wildcards": {
            "type" : "enum",
            "options" : ["open","closed"],
            "default" : "open",
            "description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
        },
        "indices_boost": {
          "type" : "list",
          "description" : "Comma-separated list of index boosts"
        },
        "lenient": {
          "type" : "boolean",
          "description" : "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"
        },
        "lowercase_expanded_terms": {
          "type" : "boolean",
          "description" : "Specify whether query terms should be lowercased"
        },
        "preference": {
          "type" : "string",
          "description" : "Specify the node or shard the operation should be performed on (default: random)"
        },
        "q": {
          "type" : "string",
          "description" : "Query in the Lucene query string syntax"
        },
        "routing": {
          "type" : "list",
          "description" : "A comma-separated list of specific routing values"
        },
        "scroll": {
          "type" : "duration",
          "description" : "Specify how long a consistent view of the index should be maintained for scrolled search"
        },
        "search_type": {
          "type" : "enum",
          "options" : ["query_then_fetch", "query_and_fetch", "dfs_query_then_fetch", "dfs_query_and_fetch", "count", "scan"],
          "description" : "Search operation type"
        },
        "size": {
          "type" : "number",
          "description" : "Number of hits to return (default: 10)"
        },
        "sort": {
          "type" : "list",
          "description" : "A comma-separated list of <field>:<direction> pairs"
        },
        "source": {
          "type" : "string",
          "description" : "The URL-encoded request definition using the Query DSL (instead of using request body)"
        },
        "_source": {
          "type" : "list",
          "description" : "True or false to return the _source field or not, or a list of fields to return"
        },
        "_source_exclude": {
          "type" : "list",
          "description" : "A list of fields to exclude from the returned _source field"
        },
        "_source_include": {
          "type" : "list",
          "description" : "A list of fields to extract and return from the _source field"
        },
        "stats": {
          "type" : "list",
          "description" : "Specific 'tag' of the request for logging and statistical purposes"
        },
        "suggest_field": {
          "type" : "string",
          "description" : "Specify which field to use for suggestions"
        },
        "suggest_mode": {
          "type" : "enum",
          "options" : ["missing", "popular", "always"],
          "default" : "missing",
          "description" : "Specify suggest mode"
        },
        "suggest_size": {
          "type" : "number",
          "description" : "How many suggestions to return in response"
        },
        "suggest_text": {
          "type" : "text",
          "description" : "The source text for which the suggestions should be returned"
        },
        "timeout": {
          "type" : "time",
          "description" : "Explicit operation timeout"
        },
        "version": {
          "type" : "boolean",
          "description" : "Specify whether to return document version as part of a hit"
        }
      }
    },
    "body": {
      "description": "The search definition using the Query DSL"
    }
  }
}