Skip to content

Commit

Permalink
Put mapping on a single node with new mapping will not wait for the m…
Browse files Browse the repository at this point in the history
…apping to be applied, closes #1355.
  • Loading branch information
kimchy committed Sep 22, 2011
1 parent f74fa75 commit 7ab128b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ public void putMapping(final PutRequest request, final Listener listener) {
} else {
CompressedString newSource = newMapper.mappingSource();
mappings.put(index, new MappingMetaData(newMapper));
// we also add it to the registered parsed mapping, since that's what we do when we merge
// and, we won't wait for it to be created on this master node
IndexService indexService = indicesService.indexService(index);
indexService.mapperService().add(newMapper.type(), newMapper.mappingSource().string());
if (logger.isDebugEnabled()) {
logger.debug("[{}] create_mapping [{}] with source [{}]", index, newMapper.type(), newSource);
} else if (logger.isInfoEnabled()) {
Expand Down

0 comments on commit 7ab128b

Please sign in to comment.