-
Notifications
You must be signed in to change notification settings - Fork 727
Changelog
-
✨ Improvements:
-
Replaced
HashMap
instances withLinkedHashMap
for element order preservation and predictability (where it matters) - bd7c793. -
Added fields
index
,type
andscore
toSearchResult.Hit
. (#218) - sunilalmond -
Added
responseCode
field toJestResult
which returns the HTTP response code received from server - 4f04175. -
[BREAKING CHANGE]
⚠️ All action class constructors are now inprotected
access level. Classes that were previously onpublic
level: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
StringBuilder
with+
string concatenation where appropriate. (#222) - nitram509 -
Added
DocumentResult
class that provides access toindex
,type
andid
fields in the response which is returned by actions:Delete
,Explain
,Get
,Index
,Update
. (#221) - bartekbp -
🚀 New features:
-
Bulk
action now returns aBulkResult
which provides access to individual items in a bulk response. (#208) -
Added
CreateIndexedScript
,DeleteIndexedScript
andGetIndexedScript
actions for dealing with indexed scripts. (#213) - nitram509 -
💩 Bug fixes:
-
Fixed a bug which could cause a
NullPointerException
whenTermsAggregation
was used against an older Elasticsearch server version. (#210) - VlasShatokhin -
Bulk
action now considers theerrors
field 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
Action
implementations (with a payload) now have their ownequals
andhashCode
implementations #180 - ce215ee. -
Deserialization process no more swallows (parse) exceptions #185 - puszczyk.
-
[BREAKING CHANGE]
⚠️ Refactored internal server pool iteration logic - 4d6cd25.-
RoundRobinServerList
class andServerList
interface 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-log4j12
binding instead oflog4j-slf4j
; this change has no effect to users - bc3178a. -
AbstractAction
can 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
, andState
had 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.
-
DeleteMapping
action is implemented #190 - FrancoisThareau. -
Cluster actions
UpdateSettings
andGetSettings
are implemented - e6bb9ad. -
SearchShards
action is implemented #198. -
Request compression can now be enabled via
ClientConfig.Builder.requestCompressionEnabled(boolean isRequestCompressionEnabled)
, the settinghttp.compression
also needs to be set on the server side for this to work - 8577a09. -
💩 Bug fixes:
-
NodesInfo
action 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,@JestId
annotated field on the returned object was not set if no field corresponding to_id
was present insource
data (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
Sort
insideSearch
from string building to Gson. (dcf2807) -
[BREAKING CHANGE]
⚠️ Moved getFacets method from JestResult to SearchResult (#160) -
[BREAKING CHANGE]
⚠️ Removed some of the setters fromDoc
class: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:
-
MultiGet
action now supportsrouting
andsource
fields per document through the helper classDoc
(#161) -
💩 Bug fixes:
-
Multiple index affecting operations do not accept the
ignore_indices
parameter since ES 1.x and was replaced byignore_unavailable
andallow_no_indices
parameters; 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
-
SearchResult
now provides getters fortotal
&max_score
fields (#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
-
GetSettings
andUpdateSettings
actions are implemented (#155) -
Bug fixes:
-
NullPointerException
was thrown when discovery is enabled and nodes do not havehttp_address
element as part of their result (i.e. logstash nodes) (#139) - phospodka -
When an empty string was provided as the body (or source) for an
Action
it 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
-
CreateIndex
action now accepts any object as settings source (#118 & #40) -
Added private default constructor for
JestResult
so 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:
-
SearchScroll
action always used HTTP GET method which caused problems withscroll_id
s larger than 1900 characters (#126) - srapp -
In alias mappings, provided JSON sources were unnecessarily escaped (#127 & #128) - puszczyk
-
ignore_indices
parameter 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
Action
implementation instead ofAbstractJestClient
(#106) - Added
CountResult
andSearchResult
classes 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.2
from1.0.0
- RandomizedTesting to
2.1.1
from2.0.15
- HttpCore to
4.3.2
from4.3.1
- HttpClient to
4.3.3
from4.3.2
- Slf4j to
1.7.6
from1.7.5
- Log4j to
1.2.17
from1.2.16
- Guava to
16.0.1
from16.0
- CommonsLang to
3.3.1
from3.1
- Maven plugin version upgrades:
- Surefire to
2.17
from2.7.2
- Compiler to
3.1
from2.0.2
- Javadoc to
2.9.1
from2.9
- Cobertura to
2.6
from2.5.2
- Coveralls to
2.2.0
from2.0.1
- Bug fixes:
-
JestHttpClient.getAsyncClient
return type wasHttpAsyncClient
instead ofCloseableHttpAsyncClient
(#111) - Breaking changes:
-
Action
interface and its implementation are moved fromio.searchbox
toio.searchbox.action
package -
Action.isOperationSucceed
method 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
ClientConfig
you should now useHttpClientConfig
orDroidClientConfig
according 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);