-
Notifications
You must be signed in to change notification settings - Fork 723
Changelog
- Jest for ES6.
| Status | ES API | Jest API | Notes |
|---|---|---|---|
| CHANGED | Create Index | CreateIndex |
Now there exist separate methods for setting aliases, mappings and settings. Adding a payload ignores all other fields. These fields can be added as Map Objects or Strings. |
| CHANGED | Index | AbstractDocumentTargetedAction |
Document id is no longer encoded while creating documents. Now, you should encode the id before indexing the document. |
- First Jest version available for ES6.
| Status | ES API | Jest API | Notes |
|---|---|---|---|
| REMOVED | Percolator | Percolator |
Removed due to deprecation, instead use the Percolate Query. |
| REMOVED | Suggest | Suggest |
Removed due to deprecation, instead use the Suggesters. |
| REMOVED | Field Stats | Field Stats |
Field Stats is deprecated and removed, use Field Capabilities instead. |
| CHANGED | Analyze | Analyze |
Requests to _analyze does not take analyzer type as a parameter anymore, pass the analyzer type in request body instead. Analyzers must have a text field now. Analyzers now accept multiple filters. |
| CHANGED | Scripting | AbstractStoredScript |
Requests to _scripts does not take lang as the parameter anymore, specify the lang in the body instead. |
-
📡 Dependency version upgrades:
Component Old Version New Version Test Scope Elasticsearch 5.3.2 6.3.1 Lucene 6.4.2 7.3.1 -
✨ Improvements:
-
Default scripting language is set to
PAINLESSin order to reflect the ES6 default scripting language.
| Status | ES API | Jest API | Notes |
|---|---|---|---|
| CHANGED | Create Index | CreateIndex |
Now there exist separate methods for setting aliases, mappings and settings. Adding a payload ignores all other fields. These fields can be added as Map Objects or Strings. |
| CHANGED | Index | AbstractDocumentTargetedAction |
Document id is no longer encoded while creating documents. Now, you should encode the id before indexing the document. |
- Please see the git log
- Please see the git log
- 📡 Dependency version upgrades:
| Component | Old Version | New Version |
|---|---|---|
| Compile Scope | ||
| Elasticsearch | 1.7.1 | 1.7.5 |
| HttpClient | 4.5.1 | 4.5.2 |
| Guava | 18.0 | 19.0 |
| Gson | 2.4 | 2.6.2 |
| Plugin Scope | ||
| Surefire | 2.19 | 2.19.1 |
- First version that is compatible with Elasticsearch 2.0.0!
- Huge thanks to andrejserafim for taking the initiative for the update to es-2.0.0.
-
[BREAKING CHANGES since Jest v1.0.0]
⚠️
| Status | ES API | Jest API | Notes |
|---|---|---|---|
| REMOVED | More Like This | MoreLikeThis |
Removed in 2.0, instead use the More Like This Query. |
| REMOVED | Facets |
Facet DateHistogramFacet FilterFacet GeoDistanceFacet HistogramFacet QueryFacet RangeFacet StatisticalFacet TermsFacet TermsStatsFacet SearchResult.getFacets()
|
Facets are deprecated and removed. You are encouraged to migrate to aggregations instead. |
| REMOVED | Index Status | Status |
The index _status API has been replaced with the Indices Stats and Indices Recovery APIs. |
| REMOVED | Search Type |
SearchType.FS_QUERY_AND_FETCH SearchType.QUERY_AND_FETCH
|
These 2 search types are removed from ES API and from the Jest SearchType enum. |
| CHANGED | Analyze | Analyze.Builder.source(Object) |
Replaced with Analyze.Builder.text(String / Collection<? extends String>)
|
| WARNING | Delete By Query | DeleteByQuery |
API replaced with a plugin in 2.0. We are keeping the action class in Jest because it works with the plugin. |
-
📡 Dependency version upgrades:
Component Old Version New Version Test Scope Elasticsearch 1.7.1 2.0.0 Elasticsearch Delete By Query plugin - 2.0.0 Lucene 4.10.4 5.2.1 Randomized Testing 2.1.14 2.1.16
-
✨ Improvements:
-
Lazy instantiate socket factories, route planners and session strategies in
HttpClientConfig.Builder. (#252 - poblish & 35d5617) -
Overall cleanup of poms, imports and unnecessary casts in equals methods. (#249 - nicoruti)
-
🚀 New features:
-
Added
JestResult.getSourceAsString()method that returns thesourceelement in response JSON as raw string. (#249 - nicoruti) -
💩 Bug fixes:
-
Fixed the case where
MultiSearchaction was erroneously wrapping individual search bodies inqueryelements. (#245 - hlassiege & 2bc7afc & 97b4cf4) -
📡 Dependency version upgrades:
Component Old Version New Version Compile Scope Apache HttpCore 4.4.1 4.4.4 Apache HttpClient 4.5 4.5.1 Apache HttpAsyncClient 4.1 4.1.1 GSON 2.3.1 2.4 SLF4J API 1.7.12 1.7.13 SLF4J Android Binding 1.7.12 1.7.13 Plugins Surefire 2.18.1 2.19 Coveralls 3.1.0 4.0.0
-
✨ Improvements:
-
Replaced
HashMapinstances withLinkedHashMapfor element order preservation and predictability (where it matters) - bd7c793. -
Added fields
index,typeandscoretoSearchResult.Hit. (#218) - sunilalmond -
Added
responseCodefield toJestResultwhich returns the HTTP response code received from server - 4f04175. -
[BREAKING CHANGE]
⚠️ All action class constructors are now inprotectedaccess level. Classes that were previously onpubliclevel:Health,NodesHotThreads,NodesInfo,NodesShutdown,NodesStats,State,Bulk,Count,DeleteByQuery,MultiGet,MultiSearch,Percolate,SearchScroll,Analyze,ClearCache,CloseIndex,CreateIndex,DeleteIndex,IndicesExists,OpenIndex,DeleteMapping,PutMapping,DeleteTemplate,PutTemplate,GetTemplate,TemplateAction. -
Replaced
StringBuilderwith+string concatenation where appropriate. (#222) - nitram509 -
Added
DocumentResultclass that provides access toindex,typeandidfields in the response which is returned by actions:Delete,Explain,Get,Index,Update. (#221) - bartekbp -
🚀 New features:
-
Bulkaction now returns aBulkResultwhich provides access to individual items in a bulk response. (#208) -
Added
CreateIndexedScript,DeleteIndexedScriptandGetIndexedScriptactions for dealing with indexed scripts. (#213) - nitram509 -
💩 Bug fixes:
-
Fixed a bug which could cause a
NullPointerExceptionwhenTermsAggregationwas used against an older Elasticsearch server version. (#210) - VlasShatokhin -
Bulkaction now considers theerrorsfield in response when reporting success. (#208) -
Async client now has all the config options (timeout, maxConn etc.) set on it correctly. (#219)
-
Fixed faulty code that did not pass the connection timeout property to the HttpClient correctly. (#227) - gunnarmorling
-
📡 Dependency version upgrades:
Component Old Version New Version Compile Scope Apache HttpClient 4.4.1 4.5 SLF4J Android Binding 1.6.1-RC1 1.7.12 Test Scope Elasticsearch 1.5.2 1.7.1 RandomizedTesting Randomized Runner 2.1.11 2.1.14 Apache Groovy 2.4.0 2.4.4
-
✨ Improvements:
-
Most
Actionimplementations (with a payload) now have their ownequalsandhashCodeimplementations #180 - ce215ee. -
Deserialization process no more swallows (parse) exceptions #185 - puszczyk.
-
[BREAKING CHANGE]
⚠️ Refactored internal server pool iteration logic - 4d6cd25.-
RoundRobinServerListclass andServerListinterface is removed. - In class
AbstractJestClient, methodpublic LinkedHashSet<String> getServers()is replaced byprotected int getServerPoolSize(). - In class
AbstractJestClient, methodpublic void setServers(ServerList list)is removed. - In class
AbstractJestClient, methodprotected String getElasticSearchServer()is renamed toprotected String getNextServer().
-
-
Android module jest-droid is now using the official Apache Android port of the http client httpclient-android instead of httpclientandroidlib - (#193) ee7938b.
-
Internal logging implementation is now
slf4j-log4j12binding instead oflog4j-slf4j; this change has no effect to users - bc3178a. -
AbstractActioncan now handle clean api parameters (parameters that are passed to Elasticsearch as comma separated values within the URL) and regular HTTP parameters at the same time for a single request/action - a607910. Due to this refactor, clean api actionsNodesInfo,NodesStats, andStatehad some **[BREAKING CHANGE]**s:- Optional field selector methods in builders now do not take any parameters and are prefixed with
with(i.e.:NodesStats.Builder.jvm(boolean value)is nowNodesStats.Builder.withJvm()).
- Optional field selector methods in builders now do not take any parameters and are prefixed with
-
[BREAKING CHANGE]
⚠️ Removed obsolete methods fromAbstractAction:isValid,isBulkOperation,setBulkOperation,setCleanApi. -
Default URI scheme for discovered nodes can now be set when constructing the client via
ClientConfig.Builder.defaultSchemeForDiscoveredNodes(String scheme)#196. -
Added copying constructors to result classes to make extending easier.
-
🚀 New features:
-
Authentication, HTTP/SSL and proxy usage is now directly supported through
HttpClientConfig. -
Aggregations in search responses is now supported #146 - cfstout.
-
It is now possible to retrieve the sort value of a hit in a search result #188 - edreyer.
-
DeleteMappingaction is implemented #190 - FrancoisThareau. -
Cluster actions
UpdateSettingsandGetSettingsare implemented - e6bb9ad. -
SearchShardsaction is implemented #198. -
Request compression can now be enabled via
ClientConfig.Builder.requestCompressionEnabled(boolean isRequestCompressionEnabled), the settinghttp.compressionalso needs to be set on the server side for this to work - 8577a09. -
💩 Bug fixes:
-
NodesInfoaction was using an undocumented way of passing requested info sections to Elasticsearch which is no longer supported - 2ea8c15. -
📡 Dependency version upgrades:
Component Old Version New Version Compile Scope Apache Commons Lang 3.3.2 3.4 Apache HttpAsyncClient 4.0.2 4.1 Apache HttpClient 4.4 4.4.1 Apache HttpCore NIO 4.4 4.4.1 SLF4J API Module 1.7.10 1.7.12 Provided Scope SLF4J LOG4J 12 Binding 1.7.10 1.7.12 Test Scope Elasticsearch 1.4.2 1.5.2 Lucene Test Framework 4.10.2 4.10.4 Plugin Scope Maven Surefire Plugin 2.18 2.18.1 Apache Maven Compiler Plugin 3.2 3.3 Maven Release Plugin 2.5 2.5.2 Apache Maven Javadoc Plugin 2.10.1 2.10.3 Coveralls Maven Plugin 3.0.1 3.1.0 Mojo's Maven Plugin For Cobertura 2.6 2.7
-
✨ Improvements:
-
Minor structural refactor on
JestHttpClient -
Structural and assertion refactor on test classes
-
🚀 New features:
-
None 😞
-
💩 Bug fixes:
-
Date format for the default Gson instance did not match the date format (ISO date) used in default Elasticsearch date field. (#165)
-
When using
JestResult.getSourceAsObject()method,@JestIdannotated field on the returned object was not set if no field corresponding to_idwas present insourcedata (e.g.: indexing was done without using class serialization flow in Jest). (#142) - tomsen-san -
📡 Dependency version upgrades:
Component Old Version New Version Elasticsearch 1.3.4 1.4.2 Lucene 4.9.1 4.10.2 Randomizedtesting 2.1.6 2.1.11 HttpCore 4.3.3 4.4 HttpClient 4.3.6 4.4 Slf4j 1.7.7 1.7.10 Mockito 1.10.8 1.10.19
-
✨ Improvements:
-
Added contribution guidelines & code of conduct.
-
Converted JSON serialization process of
SortinsideSearchfrom string building to Gson. (dcf2807) -
[BREAKING CHANGE]
⚠️ Moved getFacets method from JestResult to SearchResult (#160) -
[BREAKING CHANGE]
⚠️ Removed some of the setters fromDocclass:void setIndex(String index)void setType(String type)void setId(String id)void removeAllFields()boolean removeField(String field)
-
[BREAKING CHANGE]
⚠️ Return type ofDoc.getFields()has changed fromHashSet<String>toCollection<String> -
🚀 New features:
-
MultiGetaction now supportsroutingandsourcefields per document through the helper classDoc(#161) -
💩 Bug fixes:
-
Multiple index affecting operations do not accept the
ignore_indicesparameter since ES 1.x and was replaced byignore_unavailableandallow_no_indicesparameters; this change was not reflected in Jest previously. (#162) - whiter4bbit -
📡 Dependency version upgrades:
Component Old Version New Version HttpCore 4.3.2 4.3.3 HttpClient 4.3.5 4.3.6 Log4J 1.2.17 2.1 Gson 2.3 2.3.1 Mockito 1.9.5 1.10.8 JUnit 4.11 4.12 Maven Surefire Plugin 2.17 2.18 Maven Compiler Plugin 3.1 3.2 Maven Source Plugin 2.3 2.4 Maven JavaDoc Plugin 2.10 2.10.1 Maven Coveralls Plugin 2.2.0 3.0.1
-
Improvements:
-
Readme - puszczyk
-
Stability and predictability fixes for some tests
-
SearchResultnow provides getters fortotal&max_scorefields (#140) -
Less chatty log configuration for test phase
-
New features:
-
Idle connection reaper - opt-in ability to clean idle connections in the pool periodically (#149) - matthewbogner
-
GetSettingsandUpdateSettingsactions are implemented (#155) -
Bug fixes:
-
NullPointerExceptionwas thrown when discovery is enabled and nodes do not havehttp_addresselement as part of their result (i.e. logstash nodes) (#139) - phospodka -
When an empty string was provided as the body (or source) for an
Actionit was re-interpreted by GSON which lead to unexpected behavior in some edge-cases. Such arguments are sent to Elastichsearch as-is now. -
Dependency version upgrades:
Component Old Version New Version Elasticsearch 1.2.2 1.3.4 Lucene 4.8.1 4.9.1 Randomized-testing 2.1.2 2.1.6 Apache HttpClient 4.3.4 4.3.5 Apache HttpAsyncClient 4.0.1 4.0.2 Guava 17.0 18.0 GSON 2.2.4 2.3 Maven JavaDoc Plugin 2.9.1 2.10 Exec Maven Plugin 1.3.1 1.3.2
-
Improvements:
-
Readme
-
Added debug level logging for each executed action (#124) - happyprg
-
Date format for the default GSON instance now matches the ES' format (#130 & #134) - puszczyk
-
CreateIndexaction now accepts any object as settings source (#118 & #40) -
Added private default constructor for
JestResultso that it plays nicely with mocking mechanisms when testing (#137) -
Refactored several integration tests so that they work with ES 1.2.x
-
Implemented new actions:
-
Bug fixes:
-
SearchScrollaction always used HTTP GET method which caused problems withscroll_ids larger than 1900 characters (#126) - srapp -
In alias mappings, provided JSON sources were unnecessarily escaped (#127 & #128) - puszczyk
-
ignore_indicesparameter was ignored even when it is explicitly set (#133) - eschuchmann -
Dependency version upgrades:
Component Old Version New Version Sonatype Parent POM 7 9 Elasticsearch 1.0.2 1.2.2 Lucene 4.6.1 4.8.1 Randomized-testing 2.1.1 2.1.2 Apache HttpClient 4.3.3 4.3.4 Apache HttpAsyncClient 4.0 4.0.1 Slf4j 1.7.6 1.7.7 Guava 16.0.1 17.0 Apache CommonsLang 3.3.1 3.3.2 Maven Source Plugin 2.2.1 2.3 Maven Exec Plugin 1.2.1 1.3.1 LittleProxy 1.0.0-beta7 1.0.0-beta8 Maven Surefire Plugin 2.7.2 2.17 Maven Release Plugin 2.3.2 2.5
- Improvements:
- Better isolation for some tests
- Readme
- Result creation is now done by the respective
Actionimplementation instead ofAbstractJestClient(#106) - Added
CountResultandSearchResultclasses which are returned when the respective actions are executed (i.e.:SearchResult result = client.execute(search);) - "Explain" data is now available through
SearchResult(#106) - System default proxy is now used by
JestClientFactory(#56) - Dependency version upgrades:
- Elasticsearch to
1.0.2from1.0.0 - RandomizedTesting to
2.1.1from2.0.15 - HttpCore to
4.3.2from4.3.1 - HttpClient to
4.3.3from4.3.2 - Slf4j to
1.7.6from1.7.5 - Log4j to
1.2.17from1.2.16 - Guava to
16.0.1from16.0 - CommonsLang to
3.3.1from3.1 - Maven plugin version upgrades:
- Surefire to
2.17from2.7.2 - Compiler to
3.1from2.0.2 - Javadoc to
2.9.1from2.9 - Cobertura to
2.6from2.5.2 - Coveralls to
2.2.0from2.0.1 - Bug fixes:
-
JestHttpClient.getAsyncClientreturn type wasHttpAsyncClientinstead ofCloseableHttpAsyncClient(#111) - Breaking changes:
-
Actioninterface and its implementation are moved fromio.searchboxtoio.searchbox.actionpackage -
Action.isOperationSucceedmethod is removed as it is obsolete with ES version > 1.0
- First release with Elasticsearch v1.X compatibility.
- Improvements:
- Refactored HttpClient creation and added ability to provide custom configuration to HttpClient - renholm
- Fixed dependency converge issues (#102)
- Now using eleasticsearch test-jar instead of tlrx's elasticsearch-test package
- Added license file to root and informational tags to sub-module poms.
- Bug fixes:
- NodeChecker elevated any exception caught while performing NodesInfo action which caused scheduled calls (and the discovery service) to stop.
- The last release with support for Elasticsearch version 0.90.x
- Moved to a sub-module based structure to support jest-droid project
- Readme changes:
- Added coveralls & bitdeli badges to readme
- Clarified use of JestId annotation in readme and added a sample test case for JestId type conversion
- Version upgrades:
- Upgrade gson to 2.2.4 due to hashing bug in 2.2.3 - joningle
- Upgrade to HttpClient 4.3.x. - markwoon
- Bug fixes:
- Bulk operation ignored the user set defaultType (#78)
- Improvements:
- Add timeout options when building ClientConfig - MinCha
- Index, type & id parameters are now kept mandatory by builder constructor for Explain and MoreLikeThis actions.
- Breaking changes:
- Instead of
ClientConfigyou should now useHttpClientConfigorDroidClientConfigaccording to the actual client implementation you use. -
JestClientFactory.setClientConfig(ClientConfig)is nowJestClientFactory.setHttpClientConfig(HttpClientConfig)
- Implemented new actions:
- Clear Cache
- Analyze
- Nodes Stats
- Nodes Hot Threads
- Cluster State
- Bug fixes:
- No httpclient value fails the NodeChecker task - (#53)
- Bulk action removes all whitespaces from content of inner index actions - (#60)
- Jest should url encode docids - (#59)
- Centralized GSON instance configuration
- Updated elasticsearch version to 0.90.5 - markwoon
- Updated commons-lang version to 3.1 - markwoon
- Indices Status action implemented
- JestResult refactored FilippoR
- Discovery API refactored tootedom
- Mapping actions refactored
- Flush action implemented
- Open/Close actions implemented
- Aliases implemented
- Indices Stats action implemented
- Fixed a bug JVM hangs - David Connard
- Responses with no entities handled properly - David Connard
- Cluster health action implemented nigelzor
- Update ES to v0.90.2 markwoon
- Complete rewrite of Bulk actions
Special thanks to kramer for his great contribution.
- Fixed a thread safe issue while working in multi threaded mode.
- Added support for http request headers to actions. Thanks to peterhawkins
- Fixed "Search ignores addParameter() method".
- New client configuration parameters added which can be use if client constructed in multi threaded mode.
ClientConstants.MAX_TOTAL_CONNECTION // Max total http connection
ClientConstants.DEFAULT_MAX_TOTAL_CONNECTION_PER_ROUTE // Max total connection for each route (url)
ClientConstants.MAX_TOTAL_CONNECTION_PER_ROUTE // Configuration for each individual route- Fixed an issue causes request fail for Sort if an empty list is provided.
- Added support for all types of facet query results. For instance;
Search search = new Search(query);
search.addIndex("terms_facet");
search.addType("document");
JestResult result = client.execute(search);
List<TermsFacet> termsFacets = result.getFacets(TermsFacet.class);Please see facet integration tests.
- GetTemplate and PutTemplate action implemented. Thanks to asierdelpozo
- PutMapping and GetMapping implemented as draft.
- Client configuration simplified.Map of serverProperties and clientProperties merged as properties.
clientConfig.getProperties().put(ClientConstants.SERVER_LIST, servers);- ElasticSearch dependency is now optional, please ensure to add it to use QueryBuilder and Settings.
- QueryBuilder usage is changed as
Search search = new Search(Search.createQueryWithBuilder(queryBuilder.toString()));due to make ElasticSearch dependency optional.
- Jest http client supports execution of action with non blocking IO asynchronously.
- If it is enabled, Jest now discovers nodes with Nodes API issue/2.
clientConfig.getClientFeatures().put(ClientConstants.DISCOVERY_ENABLED, true); //boolean
clientConfig.getClientFeatures().put(ClientConstants.DISCOVERY_FREQUENCY, 1l); //long
clientConfig.getClientFeatures().put(ClientConstants.DISCOVERY_FREQUENCY_TIMEUNIT, TimeUnit.MINUTES);- Sorting support added to Search API pull/5. Thanks to raymanrt
- Index Exits API is implemented. Thanks to hlassiege
- While fetching search results as POJOS, if result of search request "_source" does not contains @JestId field, this marked field's value will be "_id". Issue/7
- List of POJOS can be indexed via bulk api.
Bulk bulk = new Bulk("twitter", "tweet");
Article article1 = new Article("tweet1");
Article article2 = new Article("tweet1");
bulk.addIndexList(Arrays.asList(article1, article2););
client.execute(bulk);