migrate_2_0.asciidoc 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708
  1. [[breaking-changes-2.0]]
  2. == Breaking changes in 2.0
  3. This section discusses the changes that you need to be aware of when migrating
  4. your application to Elasticsearch 2.0.
  5. === Networking
  6. Elasticsearch now binds to the loopback interface by default (usually 127.0.0.1
  7. or ::1), the setting `network.host` can be specified to change this behavior.
  8. === Rivers removal
  9. Elasticsearch does not support rivers anymore. While we had first planned to
  10. keep them around to ease migration, keeping support for rivers proved to be
  11. challenging as it conflicted with other important changes that we wanted to
  12. bring to 2.0 like synchronous dynamic mappings updates, so we eventually
  13. decided to remove them entirely. See
  14. https://www.elastic.co/blog/deprecating_rivers for more background about why
  15. we are moving away from rivers.
  16. === Indices API
  17. The <<alias-retrieving, get alias api>> will, by default produce an error response
  18. if a requested index does not exist. This change brings the defaults for this API in
  19. line with the other Indices APIs. The <<multi-index>> options can be used on a request
  20. to change this behavior
  21. `GetIndexRequest.features()` now returns an array of Feature Enums instead of an array of String values.
  22. The following deprecated methods have been removed:
  23. * `GetIndexRequest.addFeatures(String[])` - Please use `GetIndexRequest.addFeatures(Feature[])` instead
  24. * `GetIndexRequest.features(String[])` - Please use `GetIndexRequest.features(Feature[])` instead
  25. * `GetIndexRequestBuilder.addFeatures(String[])` - Please use `GetIndexRequestBuilder.addFeatures(Feature[])` instead
  26. * `GetIndexRequestBuilder.setFeatures(String[])` - Please use `GetIndexRequestBuilder.setFeatures(Feature[])` instead
  27. === Partial fields
  28. Partial fields were deprecated since 1.0.0beta1 in favor of <<search-request-source-filtering,source filtering>>.
  29. === More Like This
  30. The More Like This API and the More Like This Field query have been removed in
  31. favor of the <<query-dsl-mlt-query, More Like This Query>>.
  32. The parameter `percent_terms_to_match` has been removed in favor of
  33. `minimum_should_match`.
  34. === Routing
  35. The default hash function that is used for routing has been changed from djb2 to
  36. murmur3. This change should be transparent unless you relied on very specific
  37. properties of djb2. This will help ensure a better balance of the document counts
  38. between shards.
  39. In addition, the following node settings related to routing have been deprecated:
  40. [horizontal]
  41. `cluster.routing.operation.hash.type`::
  42. This was an undocumented setting that allowed to configure which hash function
  43. to use for routing. `murmur3` is now enforced on new indices.
  44. `cluster.routing.operation.use_type`::
  45. This was an undocumented setting that allowed to take the `_type` of the
  46. document into account when computing its shard (default: `false`). `false` is
  47. now enforced on new indices.
  48. === Async replication
  49. The `replication` parameter has been removed from all CRUD operations (index,
  50. update, delete, bulk, delete-by-query). These operations are now synchronous
  51. only, and a request will only return once the changes have been replicated to
  52. all active shards in the shard group.
  53. === Store
  54. The `memory` / `ram` store (`index.store.type`) option was removed in Elasticsearch 2.0.
  55. === Term Vectors API
  56. Usage of `/_termvector` is deprecated, and replaced in favor of `/_termvectors`.
  57. === Script fields
  58. Script fields in 1.x were only returned as a single value. So even if the return
  59. value of a script used to be list, it would be returned as an array containing
  60. a single value that is a list too, such as:
  61. [source,json]
  62. ---------------
  63. "fields": {
  64. "my_field": [
  65. [
  66. "v1",
  67. "v2"
  68. ]
  69. ]
  70. }
  71. ---------------
  72. In elasticsearch 2.x, scripts that return a list of values are considered as
  73. multivalued fields. So the same example would return the following response,
  74. with values in a single array.
  75. [source,json]
  76. ---------------
  77. "fields": {
  78. "my_field": [
  79. "v1",
  80. "v2"
  81. ]
  82. }
  83. ---------------
  84. === Main API
  85. Previously, calling `GET /` was giving back the http status code within the json response
  86. in addition to the actual HTTP status code. We removed `status` field in json response.
  87. === Java API
  88. `org.elasticsearch.index.queries.FilterBuilders` has been removed as part of the merge of
  89. queries and filters. These filters are now available in `QueryBuilders` with the same name.
  90. All methods that used to accept a `FilterBuilder` now accept a `QueryBuilder` instead.
  91. In addition some query builders have been removed or renamed:
  92. * `commonTerms(...)` renamed with `commonTermsQuery(...)`
  93. * `queryString(...)` renamed with `queryStringQuery(...)`
  94. * `simpleQueryString(...)` renamed with `simpleQueryStringQuery(...)`
  95. * `textPhrase(...)` removed
  96. * `textPhrasePrefix(...)` removed
  97. * `textPhrasePrefixQuery(...)` removed
  98. * `filtered(...)` removed. Use `filteredQuery(...)` instead.
  99. * `inQuery(...)` removed.
  100. === Aggregations
  101. The `date_histogram` aggregation now returns a `Histogram` object in the response, and the `DateHistogram` class has been removed. Similarly
  102. the `date_range`, `ipv4_range`, and `geo_distance` aggregations all return a `Range` object in the response, and the `IPV4Range`, `DateRange`,
  103. and `GeoDistance` classes have been removed. The motivation for this is to have a single response API for the Range and Histogram aggregations
  104. regardless of the type of data being queried. To support this some changes were made in the `MultiBucketAggregation` interface which applies
  105. to all bucket aggregations:
  106. * The `getKey()` method now returns `Object` instead of `String`. The actual object type returned depends on the type of aggregation requested
  107. (e.g. the `date_histogram` will return a `DateTime` object for this method whereas a `histogram` will return a `Number`).
  108. * A `getKeyAsString()` method has been added to return the String representation of the key.
  109. * All other `getKeyAsX()` methods have been removed.
  110. * The `getBucketAsKey(String)` methods have been removed on all aggregations except the `filters` and `terms` aggregations.
  111. The `histogram` and the `date_histogram` aggregation now support a simplified `offset` option that replaces the previous `pre_offset` and
  112. `post_offset` rounding options. Instead of having to specify two separate offset shifts of the underlying buckets, the `offset` option
  113. moves the bucket boundaries in positive or negative direction depending on its argument.
  114. The `date_histogram` options for `pre_zone` and `post_zone` are replaced by the `time_zone` option. The behavior of `time_zone` is
  115. equivalent to the former `pre_zone` option. Setting `time_zone` to a value like "+01:00" now will lead to the bucket calculations
  116. being applied in the specified time zone but In addition to this, also the `pre_zone_adjust_large_interval` is removed because we
  117. now always return dates and bucket keys in UTC.
  118. Both the `histogram` and `date_histogram` aggregations now have a default `min_doc_count` of `0` instead of `1` previously.
  119. `include`/`exclude` filtering on the `terms` aggregation now uses the same syntax as regexp queries instead of the Java syntax. While simple
  120. regexps should still work, more complex ones might need some rewriting. Also, the `flags` parameter is not supported anymore.
  121. === Terms filter lookup caching
  122. The terms filter lookup mechanism does not support the `cache` option anymore
  123. and relies on the filesystem cache instead. If the lookup index is not too
  124. large, it is recommended to make it replicated to all nodes by setting
  125. `index.auto_expand_replicas: 0-all` in order to remove the network overhead as
  126. well.
  127. === Delete by query
  128. The meaning of the `_shards` headers in the delete by query response has changed. Before version 2.0 the `total`,
  129. `successful` and `failed` fields in the header are based on the number of primary shards. The failures on replica
  130. shards aren't being kept track of. From version 2.0 the stats in the `_shards` header are based on all shards
  131. of an index. The http status code is left unchanged and is only based on failures that occurred while executing on
  132. primary shards.
  133. === Delete api with missing routing when required
  134. Delete api requires a routing value when deleting a document belonging to a type that has routing set to required in its
  135. mapping, whereas previous elasticsearch versions would trigger a broadcast delete on all shards belonging to the index.
  136. A `RoutingMissingException` is now thrown instead.
  137. === Mappings
  138. * The setting `index.mapping.allow_type_wrapper` has been removed. Documents should always be sent without the type as the root element.
  139. * The delete mappings API has been removed. Mapping types can no longer be deleted.
  140. * The `ignore_conflicts` option of the put mappings API has been removed. Conflicts can't be ignored anymore.
  141. * The `binary` field does not support the `compress` and `compress_threshold` options anymore.
  142. ==== Removed type prefix on field names in queries
  143. Types can no longer be specified on fields within queries. Instead, specify type restrictions in the search request.
  144. The following is an example query in 1.x over types `t1` and `t2`:
  145. [source,json]
  146. ---------------
  147. curl -XGET 'localhost:9200/index/_search'
  148. {
  149. "query": {
  150. "bool": {
  151. "should": [
  152. {"match": { "t1.field_only_in_t1": "foo" }},
  153. {"match": { "t2.field_only_in_t2": "bar" }}
  154. ]
  155. }
  156. }
  157. }
  158. ---------------
  159. In 2.0, the query should look like the following:
  160. [source,json]
  161. ---------------
  162. curl -XGET 'localhost:9200/index/t1,t2/_search'
  163. {
  164. "query": {
  165. "bool": {
  166. "should": [
  167. {"match": { "field_only_in_t1": "foo" }},
  168. {"match": { "field_only_in_t2": "bar" }}
  169. ]
  170. }
  171. }
  172. }
  173. ---------------
  174. ==== Removed short name field access
  175. Field names in queries, aggregations, etc. must now use the complete name. Use of the short name
  176. caused ambiguities in field lookups when the same name existed within multiple object mappings.
  177. The following example illustrates the difference between 1.x and 2.0.
  178. Given these mappings:
  179. [source,json]
  180. ---------------
  181. curl -XPUT 'localhost:9200/index'
  182. {
  183. "mappings": {
  184. "type": {
  185. "properties": {
  186. "name": {
  187. "type": "object",
  188. "properties": {
  189. "first": {"type": "string"},
  190. "last": {"type": "string"}
  191. }
  192. }
  193. }
  194. }
  195. }
  196. }
  197. ---------------
  198. The following query was possible in 1.x:
  199. [source,json]
  200. ---------------
  201. curl -XGET 'localhost:9200/index/type/_search'
  202. {
  203. "query": {
  204. "match": { "first": "foo" }
  205. }
  206. }
  207. ---------------
  208. In 2.0, the same query should now be:
  209. [source,json]
  210. ---------------
  211. curl -XGET 'localhost:9200/index/type/_search'
  212. {
  213. "query": {
  214. "match": { "name.first": "foo" }
  215. }
  216. }
  217. ---------------
  218. ==== Meta fields have limited configuration
  219. Meta fields (those beginning with underscore) are fields used by elasticsearch
  220. to provide special features. They now have limited configuration options.
  221. * `_id` configuration can no longer be changed. If you need to sort, use `_uid` instead.
  222. * `_type` configuration can no longer be changed.
  223. * `_index` configuration is limited to enabling the field.
  224. * `_routing` configuration is limited to requiring the field.
  225. * `_boost` has been removed.
  226. * `_field_names` configuration is limited to disabling the field.
  227. * `_size` configuration is limited to enabling the field.
  228. ==== Meta fields in documents
  229. Meta fields can no longer be specified within a document. They should be specified
  230. via the API. For example, instead of adding a field `_parent` within a document,
  231. use the `parent` url parameter when indexing that document.
  232. ==== Source field limitations
  233. The `_source` field could previously be disabled dynamically. Since this field
  234. is a critical piece of many features like the Update API, it is no longer
  235. possible to disable.
  236. The options for `compress` and `compress_threshold` have also been removed.
  237. The source field is already compressed. To minimize the storage cost,
  238. set `index.codec: best_compression` in index settings.
  239. ==== Boolean fields
  240. Boolean fields used to have a string fielddata with `F` meaning `false` and `T`
  241. meaning `true`. They have been refactored to use numeric fielddata, with `0`
  242. for `false` and `1` for `true`. As a consequence, the format of the responses of
  243. the following APIs changed when applied to boolean fields: `0`/`1` is returned
  244. instead of `F`/`T`:
  245. - <<search-request-fielddata-fields,fielddata fields>>
  246. - <<search-request-sort,sort values>>
  247. - <<search-aggregations-bucket-terms-aggregation,terms aggregations>>
  248. In addition, terms aggregations use a custom formatter for boolean (like for
  249. dates and ip addresses, which are also backed by numbers) in order to return
  250. the user-friendly representation of boolean fields: `false`/`true`:
  251. [source,json]
  252. ---------------
  253. "buckets": [
  254. {
  255. "key": 0,
  256. "key_as_string": "false",
  257. "doc_count": 42
  258. },
  259. {
  260. "key": 1,
  261. "key_as_string": "true",
  262. "doc_count": 12
  263. }
  264. ]
  265. ---------------
  266. ==== Murmur3 Fields
  267. Fields of type `murmur3` can no longer change `doc_values` or `index` setting.
  268. They are always stored with doc values, and not indexed.
  269. ==== Source field configuration
  270. The `_source` field no longer supports `includes` and `excludes` parameters. When
  271. `_source` is enabled, the entire original source will be stored.
  272. ==== Config based mappings
  273. The ability to specify mappings in configuration files has been removed. To specify
  274. default mappings that apply to multiple indexes, use index templates.
  275. The following settings are no longer valid:
  276. * `index.mapper.default_mapping_location`
  277. * `index.mapper.default_percolator_mapping_location`
  278. === Codecs
  279. It is no longer possible to specify per-field postings and doc values formats
  280. in the mappings. This setting will be ignored on indices created before
  281. elasticsearch 2.0 and will cause mapping parsing to fail on indices created on
  282. or after 2.0. For old indices, this means that new segments will be written
  283. with the default postings and doc values formats of the current codec.
  284. It is still possible to change the whole codec by using the `index.codec`
  285. setting. Please however note that using a non-default codec is discouraged as
  286. it could prevent future versions of Elasticsearch from being able to read the
  287. index.
  288. === Scripting settings
  289. Removed support for `script.disable_dynamic` node setting, replaced by
  290. fine-grained script settings described in the <<enable-dynamic-scripting,scripting docs>>.
  291. The following setting previously used to enable dynamic scripts:
  292. [source,yaml]
  293. ---------------
  294. script.disable_dynamic: false
  295. ---------------
  296. can be replaced with the following two settings in `elasticsearch.yml` that
  297. achieve the same result:
  298. [source,yaml]
  299. ---------------
  300. script.inline: on
  301. script.indexed: on
  302. ---------------
  303. === Script parameters
  304. Deprecated script parameters `id`, `file`, and `scriptField` have been removed
  305. from all scriptable APIs. `script_id`, `script_file` and `script` should be used
  306. in their place.
  307. === Groovy scripts sandbox
  308. The groovy sandbox and related settings have been removed. Groovy is now a non
  309. sandboxed scripting language, without any option to turn the sandbox on.
  310. === Plugins making use of scripts
  311. Plugins that make use of scripts must register their own script context through
  312. `ScriptModule`. Script contexts can be used as part of fine-grained settings to
  313. enable/disable scripts selectively.
  314. === Thrift and memcached transport
  315. The thrift and memcached transport plugins are no longer supported. Instead, use
  316. either the HTTP transport (enabled by default) or the node or transport Java client.
  317. === `search_type=count` deprecation
  318. The `count` search type has been deprecated. All benefits from this search type can
  319. now be achieved by using the `query_then_fetch` search type (which is the
  320. default) and setting `size` to `0`.
  321. === The count api internally uses the search api
  322. The count api is now a shortcut to the search api with `size` set to 0. As a
  323. result, a total failure will result in an exception being returned rather
  324. than a normal response with `count` set to `0` and shard failures.
  325. === JSONP support
  326. JSONP callback support has now been removed. CORS should be used to access Elasticsearch
  327. over AJAX instead:
  328. [source,yaml]
  329. ---------------
  330. http.cors.enabled: true
  331. http.cors.allow-origin: /https?:\/\/localhost(:[0-9]+)?/
  332. ---------------
  333. === Cluster state REST api
  334. The cluster state api doesn't return the `routing_nodes` section anymore when
  335. `routing_table` is requested. The newly introduced `routing_nodes` flag can
  336. be used separately to control whether `routing_nodes` should be returned.
  337. === Query DSL
  338. Change to ranking behaviour: single-term queries on numeric fields now score in the same way as string fields (use of IDF, norms if enabled).
  339. Previously, term queries on numeric fields were deliberately prevented from using the usual Lucene scoring logic and this behaviour was undocumented and, to some, unexpected.
  340. If the introduction of scoring to numeric fields is undesirable for your query clauses the fix is simple: wrap them in a `constant_score` or use a `filter` expression instead.
  341. The `filtered` query is deprecated. Instead you should use a `bool` query with
  342. a `must` clause for the query and a `filter` clause for the filter. For instance
  343. the below query:
  344. [source,json]
  345. ---------------
  346. {
  347. "filtered": {
  348. "query": {
  349. // query
  350. },
  351. "filter": {
  352. // filter
  353. }
  354. }
  355. }
  356. ---------------
  357. can be replaced with
  358. [source,json]
  359. ---------------
  360. {
  361. "bool": {
  362. "must": {
  363. // query
  364. },
  365. "filter": {
  366. // filter
  367. }
  368. }
  369. }
  370. ---------------
  371. and will produce the same scores.
  372. The `fuzzy_like_this` and `fuzzy_like_this_field` queries have been removed.
  373. The `limit` filter is deprecated and becomes a no-op. You can achieve similar
  374. behaviour using the <<search-request-body,terminate_after>> parameter.
  375. `or` and `and` on the one hand and `bool` on the other hand used to have
  376. different performance characteristics depending on the wrapped filters. This is
  377. fixed now, as a consequence the `or` and `and` filters are now deprecated in
  378. favour or `bool`.
  379. The `execution` option of the `terms` filter is now deprecated and ignored if
  380. provided.
  381. The `_cache` and `_cache_key` parameters of filters are deprecated in the REST
  382. layer and removed in the Java API. In case they are specified they will be
  383. ignored. Instead filters are always used as their own cache key and elasticsearch
  384. makes decisions by itself about whether it should cache filters based on how
  385. often they are used.
  386. Java plugins that register custom queries can do so by using the
  387. `IndicesQueriesModule#addQuery(Class<? extends QueryParser>)` method. Other
  388. ways to register custom queries are not supported anymore.
  389. ==== Query/filter merge
  390. Elasticsearch no longer makes a difference between queries and filters in the
  391. DSL; it detects when scores are not needed and automatically optimizes the
  392. query to not compute scores and optionally caches the result.
  393. As a consequence the `query` filter serves no purpose anymore and is deprecated.
  394. === Snapshot and Restore
  395. Locations of file system repositories has to be now registered using `path.repo` setting. The `path.repo`
  396. setting can contain one or more repository locations:
  397. [source,yaml]
  398. ---------------
  399. path.repo: ["/mnt/daily", "/mnt/weekly"]
  400. ---------------
  401. If the file system repository location is specified as an absolute path it has to start with one of the locations
  402. specified in `path.repo`. If the location is specified as a relative path, it will be resolved against the first
  403. location specified in the `path.repo` setting.
  404. The obsolete parameters `expand_wildcards_open` and `expand_wildcards_close` are no longer
  405. supported by the snapshot and restore operations. These parameters have been replaced by
  406. a single `expand_wildcards` parameter. See <<multi-index,the multi-index docs>> for more.
  407. === `_shutdown` API
  408. The `_shutdown` API has been removed without a replacement. Nodes should be managed via operating
  409. systems and the provided start/stop scripts.
  410. === Analyze API
  411. * The Analyze API return 0 as first Token's position instead of 1.
  412. * The `text()` method on `AnalyzeRequest` now returns `String[]` instead of `String`.
  413. === Multiple data.path striping
  414. Previously, if the `data.path` setting listed multiple data paths, then a
  415. shard would be ``striped'' across all paths by writing a whole file to each
  416. path in turn (in accordance with the `index.store.distributor` setting). The
  417. result was that the files from a single segment in a shard could be spread
  418. across multiple disks, and the failure of any one disk could corrupt multiple
  419. shards.
  420. This striping is no longer supported. Instead, different shards may be
  421. allocated to different paths, but all of the files in a single shard will be
  422. written to the same path.
  423. If striping is detected while starting Elasticsearch 2.0.0 or later, all of
  424. the files belonging to the same shard will be migrated to the same path. If
  425. there is not enough disk space to complete this migration, the upgrade will be
  426. cancelled and can only be resumed once enough disk space is made available.
  427. The `index.store.distributor` setting has also been removed.
  428. === Hunspell dictionary configuration
  429. The parameter `indices.analysis.hunspell.dictionary.location` has been removed,
  430. and `<path.conf>/hunspell` is always used.
  431. === Java API Transport API construction
  432. The `TransportClient` construction code has changed, it now uses the builder
  433. pattern. Instead of using:
  434. [source,java]
  435. --------------------------------------------------
  436. Settings settings = ImmutableSettings.settingsBuilder()
  437. .put("cluster.name", "myClusterName").build();
  438. Client client = new TransportClient(settings);
  439. --------------------------------------------------
  440. Use:
  441. [source,java]
  442. --------------------------------------------------
  443. Settings settings = ImmutableSettings.settingsBuilder()
  444. .put("cluster.name", "myClusterName").build();
  445. Client client = TransportClient.builder().settings(settings).build();
  446. --------------------------------------------------
  447. === Logging
  448. Log messages are now truncated at 10,000 characters. This can be changed in the
  449. `logging.yml` configuration file.
  450. [float]
  451. === Removed `top_children` query
  452. The `top_children` query has been removed in favour of the `has_child` query. The `top_children` query wasn't always faster
  453. than the `has_child` query and the `top_children` query was often inaccurate. The total hits and any aggregations in the
  454. same search request will likely be off if `top_children` was used.
  455. === Removed file based index templates
  456. Index templates can no longer be configured on disk. Use the `_template` API instead.
  457. [float]
  458. === Removed `id_cache` from stats apis
  459. Removed `id_cache` metric from nodes stats, indices stats and cluster stats apis. This metric has also been removed
  460. from the shards cat, indices cat and nodes cat apis. Parent/child memory is now reported under fielddata, because it
  461. has internally be using fielddata for a while now.
  462. To just see how much parent/child related field data is taking, the `fielddata_fields` option can be used on the stats
  463. apis. Indices stats example:
  464. [source,js]
  465. --------------------------------------------------
  466. curl -XGET "http://localhost:9200/_stats/fielddata?pretty&human&fielddata_fields=_parent"
  467. --------------------------------------------------
  468. Parent/child is using field data for the `_parent` field since version `1.1.0`, but the memory stats for the `_parent`
  469. field were still shown under `id_cache` metric in the stats apis for backwards compatible reasons between 1.x versions.
  470. Before version `1.1.0` the parent/child had its own in-memory data structures for id values in the `_parent` field.
  471. [float]
  472. === Removed `id_cache` from clear cache api
  473. Removed `id_cache` option from the clear cache apis. The `fielddata` option should be used to clear `_parent` field
  474. from fielddata.
  475. [float]
  476. === Highlighting
  477. The default value for the `require_field_match` option is `true` rather than
  478. `false`, meaning that the highlighters will take the fields that were queried
  479. into account by default. That means for instance that highlighting any field
  480. when querying the `_all` field will produce no highlighted snippets by default,
  481. given that the match was on the `_all` field only. Querying the same fields
  482. that need to be highlighted is the cleaner solution to get highlighted snippets
  483. back. Otherwise `require_field_match` option can be set to `false` to ignore
  484. field names completely when highlighting.
  485. The postings highlighter doesn't support the `require_field_match` option
  486. anymore, it will only highlight fields that were queried.
  487. The `match` query with type set to `match_phrase_prefix` is not supported by the
  488. postings highlighter. No highlighted snippets will be returned.
  489. [float]
  490. === Parent/child
  491. Parent/child has been rewritten completely to reduce memory usage and to execute
  492. `has_child` and `has_parent` queries faster and more efficient. The `_parent` field
  493. uses doc values by default. The refactored and improved implementation is only active
  494. for indices created on or after version 2.0.
  495. In order to benefit for all performance and memory improvements we recommend to reindex all
  496. indices that have the `_parent` field created before was upgraded to 2.0.
  497. The following breaks in backwards compatability have been made on indices with the `_parent` field
  498. created on or after clusters with version 2.0:
  499. * The `type` option on the `_parent` field can only point to a parent type that doesn't exist yet,
  500. so this means that an existing type/mapping can no longer become a parent type.
  501. * The `has_child` and `has_parent` queries can no longer be use in alias filters.
  502. === Meta fields returned under the top-level json object
  503. When selecting meta fields such as `_routing` or `_timestamp`, the field values
  504. are now directly put as a top-level property of the json objet, instead of being
  505. put under `fields` like regular stored fields.
  506. [source,sh]
  507. ---------------
  508. curl -XGET 'localhost:9200/test/_search?fields=_timestamp,foo'
  509. ---------------
  510. [source,json]
  511. ---------------
  512. {
  513. [...]
  514. "hits": {
  515. "total": 1,
  516. "max_score": 1,
  517. "hits": [
  518. {
  519. "_index": "test",
  520. "_type": "test",
  521. "_id": "1",
  522. "_score": 1,
  523. "_timestamp": 10000000,
  524. "fields": {
  525. "foo" : [ "bar" ]
  526. }
  527. }
  528. ]
  529. }
  530. }
  531. ---------------
  532. === Settings for resource watcher have been renamed
  533. The setting names for configuring the resource watcher have been renamed
  534. to prevent clashes with the watcher plugin
  535. * `watcher.enabled` is now `resource.reload.enabled`
  536. * `watcher.interval` is now `resource.reload.interval`
  537. * `watcher.interval.low` is now `resource.reload.interval.low`
  538. * `watcher.interval.medium` is now `resource.reload.interval.medium`
  539. * `watcher.interval.high` is now `resource.reload.interval.high`