migrate_3_0.asciidoc 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610
  1. [[breaking-changes-3.0]]
  2. == Breaking changes in 3.0
  3. This section discusses the changes that you need to be aware of when migrating
  4. your application to Elasticsearch 3.0.
  5. * <<breaking_30_search_changes>>
  6. * <<breaking_30_rest_api_changes>>
  7. * <<breaking_30_parent_child_changes>>
  8. * <<breaking_30_settings_changes>>
  9. * <<breaking_30_mapping_changes>>
  10. * <<breaking_30_plugins>>
  11. * <<breaking_30_java_api_changes>>
  12. * <<breaking_30_cache_concurrency>>
  13. * <<breaking_30_non_loopback>>
  14. * <<breaking_30_thread_pool>>
  15. * <<breaking_30_allocation>>
  16. [[breaking_30_search_changes]]
  17. === Warmers
  18. Thanks to several changes like doc values by default or disk-based norms,
  19. warmers have become quite useless. As a consequence, warmers and the warmer
  20. API have been removed: it is not possible anymore to register queries that
  21. will run before a new IndexSearcher is published.
  22. Don't worry if you have warmers defined on your indices, they will simply be
  23. ignored when upgrading to 3.0.
  24. === Search changes
  25. ==== `search_type=count` removed
  26. The `count` search type was deprecated since version 2.0.0 and is now removed.
  27. In order to get the same benefits, you just need to set the value of the `size`
  28. parameter to `0`.
  29. For instance, the following request:
  30. [source,sh]
  31. ---------------
  32. GET /my_index/_search?search_type=count
  33. {
  34. "aggs": {
  35. "my_terms": {
  36. "terms": {
  37. "field": "foo"
  38. }
  39. }
  40. }
  41. }
  42. ---------------
  43. can be replaced with:
  44. [source,sh]
  45. ---------------
  46. GET /my_index/_search
  47. {
  48. "size": 0,
  49. "aggs": {
  50. "my_terms": {
  51. "terms": {
  52. "field": "foo"
  53. }
  54. }
  55. }
  56. }
  57. ---------------
  58. ==== `search_type=scan` removed
  59. The `scan` search type was deprecated since version 2.1.0 and is now removed.
  60. All benefits from this search type can now be achieved by doing a scroll
  61. request that sorts documents in `_doc` order, for instance:
  62. [source,sh]
  63. ---------------
  64. GET /my_index/_search?scroll=2m
  65. {
  66. "sort": [
  67. "_doc"
  68. ]
  69. }
  70. ---------------
  71. Scroll requests sorted by `_doc` have been optimized to more efficiently resume
  72. from where the previous request stopped, so this will have the same performance
  73. characteristics as the former `scan` search type.
  74. [[breaking_30_rest_api_changes]]
  75. === REST API changes
  76. ==== search exists api removed
  77. The search exists api has been removed in favour of using the search api with
  78. `size` set to `0` and `terminate_after` set to `1`.
  79. ==== `/_optimize` endpoint removed
  80. The deprecated `/_optimize` endpoint has been removed. The `/_forcemerge`
  81. endpoint should be used in lieu of optimize.
  82. The `GET` HTTP verb for `/_forcemerge` is no longer supported, please use the
  83. `POST` HTTP verb.
  84. ==== Deprecated queries removed
  85. The following deprecated queries have been removed:
  86. * `filtered`: use `bool` query instead, which supports `filter` clauses too
  87. * `and`: use `must` clauses in a `bool` query instead
  88. * `or`: use should clauses in a `bool` query instead
  89. * `limit`: use `terminate_after` parameter instead
  90. * `fquery`: obsolete after filters and queries have been merged
  91. * `query`: obsolete after filters and queries have been merged
  92. ==== Unified fuzziness parameter
  93. * Removed support for the deprecated `min_similarity` parameter in `fuzzy query`, in favour of `similarity`.
  94. * Removed support for the deprecated `fuzzy_min_sim` parameter in `query_string` query, in favour of `similarity`.
  95. * Removed support for the deprecated `edit_distance` parameter in completion suggester, in favour of `similarity`.
  96. ==== indices query
  97. Removed support for the deprecated `filter` and `no_match_filter` fields in `indices` query,
  98. in favour of `query` and `no_match_query`.
  99. ==== nested query
  100. Removed support for the deprecated `filter` fields in `nested` query, in favour of `query`.
  101. ==== terms query
  102. Removed support for the deprecated `minimum_should_match` and `disable_coord` in `terms` query, use `bool` query instead.
  103. Removed also support for the deprecated `execution` parameter.
  104. ==== function_score query
  105. Removed support for the top level `filter` element in `function_score` query, replaced by `query`.
  106. ==== highlighters
  107. Removed support for multiple highlighter names, the only supported ones are: `plain`, `fvh` and `postings`.
  108. ==== top level filter
  109. Removed support for the deprecated top level `filter` in the search api, replaced by `post_filter`.
  110. ==== `query_binary` and `filter_binary` removed
  111. Removed support for the undocumented `query_binary` and `filter_binary` sections of a search request.
  112. ==== `span_near`'s' `collect_payloads` deprecated
  113. Payloads are now loaded when needed.
  114. [[breaking_30_parent_child_changes]]
  115. === Parent/Child changes
  116. The `children` aggregation, parent child inner hits and `has_child` and `has_parent` queries will not work on indices
  117. with `_parent` field mapping created before version `2.0.0`. The data of these indices need to be re-indexed into a new index.
  118. The format of the join between parent and child documents have changed with the `2.0.0` release. The old
  119. format can't read from version `3.0.0` and onwards. The new format allows for a much more efficient and
  120. scalable join between parent and child documents and the join data structures are stored on on disk
  121. data structures as opposed as before the join data structures were stored in the jvm heap space.
  122. ==== `score_type` has been removed
  123. The `score_type` option has been removed from the `has_child` and `has_parent` queries in favour of the `score_mode` option
  124. which does the exact same thing.
  125. ==== `sum` score mode removed
  126. The `sum` score mode has been removed in favour of the `total` mode which does the same and is already available in
  127. previous versions.
  128. ==== `max_children` option
  129. When `max_children` was set to `0` on the `has_child` query then there was no upper limit on how many children documents
  130. are allowed to match. This has changed and `0` now really means to zero child documents are allowed. If no upper limit
  131. is needed then the `max_children` option shouldn't be defined at all on the `has_child` query.
  132. [[breaking_30_settings_changes]]
  133. === Settings changes
  134. ==== Analysis settings
  135. The `index.analysis.analyzer.default_index` analyzer is not supported anymore.
  136. If you wish to change the analyzer to use for indexing, change the
  137. `index.analysis.analyzer.default` analyzer instead.
  138. ==== Ping timeout settings
  139. Previously, there were three settings for the ping timeout: `discovery.zen.initial_ping_timeout`,
  140. `discovery.zen.ping.timeout` and `discovery.zen.ping_timeout`. The former two have been removed and
  141. the only setting key for the ping timeout is now `discovery.zen.ping_timeout`. The default value for
  142. ping timeouts remains at three seconds.
  143. ==== Recovery settings
  144. Recovery settings deprecated in 1.x have been removed:
  145. * `index.shard.recovery.translog_size` is superseded by `indices.recovery.translog_size`
  146. * `index.shard.recovery.translog_ops` is superseded by `indices.recovery.translog_ops`
  147. * `index.shard.recovery.file_chunk_size` is superseded by `indices.recovery.file_chunk_size`
  148. * `index.shard.recovery.concurrent_streams` is superseded by `indices.recovery.concurrent_streams`
  149. * `index.shard.recovery.concurrent_small_file_streams` is superseded by `indices.recovery.concurrent_small_file_streams`
  150. * `indices.recovery.max_size_per_sec` is superseded by `indices.recovery.max_bytes_per_sec`
  151. If you are using any of these settings please take the time and review their purpose. All of the settings above are considered
  152. _expert settings_ and should only be used if absolutely necessary. If you have set any of the above setting as persistent
  153. cluster settings please use the settings update API and set their superseded keys accordingly.
  154. The following settings have been removed without replacement
  155. * `indices.recovery.concurrent_small_file_streams` - recoveries are now single threaded. The number of concurrent outgoing recoveries are throttled via allocation deciders
  156. * `indices.recovery.concurrent_file_streams` - recoveries are now single threaded. The number of concurrent outgoing recoveries are throttled via allocation deciders
  157. ==== Translog settings
  158. The `index.translog.flush_threshold_ops` setting is not supported anymore. In order to control flushes based on the transaction log
  159. growth use `index.translog.flush_threshold_size` instead. Changing the translog type with `index.translog.fs.type` is not supported
  160. anymore, the `buffered` implementation is now the only available option and uses a fixed `8kb` buffer.
  161. ==== Request Cache Settings
  162. The deprecated settings `index.cache.query.enable` and `indices.cache.query.size` have been removed and are replaced with
  163. `index.requests.cache.enable` and `indices.requests.cache.size` respectively.
  164. ==== Allocation settings
  165. Allocation settings deprecated in 1.x have been removed:
  166. * `cluster.routing.allocation.concurrent_recoveries` is superseded by `cluster.routing.allocation.node_concurrent_recoveries`
  167. Please change the setting in your configuration files or in the clusterstate to use the new settings instead.
  168. ==== Similarity settings
  169. The 'default' similarity has been renamed to 'classic'.
  170. [[breaking_30_mapping_changes]]
  171. === Mapping changes
  172. ==== Transform removed
  173. The `transform` feature from mappings has been removed. It made issues very hard to debug.
  174. ==== Default number mappings
  175. When a floating-point number is encountered, it is now dynamically mapped as a
  176. float by default instead of a double. The reasoning is that floats should be
  177. more than enough for most cases but would decrease storage requirements
  178. significantly.
  179. ==== `_source`'s `format` option
  180. The `_source` mapping does not support the `format` option anymore. This option
  181. will still be accepted for indices created before the upgrade to 3.0 for backward
  182. compatibility, but it will have no effect. Indices created on or after 3.0 will
  183. reject this option.
  184. ==== Object notation
  185. Core types don't support the object notation anymore, which allowed to provide
  186. values as follows:
  187. [source,json]
  188. -----
  189. {
  190. "value": "field_value",
  191. "boost": 42
  192. }
  193. ----
  194. [[breaking_30_plugins]]
  195. === Plugin changes
  196. Plugins implementing custom queries need to implement the `fromXContent(QueryParseContext)` method in their
  197. `QueryParser` subclass rather than `parse`. This method will take care of parsing the query from `XContent` format
  198. into an intermediate query representation that can be streamed between the nodes in binary format, effectively the
  199. query object used in the java api. Also, the query parser needs to implement the `getBuilderPrototype` method that
  200. returns a prototype of the `NamedWriteable` query, which allows to deserialize an incoming query by calling
  201. `readFrom(StreamInput)` against it, which will create a new object, see usages of `Writeable`. The `QueryParser`
  202. also needs to declare the generic type of the query that it supports and it's able to parse.
  203. The query object can then transform itself into a lucene query through the new `toQuery(QueryShardContext)` method,
  204. which returns a lucene query to be executed on the data node.
  205. Similarly, plugins implementing custom score functions need to implement the `fromXContent(QueryParseContext)`
  206. method in their `ScoreFunctionParser` subclass rather than `parse`. This method will take care of parsing
  207. the function from `XContent` format into an intermediate function representation that can be streamed between
  208. the nodes in binary format, effectively the function object used in the java api. Also, the query parser needs
  209. to implement the `getBuilderPrototype` method that returns a prototype of the `NamedWriteable` function, which
  210. allows to deserialize an incoming function by calling `readFrom(StreamInput)` against it, which will create a
  211. new object, see usages of `Writeable`. The `ScoreFunctionParser` also needs to declare the generic type of the
  212. function that it supports and it's able to parse. The function object can then transform itself into a lucene
  213. function through the new `toFunction(QueryShardContext)` method, which returns a lucene function to be executed
  214. on the data node.
  215. ==== Cloud AWS plugin changes
  216. Cloud AWS plugin has been split in two plugins:
  217. * {plugins}/discovery-ec2.html[Discovery EC2 plugin]
  218. * {plugins}/repository-s3.html[Repository S3 plugin]
  219. Proxy settings for both plugins have been renamed:
  220. * from `cloud.aws.proxy_host` to `cloud.aws.proxy.host`
  221. * from `cloud.aws.ec2.proxy_host` to `cloud.aws.ec2.proxy.host`
  222. * from `cloud.aws.s3.proxy_host` to `cloud.aws.s3.proxy.host`
  223. * from `cloud.aws.proxy_port` to `cloud.aws.proxy.port`
  224. * from `cloud.aws.ec2.proxy_port` to `cloud.aws.ec2.proxy.port`
  225. * from `cloud.aws.s3.proxy_port` to `cloud.aws.s3.proxy.port`
  226. ==== Cloud Azure plugin changes
  227. Cloud Azure plugin has been split in three plugins:
  228. * {plugins}/discovery-azure.html[Discovery Azure plugin]
  229. * {plugins}/repository-azure.html[Repository Azure plugin]
  230. * {plugins}/store-smb.html[Store SMB plugin]
  231. If you were using the `cloud-azure` plugin for snapshot and restore, you had in `elasticsearch.yml`:
  232. [source,yaml]
  233. -----
  234. cloud:
  235. azure:
  236. storage:
  237. account: your_azure_storage_account
  238. key: your_azure_storage_key
  239. -----
  240. You need to give a unique id to the storage details now as you can define multiple storage accounts:
  241. [source,yaml]
  242. -----
  243. cloud:
  244. azure:
  245. storage:
  246. my_account:
  247. account: your_azure_storage_account
  248. key: your_azure_storage_key
  249. -----
  250. ==== Cloud GCE plugin changes
  251. Cloud GCE plugin has been renamed to {plugins}/discovery-gce.html[Discovery GCE plugin].
  252. [[breaking_30_java_api_changes]]
  253. === Java API changes
  254. ==== Count api has been removed
  255. The deprecated count api has been removed from the Java api, use the search api instead and set size to 0.
  256. The following call
  257. [source,java]
  258. -----
  259. client.prepareCount(indices).setQuery(query).get();
  260. -----
  261. can be replaced with
  262. [source,java]
  263. -----
  264. client.prepareSearch(indices).setSource(new SearchSourceBuilder().size(0).query(query)).get();
  265. -----
  266. ==== BoostingQueryBuilder
  267. Removed setters for mandatory positive/negative query. Both arguments now have
  268. to be supplied at construction time already and have to be non-null.
  269. ==== SpanContainingQueryBuilder
  270. Removed setters for mandatory big/little inner span queries. Both arguments now have
  271. to be supplied at construction time already and have to be non-null. Updated
  272. static factory methods in QueryBuilders accordingly.
  273. ==== SpanOrQueryBuilder
  274. Making sure that query contains at least one clause by making initial clause mandatory
  275. in constructor.
  276. ==== SpanNearQueryBuilder
  277. Removed setter for mandatory slop parameter, needs to be set in constructor now. Also
  278. making sure that query contains at least one clause by making initial clause mandatory
  279. in constructor. Updated the static factory methods in QueryBuilders accordingly.
  280. ==== SpanNotQueryBuilder
  281. Removed setter for mandatory include/exclude span query clause, needs to be set in constructor now.
  282. Updated the static factory methods in QueryBuilders and tests accordingly.
  283. ==== SpanWithinQueryBuilder
  284. Removed setters for mandatory big/little inner span queries. Both arguments now have
  285. to be supplied at construction time already and have to be non-null. Updated
  286. static factory methods in QueryBuilders accordingly.
  287. ==== QueryFilterBuilder
  288. Removed the setter `queryName(String queryName)` since this field is not supported
  289. in this type of query. Use `FQueryFilterBuilder.queryName(String queryName)` instead
  290. when in need to wrap a named query as a filter.
  291. ==== WrapperQueryBuilder
  292. Removed `wrapperQueryBuilder(byte[] source, int offset, int length)`. Instead simply
  293. use `wrapperQueryBuilder(byte[] source)`. Updated the static factory methods in
  294. QueryBuilders accordingly.
  295. ==== QueryStringQueryBuilder
  296. Removed ability to pass in boost value using `field(String field)` method in form e.g. `field^2`.
  297. Use the `field(String, float)` method instead.
  298. ==== Operator
  299. Removed the enums called `Operator` from `MatchQueryBuilder`, `QueryStringQueryBuilder`,
  300. `SimpleQueryStringBuilder`, and `CommonTermsQueryBuilder` in favour of using the enum
  301. defined in `org.elasticsearch.index.query.Operator` in an effort to consolidate the
  302. codebase and avoid duplication.
  303. ==== queryName and boost support
  304. Support for `queryName` and `boost` has been streamlined to all of the queries. That is
  305. a breaking change till queries get sent over the network as serialized json rather
  306. than in `Streamable` format. In fact whenever additional fields are added to the json
  307. representation of the query, older nodes might throw error when they find unknown fields.
  308. ==== InnerHitsBuilder
  309. InnerHitsBuilder now has a dedicated addParentChildInnerHits and addNestedInnerHits methods
  310. to differentiate between inner hits for nested vs. parent / child documents. This change
  311. makes the type / path parameter mandatory.
  312. ==== MatchQueryBuilder
  313. Moving MatchQueryBuilder.Type and MatchQueryBuilder.ZeroTermsQuery enum to MatchQuery.Type.
  314. Also reusing new Operator enum.
  315. ==== MoreLikeThisQueryBuilder
  316. Removed `MoreLikeThisQueryBuilder.Item#id(String id)`, `Item#doc(BytesReference doc)`,
  317. `Item#doc(XContentBuilder doc)`. Use provided constructors instead.
  318. Removed `MoreLikeThisQueryBuilder#addLike` in favor of texts and/or items being provided
  319. at construction time. Using arrays there instead of lists now.
  320. Removed `MoreLikeThisQueryBuilder#addUnlike` in favor to using the `unlike` methods
  321. which take arrays as arguments now rather than the lists used before.
  322. The deprecated `docs(Item... docs)`, `ignoreLike(Item... docs)`,
  323. `ignoreLike(String... likeText)`, `addItem(Item... likeItems)` have been removed.
  324. ==== GeoDistanceQueryBuilder
  325. Removing individual setters for lon() and lat() values, both values should be set together
  326. using point(lon, lat).
  327. ==== GeoDistanceRangeQueryBuilder
  328. Removing setters for to(Object ...) and from(Object ...) in favour of the only two allowed input
  329. arguments (String, Number). Removing setter for center point (point(), geohash()) because parameter
  330. is mandatory and should already be set in constructor.
  331. Also removing setters for lt(), lte(), gt(), gte() since they can all be replaced by equivallent
  332. calls to to/from() and inludeLower()/includeUpper().
  333. ==== GeoPolygonQueryBuilder
  334. Require shell of polygon already to be specified in constructor instead of adding it pointwise.
  335. This enables validation, but makes it necessary to remove the addPoint() methods.
  336. ==== MultiMatchQueryBuilder
  337. Moving MultiMatchQueryBuilder.ZeroTermsQuery enum to MatchQuery.ZeroTermsQuery.
  338. Also reusing new Operator enum.
  339. Removed ability to pass in boost value using `field(String field)` method in form e.g. `field^2`.
  340. Use the `field(String, float)` method instead.
  341. ==== MissingQueryBuilder
  342. The MissingQueryBuilder which was deprecated in 2.2.0 is removed. As a replacement use ExistsQueryBuilder
  343. inside a mustNot() clause. So instead of using `new ExistsQueryBuilder(name)` now use
  344. `new BoolQueryBuilder().mustNot(new ExistsQueryBuilder(name))`.
  345. ==== NotQueryBuilder
  346. The NotQueryBuilder which was deprecated in 2.1.0 is removed. As a replacement use BoolQueryBuilder
  347. with added mustNot() clause. So instead of using `new NotQueryBuilder(filter)` now use
  348. `new BoolQueryBuilder().mustNot(filter)`.
  349. ==== TermsQueryBuilder
  350. Remove the setter for `termsLookup()`, making it only possible to either use a TermsLookup object or
  351. individual values at construction time. Also moving individual settings for the TermsLookup (lookupIndex,
  352. lookupType, lookupId, lookupPath) to the separate TermsLookup class, using constructor only and moving
  353. checks for validation there. Removed `TermsLookupQueryBuilder` in favour of `TermsQueryBuilder`.
  354. ==== FunctionScoreQueryBuilder
  355. `add` methods have been removed, all filters and functions must be provided as constructor arguments by
  356. creating an array of `FunctionScoreQueryBuilder.FilterFunctionBuilder` objects, containing one element
  357. for each filter/function pair.
  358. `scoreMode` and `boostMode` can only be provided using corresponding enum members instead
  359. of string values: see `FilterFunctionScoreQuery.ScoreMode` and `CombineFunction`.
  360. `CombineFunction.MULT` has been renamed to `MULTIPLY`.
  361. ==== IdsQueryBuilder
  362. For simplicity, only one way of adding the ids to the existing list (empty by default) is left: `addIds(String...)`
  363. ==== DocumentAlreadyExistsException removed
  364. `DocumentAlreadyExistsException` is removed and a `VersionConflictException` is thrown instead (with a better
  365. error description). This will influence code that use the `IndexRequest.opType()` or `IndexRequest.create()`
  366. to index a document only if it doesn't already exist.
  367. ==== ShapeBuilders
  368. `InternalLineStringBuilder` is removed in favour of `LineStringBuilder`, `InternalPolygonBuilder` in favour of PolygonBuilder` and `Ring` has been replaced with `LineStringBuilder`. Also the abstract base classes `BaseLineStringBuilder` and `BasePolygonBuilder` haven been merged with their corresponding implementations.
  369. [[breaking_30_cache_concurrency]]
  370. === Cache concurrency level settings removed
  371. Two cache concurrency level settings `indices.requests.cache.concurrency_level` and
  372. `indices.fielddata.cache.concurrency_level` because they no longer apply to the cache implementation used for the
  373. request cache and the field data cache.
  374. [[breaking_30_non_loopback]]
  375. === Remove bind option of `non_loopback`
  376. This setting would arbitrarily pick the first interface not marked as loopback. Instead, specify by address
  377. scope (e.g. `_local_,_site_` for all loopback and private network addresses) or by explicit interface names,
  378. hostnames, or addresses.
  379. [[breaking_30_thread_pool]]
  380. === Forbid changing of thread pool types
  381. Previously, <<modules-threadpool,thread pool types>> could be dynamically adjusted. The thread pool type effectively
  382. controls the backing queue for the thread pool and modifying this is an expert setting with minimal practical benefits
  383. and high risk of being misused. The ability to change the thread pool type for any thread pool has been removed; do note
  384. that it is still possible to adjust relevant thread pool parameters for each of the thread pools (e.g., depending on
  385. the thread pool type, `keep_alive`, `queue_size`, etc.).
  386. === Adding system CPU percent to OS stats
  387. The recent CPU usage (as a percent) has been added to the OS stats reported under the node stats API and the cat nodes
  388. API. The breaking change here is that there is a new object in the "os" object in the node stats response. This object
  389. is called "cpu" and includes "percent" and "load_average" as fields. This moves the "load_average" field that was
  390. previously a top-level field in the "os" object to the "cpu" object. Additionally, the "cpu" field in the cat nodes API
  391. response is output by default.
  392. Finally, the API for org.elasticsearch.monitor.os.OsStats has changed. The `getLoadAverage` method has been removed. The
  393. value for this can now be obtained from `OsStats.Cpu#getLoadAverage`. Additionally, the recent CPU usage can be obtained
  394. from `OsStats.Cpu#getPercent`.
  395. === Fields option
  396. Only stored fields are retrievable with this option.
  397. The fields option won't be able to load non stored fields from _source anymore.
  398. [[breaking_30_allocation]]
  399. === Primary shard allocation
  400. Previously, primary shards were only assigned if a quorum of shard copies were found (configurable using
  401. `index.recovery.initial_shards`, now deprecated). In case where a primary had only a single replica, quorum was defined
  402. to be a single shard. This meant that any shard copy of an index with replication factor 1 could become primary, even it
  403. was a stale copy of the data on disk. This is now fixed by using allocation IDs.
  404. Allocation IDs assign unique identifiers to shard copies. This allows the cluster to differentiate between multiple
  405. copies of the same data and track which shards have been active, so that after a cluster restart, shard copies
  406. containing only the most recent data can become primaries.
  407. ==== `index.shared_filesystem.recover_on_any_node` changes
  408. The behavior of `index.shared_filesystem.recover_on_any_node = true` has been changed. Previously, in the case where no
  409. shard copies could be found, an arbitrary node was chosen by potentially ignoring allocation deciders. Now, we take
  410. balancing into account but don't assign the shard if the allocation deciders are not satisfied. The behavior has also changed
  411. in the case where shard copies can be found. Previously, a node not holding the shard copy was chosen if none of the nodes
  412. holding shard copies were satisfying the allocation deciders. Now, the shard will be assigned to a node having a shard copy,
  413. even if none of the nodes holding a shard copy satisfy the allocation deciders.
  414. === Percolator
  415. Adding percolator queries and modifications to existing percolator queries are no longer visible in immediately
  416. to the percolator. A refresh is required to run before the changes are visible to the percolator.
  417. The reason that this has changed is that on newly created indices the percolator automatically indexes the query terms
  418. and these query terms are used at percolate time to reduce the amount of queries the percolate API needs evaluate.
  419. This optimization didn't work in the percolate API mode where modifications to queries are immediately visible.
  420. The percolator by defaults sets the `size` option to `10` whereas before this was set to unlimited.
  421. The percolate api can no longer accept documents that have fields that don't exist in the mapping.
  422. When percolating an existing document then specifying a document in the source of the percolate request is not allowed
  423. any more.