// We are going to put the fields to be indexed into a multimap. This allows us to iterate
// over the entire set once.
Multimap<String,String> indexFields = HashMultimap.create();
// Add the normalized field values
LcNoDiacriticsNormalizer normalizer = new LcNoDiacriticsNormalizer();
for (Entry<String,String> index : article.getNormalizedFieldValues().entrySet())
indexFields.put(index.getKey(), index.getValue());
// Add the tokens
for (String token : tokens)
indexFields.put(TOKENS_FIELD_NAME, normalizer.normalizeFieldValue("", token));
for (Entry<String,String> index : indexFields.entries()) {
// Create mutations for the in partition index
// Row is partition id, colf is 'fi'\0fieldName, colq is fieldValue\0language\0article id
m.put(indexPrefix + index.getKey(), index.getValue() + NULL_BYTE + colfPrefix + article.getId(), cv, article.getTimestamp(), NULL_VALUE);