Skip to content

Commit

Permalink
More Like This: removal of the MLT API
Browse files Browse the repository at this point in the history
Removes the More Like This API, users should now use the More Like This query.
The MLT API tests were converted to their query equivalent. Also some clean
ups in MLT tests.

Closes #10736
Closes #11003
  • Loading branch information
alexksikes committed May 6, 2015
1 parent 234716a commit ec4f12f
Show file tree
Hide file tree
Showing 27 changed files with 97 additions and 2,067 deletions.
3 changes: 2 additions & 1 deletion docs/reference/migration/index.asciidoc
Expand Up @@ -19,7 +19,8 @@ See <<setup-upgrade>> for more info.

include::migrate_2_0.asciidoc[]

include::migrate_1_6.asciidoc[]

include::migrate_1_4.asciidoc[]

include::migrate_1_0.asciidoc[]

10 changes: 10 additions & 0 deletions docs/reference/migration/migrate_1_6.asciidoc
@@ -0,0 +1,10 @@
[[breaking-changes-1.6]]
== Breaking changes in 1.6

This section discusses the changes that you need to be aware of when migrating
your application from Elasticsearch 1.x to Elasticsearch 1.6.

[float]
=== More Like This API

The More Like This API query has been deprecated and will be removed in 2.0. Instead use the <<query-dsl-mlt-query, More Like This Query>>.
6 changes: 3 additions & 3 deletions docs/reference/migration/migrate_2_0.asciidoc
Expand Up @@ -24,10 +24,10 @@ The following deprecated methods have been removed:

Partial fields were deprecated since 1.0.0beta1 in favor of <<search-request-source-filtering,source filtering>>.

=== More Like This Field
=== More Like This

The More Like This Field query has been removed in favor of the <<query-dsl-mlt-query, More Like This Query>>
restrained set to a specific `field`.
The More Like This API and the More Like This Field query have been removed in
favor of the <<query-dsl-mlt-query, More Like This Query>>.

=== Routing

Expand Down
3 changes: 0 additions & 3 deletions docs/reference/search.asciidoc
Expand Up @@ -101,7 +101,4 @@ include::search/explain.asciidoc[]

include::search/percolate.asciidoc[]

include::search/more-like-this.asciidoc[]

include::search/field-stats.asciidoc[]

32 changes: 0 additions & 32 deletions docs/reference/search/more-like-this.asciidoc

This file was deleted.

104 changes: 0 additions & 104 deletions rest-api-spec/api/mlt.json

This file was deleted.

17 changes: 11 additions & 6 deletions rest-api-spec/test/mlt/10_basic.yaml
Expand Up @@ -30,11 +30,16 @@
wait_for_status: green

- do:
mlt:
index: test_1
type: test
id: 1
mlt_fields: title

search:
index: test_1
type: test
body:
query:
more_like_this:
like:
-
_id: 1
fields: ["title"]

- match: {hits.total: 0}

3 changes: 0 additions & 3 deletions src/main/java/org/elasticsearch/action/ActionModule.java
Expand Up @@ -139,8 +139,6 @@
import org.elasticsearch.action.indexedscripts.get.TransportGetIndexedScriptAction;
import org.elasticsearch.action.indexedscripts.put.PutIndexedScriptAction;
import org.elasticsearch.action.indexedscripts.put.TransportPutIndexedScriptAction;
import org.elasticsearch.action.mlt.MoreLikeThisAction;
import org.elasticsearch.action.mlt.TransportMoreLikeThisAction;
import org.elasticsearch.action.percolate.*;
import org.elasticsearch.action.search.*;
import org.elasticsearch.action.search.type.*;
Expand Down Expand Up @@ -293,7 +291,6 @@ protected void configure() {
TransportSearchScrollQueryAndFetchAction.class
);
registerAction(MultiSearchAction.INSTANCE, TransportMultiSearchAction.class);
registerAction(MoreLikeThisAction.INSTANCE, TransportMoreLikeThisAction.class);
registerAction(PercolateAction.INSTANCE, TransportPercolateAction.class);
registerAction(MultiPercolateAction.INSTANCE, TransportMultiPercolateAction.class, TransportShardMultiPercolateAction.class);
registerAction(ExplainAction.INSTANCE, TransportExplainAction.class);
Expand Down
46 changes: 0 additions & 46 deletions src/main/java/org/elasticsearch/action/mlt/MoreLikeThisAction.java

This file was deleted.

0 comments on commit ec4f12f

Please sign in to comment.