diff options
5 files changed, 21 insertions, 19 deletions
diff --git a/config-application-package/src/main/java/com/yahoo/config/model/application/provider/SchemaValidator.java b/config-application-package/src/main/java/com/yahoo/config/model/application/provider/SchemaValidator.java index 3decb189f52..1b577e2a203 100644 --- a/config-application-package/src/main/java/com/yahoo/config/model/application/provider/SchemaValidator.java +++ b/config-application-package/src/main/java/com/yahoo/config/model/application/provider/SchemaValidator.java @@ -64,22 +64,6 @@ public class SchemaValidator { validate(reader, reader.getName()); } - @Deprecated - /* @deprecated Will not give proper context from errors, use another validate method instead */ - public void validate(InputSource inputSource, String fileName) throws IOException { - errorHandler.fileName = (fileName == null ? "input" : fileName); - errorHandler.reader = inputSource.getCharacterStream(); - try { - if ( ! driver.validate(inputSource)) { - // Shouldn't happen, error handler should have thrown - throw new RuntimeException("Aborting due to earlier XML errors."); - } - } catch (SAXException e) { - // Shouldn't happen, error handler should have thrown - throw new IllegalArgumentException("XML error in " + errorHandler.fileName + ": " + Exceptions.toMessageString(e)); - } - } - private void validate(Reader reader, String fileName) throws IOException { errorHandler.fileName = (fileName == null ? "input" : fileName); // We need to read from a reader in error handler, so need to read all content into a new one diff --git a/container-search/abi-spec.json b/container-search/abi-spec.json index b4ac714b9d2..d4aadb11ba0 100644 --- a/container-search/abi-spec.json +++ b/container-search/abi-spec.json @@ -5363,6 +5363,7 @@ "public void addItem(com.yahoo.prelude.query.Item)", "public void addItem(int, com.yahoo.prelude.query.Item)", "public boolean isEmpty()", + "public com.yahoo.prelude.query.Item withRank(com.yahoo.prelude.query.Item)", "public com.yahoo.prelude.query.Item and(com.yahoo.prelude.query.Item)", "public static java.util.List getPositiveTerms(com.yahoo.prelude.query.Item)", "public int treeSize()", diff --git a/container-search/src/main/java/com/yahoo/search/query/QueryTree.java b/container-search/src/main/java/com/yahoo/search/query/QueryTree.java index 0655727b46b..6326097d9bd 100644 --- a/container-search/src/main/java/com/yahoo/search/query/QueryTree.java +++ b/container-search/src/main/java/com/yahoo/search/query/QueryTree.java @@ -110,6 +110,19 @@ public class QueryTree extends CompositeItem { // -------------- Facade /** + * Modifies this query to become the current query RANK with the given item. + * + * @return the resulting root item in this + */ + public Item withRank(Item item) { + var result = new RankItem(); + result.addItem(getRoot()); + result.addItem(item); + setRoot(result); + return result; + } + + /** * Modifies this query to become the current query AND the given item. * * @return the resulting root item in this diff --git a/container-search/src/main/java/com/yahoo/search/querytransform/DefaultPositionSearcher.java b/container-search/src/main/java/com/yahoo/search/querytransform/DefaultPositionSearcher.java index d3b166e03d0..0523ca1a7b6 100644 --- a/container-search/src/main/java/com/yahoo/search/querytransform/DefaultPositionSearcher.java +++ b/container-search/src/main/java/com/yahoo/search/querytransform/DefaultPositionSearcher.java @@ -56,7 +56,11 @@ public class DefaultPositionSearcher extends Searcher { } if (useV8GeoPositions && (location != null) && (location.getAttribute() != null)) { var geoLoc = new GeoLocationItem(location); - query.getModel().getQueryTree().and(geoLoc); + if (location.isGeoCircle() && location.degRadius() < 0) { + query.getModel().getQueryTree().withRank(geoLoc); + } else { + query.getModel().getQueryTree().and(geoLoc); + } location = null; query.getRanking().setLocation(location); } diff --git a/flags/src/main/java/com/yahoo/vespa/flags/Flags.java b/flags/src/main/java/com/yahoo/vespa/flags/Flags.java index f84060063d7..cc6d20153d6 100644 --- a/flags/src/main/java/com/yahoo/vespa/flags/Flags.java +++ b/flags/src/main/java/com/yahoo/vespa/flags/Flags.java @@ -166,7 +166,7 @@ public class Flags { public static final UnboundListFlag<String> ALLOWED_ATHENZ_PROXY_IDENTITIES = defineListFlag( "allowed-athenz-proxy-identities", List.of(), String.class, - List.of("bjorncs", "tokle"), "2021-02-10", "2022-06-01", + List.of("bjorncs", "tokle"), "2021-02-10", "2022-09-01", "Allowed Athenz proxy identities", "takes effect at redeployment"); @@ -411,7 +411,7 @@ public class Flags { public static final UnboundBooleanFlag USE_YUM_PROXY_V2 = defineFeatureFlag( "use-yumproxy-v2", false, - List.of("mortent"), "2022-05-05", "2022-06-01", + List.of("tokle"), "2022-05-05", "2022-07-01", "Use yumproxy-v2", "Takes effect on host admin restart", HOSTNAME); |