Skip to content
Permalink
Browse files

XContent refactoring, closes #367.

  • Loading branch information...
kimchy committed Sep 12, 2010
1 parent 4822517 commit 38aeba438d6d14e2af913b7bcb0d8fee3dc1ffa2
Showing with 844 additions and 1,466 deletions.
  1. +1 −1 .../benchmark/micro/src/main/java/org/elasticsearch/benchmark/stress/SingleThreadIndexingStress.java
  2. +3 −4 ...elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/create/CreateIndexRequest.java
  3. +2 −3 ...ticsearch/src/main/java/org/elasticsearch/action/admin/indices/mapping/put/PutMappingRequest.java
  4. +2 −2 ...icsearch/src/main/java/org/elasticsearch/action/admin/indices/settings/UpdateSettingsRequest.java
  5. +2 −3 modules/elasticsearch/src/main/java/org/elasticsearch/action/count/CountRequest.java
  6. +2 −3 modules/elasticsearch/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryRequest.java
  7. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/action/get/GetResponse.java
  8. +5 −6 modules/elasticsearch/src/main/java/org/elasticsearch/action/index/IndexRequest.java
  9. +3 −4 modules/elasticsearch/src/main/java/org/elasticsearch/action/mlt/MoreLikeThisRequest.java
  10. +5 −6 modules/elasticsearch/src/main/java/org/elasticsearch/action/search/SearchRequest.java
  11. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/action/search/SearchResponse.java
  12. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/client/Requests.java
  13. +1 −1 ...src/main/java/org/elasticsearch/client/action/admin/indices/create/CreateIndexRequestBuilder.java
  14. +1 −1 ...main/java/org/elasticsearch/client/action/admin/indices/mapping/put/PutMappingRequestBuilder.java
  15. +1 −1 ...arch/src/main/java/org/elasticsearch/client/action/deletebyquery/DeleteByQueryRequestBuilder.java
  16. +2 −2 modules/elasticsearch/src/main/java/org/elasticsearch/client/action/index/IndexRequestBuilder.java
  17. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/cluster/block/ClusterBlock.java
  18. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java
  19. +140 −0 modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/IndexerMetaData.java
  20. +2 −7 modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaData.java
  21. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/common/Bytes.java
  22. +7 −0 modules/elasticsearch/src/main/java/org/elasticsearch/common/io/FastByteArrayOutputStream.java
  23. +1 −2 modules/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/ToXContent.java
  24. +141 −111 ...s/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/{builder → }/XContentBuilder.java
  25. +26 −34 modules/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/XContentFactory.java
  26. +6 −1 modules/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/XContentGenerator.java
  27. +4 −4 modules/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/XContentType.java
  28. +0 −94 .../elasticsearch/src/main/java/org/elasticsearch/common/xcontent/builder/BinaryXContentBuilder.java
  29. +0 −137 ...es/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/builder/TextXContentBuilder.java
  30. +12 −65 modules/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/json/JsonXContent.java
  31. +13 −1 ...les/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/json/JsonXContentGenerator.java
  32. +89 −0 modules/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/smile/SmileXContent.java
  33. +48 −0 ...s/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/smile/SmileXContentGenerator.java
  34. +10 −24 ...main/java/org/elasticsearch/common/xcontent/{xson/XsonType.java → smile/SmileXContentParser.java}
  35. +1 −1 ...s/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/support/XContentMapConverter.java
  36. +0 −99 modules/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/xson/XsonXContent.java
  37. +0 −211 ...les/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/xson/XsonXContentGenerator.java
  38. +0 −383 modules/elasticsearch/src/main/java/org/elasticsearch/common/xcontent/xson/XsonXContentParser.java
  39. +3 −7 modules/elasticsearch/src/main/java/org/elasticsearch/gateway/blobstore/BlobStoreGateway.java
  40. +3 −7 modules/elasticsearch/src/main/java/org/elasticsearch/gateway/local/LocalGateway.java
  41. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/gateway/local/LocalGatewayMetaState.java
  42. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/gateway/local/LocalGatewayStartedShards.java
  43. +10 −2 ...asticsearch/src/main/java/org/elasticsearch/index/field/function/script/ScriptFieldsFunction.java
  44. +2 −2 modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/CommitPoints.java
  45. +1 −1 ...s/elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentAllFieldMapper.java
  46. +1 −1 ...lasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentBinaryFieldMapper.java
  47. +1 −1 ...asticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentBooleanFieldMapper.java
  48. +1 −1 ...elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentBoostFieldMapper.java
  49. +1 −1 .../elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentDateFieldMapper.java
  50. +2 −6 ...s/elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentDocumentMapper.java
  51. +1 −1 ...lasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentDoubleFieldMapper.java
  52. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentFieldMapper.java
  53. +1 −1 ...elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentFloatFieldMapper.java
  54. +1 −1 ...sticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentGeoPointFieldMapper.java
  55. +1 −1 ...es/elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentIdFieldMapper.java
  56. +1 −1 ...elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentIndexFieldMapper.java
  57. +1 −1 ...asticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentIntegerFieldMapper.java
  58. +1 −1 .../elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentLongFieldMapper.java
  59. +1 −1 ...elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentMultiFieldMapper.java
  60. +1 −1 ...lasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentNumberFieldMapper.java
  61. +1 −1 ...les/elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentObjectMapper.java
  62. +1 −1 ...elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentShortFieldMapper.java
  63. +1 −1 ...lasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentSourceFieldMapper.java
  64. +1 −1 ...lasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentStringFieldMapper.java
  65. +1 −1 .../elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentTypeFieldMapper.java
  66. +1 −1 ...s/elasticsearch/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentUidFieldMapper.java
  67. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/AndFilterBuilder.java
  68. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/BaseFilterBuilder.java
  69. +3 −4 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/BaseQueryBuilder.java
  70. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/BoolFilterBuilder.java
  71. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/BoolQueryBuilder.java
  72. +1 −1 ...elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/ConstantScoreQueryBuilder.java
  73. +1 −1 ...ticsearch/src/main/java/org/elasticsearch/index/query/xcontent/CustomBoostFactorQueryBuilder.java
  74. +1 −1 ...s/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/CustomScoreQueryBuilder.java
  75. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/DisMaxQueryBuilder.java
  76. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/FieldQueryBuilder.java
  77. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/FilteredQueryBuilder.java
  78. +1 −1 ...icsearch/src/main/java/org/elasticsearch/index/query/xcontent/FuzzyLikeThisFieldQueryBuilder.java
  79. +1 −1 ...elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/FuzzyLikeThisQueryBuilder.java
  80. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/FuzzyQueryBuilder.java
  81. +1 −1 ...asticsearch/src/main/java/org/elasticsearch/index/query/xcontent/GeoBoundingBoxFilterBuilder.java
  82. +1 −1 .../elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/GeoDistanceFilterBuilder.java
  83. +1 −1 ...s/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/GeoPolygonFilterBuilder.java
  84. +1 −1 ...les/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/MatchAllFilterBuilder.java
  85. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/MatchAllQueryBuilder.java
  86. +1 −1 ...ticsearch/src/main/java/org/elasticsearch/index/query/xcontent/MoreLikeThisFieldQueryBuilder.java
  87. +1 −1 .../elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/MoreLikeThisQueryBuilder.java
  88. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/NotFilterBuilder.java
  89. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/OrFilterBuilder.java
  90. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/PrefixFilterBuilder.java
  91. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/PrefixQueryBuilder.java
  92. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/QueryFilterBuilder.java
  93. +1 −1 ...s/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/QueryStringQueryBuilder.java
  94. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/RangeFilterBuilder.java
  95. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/RangeQueryBuilder.java
  96. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/ScriptFilterBuilder.java
  97. +1 −1 ...les/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/SpanFirstQueryBuilder.java
  98. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/SpanNearQueryBuilder.java
  99. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/SpanNotQueryBuilder.java
  100. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/SpanOrQueryBuilder.java
  101. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/SpanTermQueryBuilder.java
  102. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/TermFilterBuilder.java
  103. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/TermQueryBuilder.java
  104. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/TermsFilterBuilder.java
  105. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/WildcardQueryBuilder.java
  106. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/monitor/jvm/JvmInfo.java
  107. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/monitor/jvm/JvmStats.java
  108. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/monitor/network/NetworkInfo.java
  109. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/monitor/network/NetworkStats.java
  110. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/monitor/os/OsInfo.java
  111. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/monitor/os/OsStats.java
  112. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/monitor/process/ProcessInfo.java
  113. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/monitor/process/ProcessStats.java
  114. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/rest/XContentRestResponse.java
  115. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/rest/XContentThrowableRestResponse.java
  116. +1 −1 ...rch/src/main/java/org/elasticsearch/rest/action/admin/cluster/health/RestClusterHealthAction.java
  117. +1 −1 ...arch/src/main/java/org/elasticsearch/rest/action/admin/cluster/node/info/RestNodesInfoAction.java
  118. +1 −1 ...rc/main/java/org/elasticsearch/rest/action/admin/cluster/node/restart/RestNodesRestartAction.java
  119. +1 −1 .../main/java/org/elasticsearch/rest/action/admin/cluster/node/shutdown/RestNodesShutdownAction.java
  120. +1 −1 ...ch/src/main/java/org/elasticsearch/rest/action/admin/cluster/node/stats/RestNodesStatsAction.java
  121. +1 −1 ...main/java/org/elasticsearch/rest/action/admin/cluster/ping/broadcast/RestBroadcastPingAction.java
  122. +1 −1 .../java/org/elasticsearch/rest/action/admin/cluster/ping/replication/RestReplicationPingAction.java
  123. +1 −1 ...h/src/main/java/org/elasticsearch/rest/action/admin/cluster/ping/single/RestSinglePingAction.java
  124. +1 −1 ...earch/src/main/java/org/elasticsearch/rest/action/admin/cluster/state/RestClusterStateAction.java
  125. +1 −1 ...rch/src/main/java/org/elasticsearch/rest/action/admin/indices/alias/RestIndicesAliasesAction.java
  126. +1 −1 ...ain/java/org/elasticsearch/rest/action/admin/indices/cache/clear/RestClearIndicesCacheAction.java
  127. +1 −1 ...earch/src/main/java/org/elasticsearch/rest/action/admin/indices/create/RestCreateIndexAction.java
  128. +1 −1 ...earch/src/main/java/org/elasticsearch/rest/action/admin/indices/delete/RestDeleteIndexAction.java
  129. +1 −1 ...lasticsearch/src/main/java/org/elasticsearch/rest/action/admin/indices/flush/RestFlushAction.java
  130. +1 −1 .../java/org/elasticsearch/rest/action/admin/indices/gateway/snapshot/RestGatewaySnapshotAction.java
  131. +1 −1 ...h/src/main/java/org/elasticsearch/rest/action/admin/indices/mapping/get/RestGetMappingAction.java
  132. +1 −1 ...h/src/main/java/org/elasticsearch/rest/action/admin/indices/mapping/put/RestPutMappingAction.java
  133. +1 −1 ...search/src/main/java/org/elasticsearch/rest/action/admin/indices/optimize/RestOptimizeAction.java
  134. +1 −1 ...icsearch/src/main/java/org/elasticsearch/rest/action/admin/indices/refresh/RestRefreshAction.java
  135. +1 −1 .../src/main/java/org/elasticsearch/rest/action/admin/indices/settings/RestUpdateSettingsAction.java
  136. +1 −1 ...rch/src/main/java/org/elasticsearch/rest/action/admin/indices/status/RestIndicesStatusAction.java
  137. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/count/RestCountAction.java
  138. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/delete/RestDeleteAction.java
  139. +1 −1 ...sticsearch/src/main/java/org/elasticsearch/rest/action/deletebyquery/RestDeleteByQueryAction.java
  140. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/get/RestGetAction.java
  141. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/index/RestIndexAction.java
  142. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/main/RestMainAction.java
  143. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/mlt/RestMoreLikeThisAction.java
  144. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/search/RestSearchAction.java
  145. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/search/RestSearchScrollAction.java
  146. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/support/RestActions.java
  147. +3 −4 modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/support/RestXContentBuilder.java
  148. +4 −1 modules/elasticsearch/src/main/java/org/elasticsearch/search/SearchContextException.java
  149. +1 −0 modules/elasticsearch/src/main/java/org/elasticsearch/search/SearchService.java
  150. +6 −11 modules/elasticsearch/src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java
  151. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/AbstractFacetBuilder.java
  152. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/filter/FilterFacetBuilder.java
  153. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/filter/InternalFilterFacet.java
  154. +1 −1 ...sticsearch/src/main/java/org/elasticsearch/search/facets/geodistance/GeoDistanceFacetBuilder.java
  155. +1 −1 ...ticsearch/src/main/java/org/elasticsearch/search/facets/geodistance/InternalGeoDistanceFacet.java
  156. +1 −1 .../elasticsearch/src/main/java/org/elasticsearch/search/facets/histogram/HistogramFacetBuilder.java
  157. +1 −1 ...icsearch/src/main/java/org/elasticsearch/search/facets/histogram/HistogramScriptFacetBuilder.java
  158. +1 −1 ...elasticsearch/src/main/java/org/elasticsearch/search/facets/histogram/InternalHistogramFacet.java
  159. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/internal/InternalFacets.java
  160. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/query/InternalQueryFacet.java
  161. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/query/QueryFacetBuilder.java
  162. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/range/InternalRangeFacet.java
  163. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/range/RangeFacetBuilder.java
  164. +1 −1 ...es/elasticsearch/src/main/java/org/elasticsearch/search/facets/range/RangeScriptFacetBuilder.java
  165. +1 −1 ...ticsearch/src/main/java/org/elasticsearch/search/facets/statistical/InternalStatisticalFacet.java
  166. +1 −1 ...sticsearch/src/main/java/org/elasticsearch/search/facets/statistical/StatisticalFacetBuilder.java
  167. +1 −1 ...arch/src/main/java/org/elasticsearch/search/facets/statistical/StatisticalScriptFacetBuilder.java
  168. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/terms/InternalTermsFacet.java
  169. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/search/facets/terms/TermsFacetBuilder.java
  170. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/search/highlight/HighlightBuilder.java
  171. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/search/internal/InternalSearchHit.java
  172. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/search/internal/InternalSearchHits.java
  173. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/search/internal/InternalSearchResponse.java
  174. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/search/sort/FieldSortBuilder.java
  175. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/search/sort/GeoDistanceSortBuilder.java
  176. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/search/sort/ScoreSortBuilder.java
  177. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java
  178. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/threadpool/ThreadPoolInfo.java
  179. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/threadpool/ThreadPoolStats.java
  180. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/transport/TransportInfo.java
  181. +1 −1 modules/elasticsearch/src/main/java/org/elasticsearch/transport/TransportStats.java
  182. +76 −0 ...s/elasticsearch/src/test/java/org/elasticsearch/common/xcontent/builder/BuilderRawFieldTests.java
  183. +7 −5 ...s/elasticsearch/src/test/java/org/elasticsearch/common/xcontent/builder/XContentBuilderTests.java
  184. +3 −3 ...c/test/java/org/elasticsearch/common/xcontent/xson/{JsonVsXsonTests.java → JsonVsSmileTests.java}
  185. +6 −7 ...rc/test/java/org/elasticsearch/index/mapper/xcontent/defaultsource/DefaultSourceMappingTests.java
  186. +3 −4 ...h/src/test/java/org/elasticsearch/index/mapper/xcontent/geopoint/GeohashMappingGeoPointTests.java
  187. +3 −4 ...t/java/org/elasticsearch/index/mapper/xcontent/geopoint/LatLonAndGeohashMappingGeoPointTests.java
  188. +10 −11 ...ch/src/test/java/org/elasticsearch/index/mapper/xcontent/geopoint/LatLonMappingGeoPointTests.java
  189. +3 −4 ...asticsearch/src/test/java/org/elasticsearch/index/mapper/xcontent/index/IndexTypeMapperTests.java
  190. +1 −2 ...test/java/org/elasticsearch/index/mapper/xcontent/object/XContentNullValueObjectMappingTests.java
  191. +1 −2 .../src/test/java/org/elasticsearch/index/mapper/xcontent/overridetype/OverrideTypeMappingTests.java
  192. +10 −11 ...rc/test/java/org/elasticsearch/index/mapper/xcontent/typelevels/ParseDocumentTypeLevelsTests.java
  193. +1 −2 .../src/test/java/org/elasticsearch/index/mapper/xcontent/typelevels/ParseMappingTypeLevelTests.java
  194. +1 −0 modules/jarjar/build.gradle
  195. +2 −3 ...integration/src/test/java/org/elasticsearch/test/integration/broadcast/BroadcastActionsTests.java
  196. +1 −1 ...gration/src/test/java/org/elasticsearch/test/integration/search/TransportSearchFailuresTests.java
  197. +1 −1 ...ation/src/test/java/org/elasticsearch/test/integration/search/TransportTwoServersSearchTests.java
  198. +2 −3 ...n/src/test/java/org/elasticsearch/test/integration/search/compress/SearchSourceCompressTests.java
  199. +1 −2 ...integration/src/test/java/org/elasticsearch/test/integration/search/fields/SearchFieldsTests.java
  200. +1 −1 ...ation/src/test/java/org/elasticsearch/test/integration/search/highlight/HighlightSearchTests.java
  201. +1 −1 plugins/client/groovy/src/main/groovy/org/elasticsearch/groovy/client/GClient.groovy
  202. +3 −4 ...ns/client/groovy/src/main/groovy/org/elasticsearch/groovy/common/xcontent/GXContentBuilder.groovy
  203. +1 −1 ...r/attachments/src/main/java/org/elasticsearch/index/mapper/xcontent/XContentAttachmentMapper.java
