@@ -236,37 +236,29 @@ def getName(self):
236236 if self .useCFS :
237237 name .append ("cfs" )
238238
239- # TODO: adding facets to filename makes it too long and runs into limits on some machines
240- # Can we remove this from file name and record it in a different logfile.
239+ # Print index configuration instead of adding to filename
240+ config_parts = []
241241 if self .facets is not None :
242- name .append ("facets" )
243- for arg in self .facets :
244- name .append (arg [0 ])
245- name .append (self .facetDVFormat )
246-
242+ config_parts .append (f"facets: { [arg [0 ] for arg in self .facets ]} (format: { self .facetDVFormat } )" )
247243 if self .bodyTermVectors :
248- name .append ("tv" )
249-
244+ config_parts .append ("bodyTermVectors: enabled" )
250245 if self .bodyStoredFields :
251- name .append ("stored" )
252-
246+ config_parts .append ("bodyStoredFields: enabled" )
253247 if self .bodyPostingsOffsets :
254- name .append ("offsets" )
255-
256- name .append (self .postingsFormat )
248+ config_parts .append ("bodyPostingsOffsets: enabled" )
249+ config_parts .append (f"postingsFormat: { self .postingsFormat } " )
257250 if self .postingsFormat != self .idFieldPostingsFormat :
258- name .append (self .idFieldPostingsFormat )
259-
251+ config_parts .append (f"idFieldPostingsFormat: { self .idFieldPostingsFormat } " )
260252 if self .addDVFields :
261- name .append ("dvfields" )
262-
253+ config_parts .append ("addDVFields: enabled" )
263254 if self .indexSort :
264- name .append ("sort=%s" % self .indexSort )
265-
255+ config_parts .append (f"indexSort: { self .indexSort } " )
266256 if self .vectorFile :
267- name .append ("vectors=%d" % self .vectorDimension )
257+ config_parts .append (f "vectors: dimension= { self .vectorDimension } " )
268258 if self .quantizeKNNGraph :
269- name .append ("int8-quantized" )
259+ config_parts .append ("quantizeKNNGraph: enabled" )
260+ config_parts .append (f"numDocs: { self .numDocs / 1000000.0 :.3f} M" )
261+ print (f"Index configuration for { '.' .join (name )} : { ', ' .join (config_parts )} " )
270262
271263 name .append ("nd%gM" % (self .numDocs / 1000000.0 ))
272264 return "." .join (name )
0 commit comments