@@ -20,58 +20,58 @@ package config
2020// Faiss represent the faiss core configuration for server.
2121type Faiss struct {
2222 // IndexPath represents the faiss index file path
23- IndexPath string `yaml :"index_path" json :"index_path,omitempty "`
23+ IndexPath string `json :"index_path,omitempty" yaml :"index_path"`
2424
2525 // Dimension represents the faiss index dimension
26- Dimension int `yaml :"dimension" json:"dimension,omitempty" info :"dimension"`
26+ Dimension int `info :"dimension" json:"dimension,omitempty" yaml :"dimension"`
2727
2828 // Nlist represents the number of Voronoi cells
2929 // ref: https://github.com/facebookresearch/faiss/wiki/Faster-search
30- Nlist int `yaml :"nlist" json:"nlist,omitempty" info :"nlist"`
30+ Nlist int `info :"nlist" json:"nlist,omitempty" yaml :"nlist"`
3131
3232 // M represents the number of subquantizers
3333 // ref: https://github.com/facebookresearch/faiss/wiki/Faiss-indexes-(composite)#cell-probe-method-with-a-pq-index-as-coarse-quantizer
34- M int `yaml :"m" json:"m,omitempty" info :"m"`
34+ M int `info :"m" json:"m,omitempty" yaml :"m"`
3535
3636 // NbitsPerIdx represents the number of bit per subvector index
3737 // ref: https://github.com/facebookresearch/faiss/wiki/FAQ#can-i-ignore-warning-clustering-xxx-points-to-yyy-centroids
38- NbitsPerIdx int `yaml :"nbits_per_idx" json:"nbits_per_idx,omitempty" info :"nbits_per_idx"`
38+ NbitsPerIdx int `info :"nbits_per_idx" json:"nbits_per_idx,omitempty" yaml :"nbits_per_idx"`
3939
4040 // MetricType represents the metric type
41- MetricType string `yaml :"metric_type" json:"metric_type,omitempty" info :"metric_type"`
41+ MetricType string `info :"metric_type" json:"metric_type,omitempty" yaml :"metric_type"`
4242
4343 // EnableInMemoryMode enables on memory faiss indexing mode
44- EnableInMemoryMode bool `yaml :"enable_in_memory_mode" json :"enable_in_memory_mode,omitempty "`
44+ EnableInMemoryMode bool `json :"enable_in_memory_mode,omitempty" yaml :"enable_in_memory_mode"`
4545
4646 // AutoIndexCheckDuration represents checking loop duration about auto indexing execution
47- AutoIndexCheckDuration string `yaml :"auto_index_check_duration" json :"auto_index_check_duration,omitempty "`
47+ AutoIndexCheckDuration string `json :"auto_index_check_duration,omitempty" yaml :"auto_index_check_duration"`
4848
4949 // AutoSaveIndexDuration represents checking loop duration about auto save index execution
50- AutoSaveIndexDuration string `yaml :"auto_save_index_duration" json :"auto_save_index_duration,omitempty "`
50+ AutoSaveIndexDuration string `json :"auto_save_index_duration,omitempty" yaml :"auto_save_index_duration"`
5151
5252 // AutoIndexDurationLimit represents auto indexing duration limit
53- AutoIndexDurationLimit string `yaml :"auto_index_duration_limit" json :"auto_index_duration_limit,omitempty "`
53+ AutoIndexDurationLimit string `json :"auto_index_duration_limit,omitempty" yaml :"auto_index_duration_limit"`
5454
5555 // AutoIndexLength represents auto index length limit
56- AutoIndexLength int `yaml :"auto_index_length" json :"auto_index_length,omitempty "`
56+ AutoIndexLength int `json :"auto_index_length,omitempty" yaml :"auto_index_length"`
5757
5858 // InitialDelayMaxDuration represents maximum duration for initial delay
59- InitialDelayMaxDuration string `yaml :"initial_delay_max_duration" json :"initial_delay_max_duration,omitempty "`
59+ InitialDelayMaxDuration string `json :"initial_delay_max_duration,omitempty" yaml :"initial_delay_max_duration"`
6060
6161 // MinLoadIndexTimeout represents minimum duration of load index timeout
62- MinLoadIndexTimeout string `yaml :"min_load_index_timeout" json :"min_load_index_timeout,omitempty "`
62+ MinLoadIndexTimeout string `json :"min_load_index_timeout,omitempty" yaml :"min_load_index_timeout"`
6363
6464 // MaxLoadIndexTimeout represents maximum duration of load index timeout
65- MaxLoadIndexTimeout string `yaml :"max_load_index_timeout" json :"max_load_index_timeout,omitempty "`
65+ MaxLoadIndexTimeout string `json :"max_load_index_timeout,omitempty" yaml :"max_load_index_timeout"`
6666
6767 // LoadIndexTimeoutFactor represents a factor of load index timeout
68- LoadIndexTimeoutFactor string `yaml :"load_index_timeout_factor" json :"load_index_timeout_factor,omitempty "`
68+ LoadIndexTimeoutFactor string `json :"load_index_timeout_factor,omitempty" yaml :"load_index_timeout_factor"`
6969
7070 // EnableProactiveGC enables more proactive GC call for reducing heap memory allocation
71- EnableProactiveGC bool `yaml :"enable_proactive_gc" json :"enable_proactive_gc,omitempty "`
71+ EnableProactiveGC bool `json :"enable_proactive_gc,omitempty" yaml :"enable_proactive_gc"`
7272
7373 // EnableCopyOnWrite enables copy on write saving
74- EnableCopyOnWrite bool `yaml :"enable_copy_on_write" json :"enable_copy_on_write,omitempty "`
74+ EnableCopyOnWrite bool `json :"enable_copy_on_write,omitempty" yaml :"enable_copy_on_write"`
7575
7676 // VQueue represents the faiss vector queue buffer size
7777 VQueue * VQueue `json:"vqueue,omitempty" yaml:"vqueue"`
0 commit comments