handle index names with > 2 dot-separated "words"
* this is necessary when searching in map of struct, where
the index will be "field.value.subfield" -> 3 "words".
@@ -160,8 +160,8 @@ abstract class StructuredParser extends AbstractParser {
firstWord.add(tokens.next());
}
- if (tokens.currentIsNoIgnore(DOT)) {
- tokens.skip();
+ while (tokens.currentIsNoIgnore(DOT)) {
+ secondWord.add(tokens.next());
if (tokens.currentIsNoIgnore(WORD) || tokens.currentIsNoIgnore(NUMBER)) {
secondWord.add(tokens.next());
} else {
@@ -177,11 +177,7 @@ abstract class StructuredParser extends AbstractParser {
if ( ! tokens.skipNoIgnore(COLON))
return null;
- if (secondWord.size() == 0) {
- item = concatenate(firstWord);
- } else {
- item = concatenate(firstWord) + "." + concatenate(secondWord);
- }
+ item = concatenate(firstWord) + concatenate(secondWord);
item = indexFacts.getCanonicName(item);
