aboutsummaryrefslogtreecommitdiffstats
path: root/container-search
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@yahoo-inc.com>2017-12-19 23:02:04 +0100
committerJon Bratseth <bratseth@yahoo-inc.com>2017-12-19 23:02:04 +0100
commit35d59981840614bf4b877714ee88e273816c46d2 (patch)
treefba37b2e8bc9fcee46821821ab2886d371fcd696 /container-search
parent067eb48b7d2fc062a74392b1c16f5538b5031d5b (diff)
Use longs for dimensions lengths in all API's
This is to be able to support tensor dimensions with more than 2B elements in the future without API change.
Diffstat (limited to 'container-search')
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/searcher/ValidateSortingSearcher.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/container-search/src/main/java/com/yahoo/prelude/searcher/ValidateSortingSearcher.java b/container-search/src/main/java/com/yahoo/prelude/searcher/ValidateSortingSearcher.java
index 15a8a670a2e..8091397237d 100644
--- a/container-search/src/main/java/com/yahoo/prelude/searcher/ValidateSortingSearcher.java
+++ b/container-search/src/main/java/com/yahoo/prelude/searcher/ValidateSortingSearcher.java
@@ -25,7 +25,7 @@ import static com.yahoo.prelude.querytransform.NormalizingSearcher.ACCENT_REMOVA
* Check sorting specification makes sense to the search cluster before
* passing it on to the backend.
*
- * @author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
+ * @author Steinar Knutsen
*/
@Before(PhaseNames.BACKEND)
@After(ACCENT_REMOVAL)
@@ -118,6 +118,7 @@ public class ValidateSortingSearcher extends Searcher {
for (Sorting.FieldOrder f : l) {
String name = f.getFieldName();
if ("[rank]".equals(name) || "[docid]".equals(name)) {
+ // built-in constants - ok
} else if (names.containsKey(name)) {
AttributesConfig.Attribute attrConfig = names.get(name);
if (attrConfig != null) {
@@ -166,18 +167,13 @@ public class ValidateSortingSearcher extends Searcher {
locale = "en_US";
}
- // getLogger().info("locale = " + locale + " attrConfig.sortlocale.value() = " + attrConfig.sortlocale.value() + " query.getLanguage() = " + query.getModel().getLanguage());
- // getLogger().info("locale = " + locale);
-
Sorting.UcaSorter.Strength strength = sorter.getStrength();
if (sorter.getStrength() == Sorting.UcaSorter.Strength.UNDEFINED) {
strength = config2Strength(attrConfig.sortstrength());
}
if ((sorter.getStrength() == Sorting.UcaSorter.Strength.UNDEFINED) || (sorter.getLocale() == null) || sorter.getLocale().isEmpty()) {
- // getLogger().info("locale = " + locale + " strength = " + strength.toString());
sorter.setLocale(locale, strength);
}
- //getLogger().info("locale = " + locale + " strength = " + strength.toString() + "decompose = " + sorter.getDecomposition());
}
} else {
return ErrorMessage.createInvalidQueryParameter("The cluster " + getClusterName() + " has attribute config for field: " + name);