Merge pull request #12447 from javanna/enhancement/dont_cache_type_query

Query DSL: don't cache type filter in DocumentMapper
This commit is contained in:
Luca Cavanna 2015-07-24 18:50:34 +02:00
commit 56391c14a6
1 changed files with 1 additions and 4 deletions

View File

@ -168,8 +168,6 @@ public class DocumentMapper implements ToXContent {
private boolean hasNestedObjects = false;
private final Query typeFilter;
private final ReleasableLock mappingWriteLock;
private final ReentrantReadWriteLock mappingLock;
@ -190,7 +188,6 @@ public class DocumentMapper implements ToXContent {
meta);
this.documentParser = new DocumentParser(indexSettings, docMapperParser, this, new ReleasableLock(mappingLock.readLock()));
this.typeFilter = typeMapper().fieldType().termQuery(type, null);
this.mappingWriteLock = new ReleasableLock(mappingLock.writeLock());
this.mappingLock = mappingLock;
@ -307,7 +304,7 @@ public class DocumentMapper implements ToXContent {
}
public Query typeFilter() {
return this.typeFilter;
return typeMapper().fieldType().termQuery(type, null);
}
public boolean hasNestedObjects() {