diff --git a/src/main/java/org/elasticsearch/action/explain/TransportExplainAction.java b/src/main/java/org/elasticsearch/action/explain/TransportExplainAction.java index ff99e651479..09cf71a7825 100644 --- a/src/main/java/org/elasticsearch/action/explain/TransportExplainAction.java +++ b/src/main/java/org/elasticsearch/action/explain/TransportExplainAction.java @@ -86,7 +86,7 @@ public class TransportExplainAction extends TransportShardSingleOperationAction< protected ExplainResponse shardOperation(ExplainRequest request, int shardId) throws ElasticSearchException { IndexService indexService = indicesService.indexService(request.index()); IndexShard indexShard = indexService.shardSafe(shardId); - Term uidTerm = UidFieldMapper.TERM_FACTORY.createTerm(Uid.createUid(request.type(), request.id())); + Term uidTerm = new Term(UidFieldMapper.NAME, Uid.createUid(request.type(), request.id())); Engine.GetResult result = indexShard.get(new Engine.Get(false, uidTerm)); if (!result.exists()) { return new ExplainResponse(false); @@ -104,7 +104,7 @@ public class TransportExplainAction extends TransportShardSingleOperationAction< try { context.parsedQuery(parseQuery(request, indexService)); context.preProcess(); - int topLevelDocId = result.docIdAndVersion().docId + result.docIdAndVersion().docStart; + int topLevelDocId = result.docIdAndVersion().docId + result.docIdAndVersion().reader.docBase; Explanation explanation = context.searcher().explain(context.query(), topLevelDocId); if (request.fields() != null) { diff --git a/src/main/java/org/elasticsearch/action/mlt/TransportMoreLikeThisAction.java b/src/main/java/org/elasticsearch/action/mlt/TransportMoreLikeThisAction.java index 3376c3f1d2a..97f254cc6a1 100644 --- a/src/main/java/org/elasticsearch/action/mlt/TransportMoreLikeThisAction.java +++ b/src/main/java/org/elasticsearch/action/mlt/TransportMoreLikeThisAction.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.mlt; -import org.apache.lucene.document.Fieldable; +import org.apache.lucene.document.Field; import org.apache.lucene.index.Term; import org.elasticsearch.ElasticSearchException; import org.elasticsearch.action.ActionListener; @@ -263,7 +263,7 @@ public class TransportMoreLikeThisAction extends TransportAction