reta commented on code in PR #12308:
URL: https://github.com/apache/lucene/pull/12308#discussion_r1198196299


##########
lucene/core/src/java/org/apache/lucene/search/Query.java:
##########
@@ -50,8 +52,30 @@ public abstract class Query {
       new VirtualMethod<>(Query.class, "rewrite", IndexReader.class);
   private static final VirtualMethod<Query> newMethod =
       new VirtualMethod<>(Query.class, "rewrite", IndexSearcher.class);
-  private final boolean isDeprecatedRewriteMethodOverridden =
-      VirtualMethod.compareImplementationDistance(this.getClass(), oldMethod, 
newMethod) > 0;
+  private final boolean isDeprecatedRewriteMethodOverridden;
+
+  /** Constructor for query classes. */
+  public Query() {
+    var clazz = this.getClass();
+    if (clazz.getName().startsWith("org.apache.lucene.")) {

Review Comment:
   Just to note here, both OpenSearch [1] and Elasticsearch [2] host own 
classes under `org.apache.lucene.` package as well:
   
   [1] 
https://github.com/opensearch-project/OpenSearch/tree/main/server/src/main/java/org/apache/lucene
   [2] 
https://github.com/elastic/elasticsearch/tree/7.17/server/src/main/java/org/apache/lucene



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to