add migration guide to use search api for suggest

This commit is contained in:
Areek Zillur 2016-03-23 14:38:53 -04:00
parent b1ceaaddf4
commit e7e93f98e3
1 changed files with 19 additions and 0 deletions

View File

@ -22,6 +22,25 @@ can be replaced with
client.prepareSearch(indices).setSource(new SearchSourceBuilder().size(0).query(query)).get(); client.prepareSearch(indices).setSource(new SearchSourceBuilder().size(0).query(query)).get();
----- -----
==== Suggest api has been removed
The suggest api has been removed from the Java api, use the suggest option in search api, it has been optimized
for suggest-only request.
The following call
[source,java]
-----
client.prepareSuggest(indices).addSuggestion("foo", SuggestBuilders.completionSuggestion("field").text("s")).get();
-----
can be replaced with
[source,java]
-----
client.prepareSearch(indices).suggest(new SuggestBuilder().addSuggestion("foo", SuggestBuilders.completionSuggestion("field").text("s"))).get();
-----
==== Elasticsearch will no longer detect logging implementations ==== Elasticsearch will no longer detect logging implementations
Elasticsearch now logs only to log4j 1.2. Previously if log4j wasn't on the Elasticsearch now logs only to log4j 1.2. Previously if log4j wasn't on the