@@ -46,6 +46,8 @@ record CmdLineArgs(
4646 int indexThreads ,
4747 boolean reindex ,
4848 boolean forceMerge ,
49+ float filterSelectivity ,
50+ long seed ,
4951 VectorSimilarityFunction vectorSpace ,
5052 int quantizeBits ,
5153 VectorEncoding vectorEncoding ,
@@ -75,6 +77,8 @@ record CmdLineArgs(
7577 static final ParseField VECTOR_ENCODING_FIELD = new ParseField ("vector_encoding" );
7678 static final ParseField DIMENSIONS_FIELD = new ParseField ("dimensions" );
7779 static final ParseField EARLY_TERMINATION_FIELD = new ParseField ("early_termination" );
80+ static final ParseField FILTER_SELECTIVITY_FIELD = new ParseField ("filter_selectivity" );
81+ static final ParseField SEED_FIELD = new ParseField ("seed" );
7882
7983 static CmdLineArgs fromXContent (XContentParser parser ) throws IOException {
8084 Builder builder = PARSER .apply (parser , null );
@@ -106,6 +110,8 @@ static CmdLineArgs fromXContent(XContentParser parser) throws IOException {
106110 PARSER .declareString (Builder ::setVectorEncoding , VECTOR_ENCODING_FIELD );
107111 PARSER .declareInt (Builder ::setDimensions , DIMENSIONS_FIELD );
108112 PARSER .declareBoolean (Builder ::setEarlyTermination , EARLY_TERMINATION_FIELD );
113+ PARSER .declareFloat (Builder ::setFilterSelectivity , FILTER_SELECTIVITY_FIELD );
114+ PARSER .declareLong (Builder ::setSeed , SEED_FIELD );
109115 }
110116
111117 @ Override
@@ -136,6 +142,9 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
136142 builder .field (QUANTIZE_BITS_FIELD .getPreferredName (), quantizeBits );
137143 builder .field (VECTOR_ENCODING_FIELD .getPreferredName (), vectorEncoding .name ().toLowerCase (Locale .ROOT ));
138144 builder .field (DIMENSIONS_FIELD .getPreferredName (), dimensions );
145+ builder .field (EARLY_TERMINATION_FIELD .getPreferredName (), earlyTermination );
146+ builder .field (FILTER_SELECTIVITY_FIELD .getPreferredName (), filterSelectivity );
147+ builder .field (SEED_FIELD .getPreferredName (), seed );
139148 return builder .endObject ();
140149 }
141150
@@ -167,6 +176,8 @@ static class Builder {
167176 private VectorEncoding vectorEncoding = VectorEncoding .FLOAT32 ;
168177 private int dimensions ;
169178 private boolean earlyTermination ;
179+ private float filterSelectivity = 1f ;
180+ private long seed = 1751900822751L ;
170181
171182 public Builder setDocVectors (String docVectors ) {
172183 this .docVectors = PathUtils .get (docVectors );
@@ -278,6 +289,16 @@ public Builder setEarlyTermination(Boolean patience) {
278289 return this ;
279290 }
280291
292+ public Builder setFilterSelectivity (float filterSelectivity ) {
293+ this .filterSelectivity = filterSelectivity ;
294+ return this ;
295+ }
296+
297+ public Builder setSeed (long seed ) {
298+ this .seed = seed ;
299+ return this ;
300+ }
301+
281302 public CmdLineArgs build () {
282303 if (docVectors == null ) {
283304 throw new IllegalArgumentException ("Document vectors path must be provided" );
@@ -305,6 +326,8 @@ public CmdLineArgs build() {
305326 indexThreads ,
306327 reindex ,
307328 forceMerge ,
329+ filterSelectivity ,
330+ seed ,
308331 vectorSpace ,
309332 quantizeBits ,
310333 vectorEncoding ,
0 commit comments