Fixed small bug. Index name should be used to lookup entry.

This commit is contained in:
Martijn van Groningen 2013-01-23 23:53:20 +01:00
parent 4967a97faf
commit 50ac477d92
1 changed files with 2 additions and 2 deletions

View File

@ -113,10 +113,10 @@ public class IndexFieldDataService extends AbstractIndexComponent {
} }
public <IFD extends IndexFieldData> IFD getForField(FieldMapper.Names fieldNames, FieldDataType type) { public <IFD extends IndexFieldData> IFD getForField(FieldMapper.Names fieldNames, FieldDataType type) {
IndexFieldData fieldData = loadedFieldData.get(type.getType()); IndexFieldData fieldData = loadedFieldData.get(fieldNames.indexName());
if (fieldData == null) { if (fieldData == null) {
synchronized (loadedFieldData) { synchronized (loadedFieldData) {
fieldData = loadedFieldData.get(type.getType()); fieldData = loadedFieldData.get(fieldNames.indexName());
if (fieldData == null) { if (fieldData == null) {
IndexFieldData.Builder builder = null; IndexFieldData.Builder builder = null;
if (type.getFormat() != null) { if (type.getFormat() != null) {