summaryrefslogtreecommitdiffstats
path: root/container-search/src/main
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2020-04-14 08:30:39 +0200
committerJon Bratseth <bratseth@gmail.com>2020-04-14 08:30:39 +0200
commit3a6f4ba76bca8c8dddd4df16972f1a3ede097a23 (patch)
tree5dcb0a992b700a55a99f3abaa516035796ae3039 /container-search/src/main
parente40c993de0b870a2aec7fff91a64ac229b36fd0b (diff)
Compute string on the fly
Diffstat (limited to 'container-search/src/main')
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/properties/PropertyAliases.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/query/properties/PropertyAliases.java b/container-search/src/main/java/com/yahoo/search/query/properties/PropertyAliases.java
index a4a82d27f8e..83e8dd530ad 100644
--- a/container-search/src/main/java/com/yahoo/search/query/properties/PropertyAliases.java
+++ b/container-search/src/main/java/com/yahoo/search/query/properties/PropertyAliases.java
@@ -37,6 +37,8 @@ public class PropertyAliases extends Properties {
* @return the real name if an alias or the input name itself
*/
protected CompoundName unalias(CompoundName nameOrAlias) {
+ if (aliases.isEmpty()) return nameOrAlias;
+ if (nameOrAlias.size() > 1) return nameOrAlias; // aliases are simple names
CompoundName properName = aliases.get(nameOrAlias.getLowerCasedName());
return (properName != null) ? properName : nameOrAlias;
}