Skip to content

Commit

Permalink
Now really fix eager fielddata loading.
Browse files Browse the repository at this point in the history
Relates to #5557
  • Loading branch information
martijnvg committed Mar 27, 2014
1 parent a517dce commit 8a1d399
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/main/java/org/elasticsearch/search/SearchService.java
Expand Up @@ -767,15 +767,22 @@ public TerminationHandle warm(final IndexShard indexShard, IndexMetaData indexMe
if (fieldDataType == null) {
continue;
}
final String indexName = fieldMapper.names().indexName();
if (fieldMapper instanceof ParentFieldMapper) {
ParentFieldMapper parentFieldMapper = (ParentFieldMapper) fieldMapper;
if (parentFieldMapper.active()) {
warmUp.put(indexName, parentFieldMapper);
if (!parentFieldMapper.active()) {
continue;
}
} else {
if (fieldDataType.getLoading() != Loading.EAGER) {
continue;
}
} else if (fieldDataType.getLoading() != Loading.EAGER && !warmUp.containsKey(indexName)) {
warmUp.put(indexName, fieldMapper);
}

final String indexName = fieldMapper.names().indexName();
if (warmUp.containsKey(indexName)) {
continue;
}
warmUp.put(indexName, fieldMapper);
}
}
final IndexFieldDataService indexFieldDataService = indexShard.indexFieldDataService();
Expand Down

0 comments on commit 8a1d399

Please sign in to comment.