@@ -23,7 +23,7 @@
import org.elasticsearch.client.Client;
import org.elasticsearch.common.StopWatch;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.builder.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.node.Node;

import java.io.IOException;
@@ -28,10 +28,9 @@
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.common.xcontent.builder.TextXContentBuilder;
import org.elasticsearch.common.xcontent.builder.XContentBuilder;

import java.io.IOException;
import java.util.Map;
@@ -141,7 +140,7 @@ public CreateIndexRequest settings(String source) {
*/
public CreateIndexRequest settings(Map source) {
try {
TextXContentBuilder builder = XContentFactory.contentTextBuilder(XContentType.JSON);
XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON);
builder.map(source);
settings(builder.string());
} catch (IOException e) {
@@ -192,7 +191,7 @@ public CreateIndexRequest mapping(String type, XContentBuilder source) {
*/
public CreateIndexRequest mapping(String type, Map source) {
try {
TextXContentBuilder builder = XContentFactory.contentTextBuilder(XContentType.JSON);
XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON);
builder.map(source);
return mapping(type, builder.string());
} catch (IOException e) {
@@ -27,10 +27,9 @@
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.common.xcontent.builder.TextXContentBuilder;
import org.elasticsearch.common.xcontent.builder.XContentBuilder;

import java.io.IOException;
import java.util.Map;
@@ -137,7 +136,7 @@ String source() {
*/
@Required public PutMappingRequest source(Map mappingSource) {
try {
TextXContentBuilder builder = XContentFactory.contentTextBuilder(XContentType.JSON);
XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON);
builder.map(mappingSource);
return source(builder.string());
} catch (IOException e) {
@@ -26,9 +26,9 @@
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.common.xcontent.builder.TextXContentBuilder;

import java.io.IOException;
import java.util.Map;
@@ -114,7 +114,7 @@ public UpdateSettingsRequest settings(String source) {
*/
public UpdateSettingsRequest settings(Map source) {
try {
TextXContentBuilder builder = XContentFactory.contentTextBuilder(XContentType.JSON);
XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON);
builder.map(source);
settings(builder.string());
} catch (IOException e) {
@@ -32,10 +32,9 @@
import org.elasticsearch.common.io.FastByteArrayOutputStream;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.common.xcontent.builder.BinaryXContentBuilder;
import org.elasticsearch.common.xcontent.builder.XContentBuilder;
import org.elasticsearch.index.query.QueryBuilder;

import javax.annotation.Nullable;
@@ -184,7 +183,7 @@ int querySourceLength() {
*/
@Required public CountRequest query(Map querySource) {
try {
BinaryXContentBuilder builder = XContentFactory.contentBinaryBuilder(contentType);
XContentBuilder builder = XContentFactory.contentBuilder(contentType);
builder.map(querySource);
return query(builder);
} catch (IOException e) {
@@ -32,10 +32,9 @@
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.common.xcontent.builder.BinaryXContentBuilder;
import org.elasticsearch.common.xcontent.builder.XContentBuilder;
import org.elasticsearch.index.query.QueryBuilder;

import java.io.IOException;
@@ -147,7 +146,7 @@ public DeleteByQueryRequest indices(String... indices) {
*/
@Required public DeleteByQueryRequest query(Map querySource) {
try {
BinaryXContentBuilder builder = XContentFactory.contentBinaryBuilder(contentType);
XContentBuilder builder = XContentFactory.contentBuilder(contentType);
builder.map(querySource);
return query(builder);
} catch (IOException e) {
@@ -28,9 +28,9 @@
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Streamable;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.builder.XContentBuilder;
import org.elasticsearch.rest.action.support.RestXContentBuilder;

import java.io.IOException;
@@ -30,10 +30,9 @@
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.common.xcontent.builder.BinaryXContentBuilder;
import org.elasticsearch.common.xcontent.builder.XContentBuilder;

import java.io.IOException;
import java.util.Arrays;
@@ -49,8 +48,8 @@
* {@link #source(byte[])} to be set.
*
* <p>The source (content to index) can be set in its bytes form using ({@link #source(byte[])}),
* its string form ({@link #source(String)}) or using a {@link org.elasticsearch.common.xcontent.builder.XContentBuilder}
* ({@link #source(org.elasticsearch.common.xcontent.builder.XContentBuilder)}).
* its string form ({@link #source(String)}) or using a {@link org.elasticsearch.common.xcontent.XContentBuilder}
* ({@link #source(org.elasticsearch.common.xcontent.XContentBuilder)}).
*
* <p>If the {@link #id(String)} is not set, it will be automatically generated.
*
@@ -238,7 +237,7 @@ public IndexRequest id(String id) {
*/
@Required public IndexRequest source(Map source, XContentType contentType) throws ElasticSearchGenerationException {
try {
BinaryXContentBuilder builder = XContentFactory.contentBinaryBuilder(contentType);
XContentBuilder builder = XContentFactory.contentBuilder(contentType);
builder.map(source);
return source(builder);
} catch (IOException e) {
@@ -249,7 +248,7 @@ public IndexRequest id(String id) {
/**
* Sets the document source to index.
*
* <p>Note, its preferable to either set it using {@link #source(org.elasticsearch.common.xcontent.builder.XContentBuilder)}
* <p>Note, its preferable to either set it using {@link #source(org.elasticsearch.common.xcontent.XContentBuilder)}
* or using the {@link #source(byte[])}.
*/
@Required public IndexRequest source(String source) {
@@ -34,10 +34,9 @@
import org.elasticsearch.common.io.FastByteArrayOutputStream;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.common.xcontent.builder.BinaryXContentBuilder;
import org.elasticsearch.common.xcontent.builder.XContentBuilder;
import org.elasticsearch.search.Scroll;
import org.elasticsearch.search.builder.SearchSourceBuilder;

@@ -324,7 +323,7 @@ void beforeLocalFork() {
* more like this documents.
*/
public MoreLikeThisRequest searchSource(SearchSourceBuilder sourceBuilder) {
FastByteArrayOutputStream bos = sourceBuilder.buildAsUnsafeBytes();
FastByteArrayOutputStream bos = sourceBuilder.buildAsUnsafeBytes(Requests.CONTENT_TYPE);
this.searchSource = bos.unsafeByteArray();
this.searchSourceOffset = 0;
this.searchSourceLength = bos.size();
@@ -347,7 +346,7 @@ public MoreLikeThisRequest searchSource(String searchSource) {

public MoreLikeThisRequest searchSource(Map searchSource) {
try {
BinaryXContentBuilder builder = XContentFactory.contentBinaryBuilder(contentType);
XContentBuilder builder = XContentFactory.contentBuilder(contentType);
builder.map(searchSource);
return searchSource(builder);
} catch (IOException e) {
@@ -32,10 +32,9 @@
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.common.xcontent.builder.BinaryXContentBuilder;
import org.elasticsearch.common.xcontent.builder.XContentBuilder;
import org.elasticsearch.search.Scroll;
import org.elasticsearch.search.builder.SearchSourceBuilder;

@@ -217,7 +216,7 @@ public SearchRequest searchType(String searchType) throws ElasticSearchIllegalAr
* The source of the search request.
*/
public SearchRequest source(SearchSourceBuilder sourceBuilder) {
FastByteArrayOutputStream bos = sourceBuilder.buildAsUnsafeBytes();
FastByteArrayOutputStream bos = sourceBuilder.buildAsUnsafeBytes(Requests.CONTENT_TYPE);
this.source = bos.unsafeByteArray();
this.sourceOffset = 0;
this.sourceLength = bos.size();
@@ -243,7 +242,7 @@ public SearchRequest source(String source) {
*/
public SearchRequest source(Map source) {
try {
BinaryXContentBuilder builder = XContentFactory.contentBinaryBuilder(contentType);
XContentBuilder builder = XContentFactory.contentBuilder(contentType);
builder.map(source);
return source(builder);
} catch (IOException e) {
@@ -300,7 +299,7 @@ public int sourceLength() {
* Allows to provide additional source that will be used as well.
*/
public SearchRequest extraSource(SearchSourceBuilder sourceBuilder) {
FastByteArrayOutputStream bos = sourceBuilder.buildAsUnsafeBytes();
FastByteArrayOutputStream bos = sourceBuilder.buildAsUnsafeBytes(Requests.CONTENT_TYPE);
this.extraSource = bos.unsafeByteArray();
this.extraSourceOffset = 0;
this.extraSourceLength = bos.size();
@@ -310,7 +309,7 @@ public SearchRequest extraSource(SearchSourceBuilder sourceBuilder) {

public SearchRequest extraSource(Map extraSource) {
try {
BinaryXContentBuilder builder = XContentFactory.contentBinaryBuilder(contentType);
XContentBuilder builder = XContentFactory.contentBuilder(contentType);
builder.map(extraSource);
return extraSource(builder);
} catch (IOException e) {
@@ -23,7 +23,7 @@
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.builder.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.search.SearchHits;
import org.elasticsearch.search.facets.Facets;
import org.elasticsearch.search.internal.InternalSearchResponse;
@@ -59,7 +59,7 @@
/**
* The content type used to generate request builders (query / search).
*/
public static XContentType CONTENT_TYPE = XContentType.XSON;
public static XContentType CONTENT_TYPE = XContentType.SMILE;

public static IndexRequest indexRequest() {
return new IndexRequest();
@@ -26,7 +26,7 @@
import org.elasticsearch.client.action.admin.indices.support.BaseIndicesRequestBuilder;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.builder.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentBuilder;

import java.util.Map;

@@ -25,7 +25,7 @@
import org.elasticsearch.client.IndicesAdminClient;
import org.elasticsearch.client.action.admin.indices.support.BaseIndicesRequestBuilder;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.builder.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentBuilder;

import java.util.Map;

@@ -26,7 +26,7 @@
import org.elasticsearch.client.Client;
import org.elasticsearch.client.action.support.BaseRequestBuilder;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.builder.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.index.query.QueryBuilder;

import java.util.Map;
@@ -26,8 +26,8 @@
import org.elasticsearch.client.Client;
import org.elasticsearch.client.action.support.BaseRequestBuilder;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.common.xcontent.builder.XContentBuilder;

import javax.annotation.Nullable;
import java.util.Map;
@@ -91,7 +91,7 @@ public IndexRequestBuilder setSource(Map<String, Object> source, XContentType co
/**
* Sets the document source to index.
*
* <p>Note, its preferable to either set it using {@link #setSource(org.elasticsearch.common.xcontent.builder.XContentBuilder)}
* <p>Note, its preferable to either set it using {@link #setSource(org.elasticsearch.common.xcontent.XContentBuilder)}
* or using the {@link #setSource(byte[])}.
*/
public IndexRequestBuilder setSource(String source) {
@@ -23,7 +23,7 @@
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Streamable;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.builder.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentBuilder;

import java.io.IOException;
import java.io.Serializable;
@@ -30,9 +30,9 @@
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.Immutable;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.builder.XContentBuilder;

import javax.annotation.Nullable;
import java.io.IOException;

0 comments on commit 38aeba4

Please sign in to comment.
You can’t perform that action at this time.