You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ds...@apache.org on 2023/05/17 21:21:13 UTC

[lucene] branch hnswDimLimitConfigurable created (now 8456a5b58f8)

This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a change to branch hnswDimLimitConfigurable
in repository https://gitbox.apache.org/repos/asf/lucene.git


      at 8456a5b58f8 Make MAX_DIMENSIONS configurable via a system property. Deprecate FloatVectorValues.MAX_DIMENSIONS because we anticipate a better home.

This branch includes the following new commits:

     new 8456a5b58f8 Make MAX_DIMENSIONS configurable via a system property. Deprecate FloatVectorValues.MAX_DIMENSIONS because we anticipate a better home.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[lucene] 01/01: Make MAX_DIMENSIONS configurable via a system property. Deprecate FloatVectorValues.MAX_DIMENSIONS because we anticipate a better home.

Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch hnswDimLimitConfigurable
in repository https://gitbox.apache.org/repos/asf/lucene.git

commit 8456a5b58f8b0a2b128cabd0ff5f81e7897dc845
Author: David Smiley <ds...@salesforce.com>
AuthorDate: Wed May 17 17:14:36 2023 -0400

    Make MAX_DIMENSIONS configurable via a system property.
    Deprecate FloatVectorValues.MAX_DIMENSIONS because we anticipate a better home.
---
 .../src/java/org/apache/lucene/index/FloatVectorValues.java    | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lucene/core/src/java/org/apache/lucene/index/FloatVectorValues.java b/lucene/core/src/java/org/apache/lucene/index/FloatVectorValues.java
index 9de6b57531e..a7103035deb 100644
--- a/lucene/core/src/java/org/apache/lucene/index/FloatVectorValues.java
+++ b/lucene/core/src/java/org/apache/lucene/index/FloatVectorValues.java
@@ -28,8 +28,14 @@ import org.apache.lucene.search.DocIdSetIterator;
  */
 public abstract class FloatVectorValues extends DocIdSetIterator {
 
-  /** The maximum length of a vector */
-  public static final int MAX_DIMENSIONS = 1024;
+  /**
+   * The maximum length of a vector. Can be overridden via a system property
+   * "lucene.hnsw.maxDimensions".
+   *
+   * @deprecated Expected to move to a codec specific limit.
+   */
+  @Deprecated
+  public static final int MAX_DIMENSIONS = Integer.getInteger("lucene.hnsw.maxDimensions", 1024);
 
   /** Sole constructor */
   protected FloatVectorValues() {}