mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-06 11:28:31 +02:00
Replace memmap_threshold with indexing_threshold (#2041)
* Replace memmap_threshold with indexing_threshold * Update GitHub Stars * Update GitHub Stars * Update GitHub Stars --------- Co-authored-by: myyrakle <16988115+myyrakle@users.noreply.github.com>
This commit is contained in:
+1
-1
@@ -26,7 +26,7 @@ public class Snippet {
|
||||
.build())
|
||||
.build())
|
||||
.setOptimizersConfig(
|
||||
OptimizersConfigDiff.newBuilder().setMemmapThreshold(20000).build())
|
||||
OptimizersConfigDiff.newBuilder().setIndexingThreshold(20000).build())
|
||||
.build())
|
||||
.get();
|
||||
}
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Creates a collection with vectors stored in memmap storage and specifies an optimizer configuration with a `memmap_threshold` set to 20000. This configuration is particularly useful for Qdrant instances with fast disks and large collections. The `memmap_threshold` option determines the threshold after which a segment will be converted to memmap storage. It can be set globally in the configuration file or for each collection individually during creation or update.
|
||||
Creates a collection with vectors stored in memmap storage and specifies an optimizer configuration with a `indexing_threshold` set to 20000. This configuration is particularly useful for Qdrant instances with fast disks and large collections. The `indexing_threshold` option determines the threshold after which a segment will be converted to memmap storage. It can be set globally in the configuration file or for each collection individually during creation or update.
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ public class Snippet
|
||||
await client.CreateCollectionAsync(
|
||||
collectionName: "{collection_name}",
|
||||
vectorsConfig: new VectorParams { Size = 768, Distance = Distance.Cosine },
|
||||
optimizersConfig: new OptimizersConfigDiff { MemmapThreshold = 20000 }
|
||||
optimizersConfig: new OptimizersConfigDiff { IndexingThreshold = 20000 }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,6 +7,6 @@ var client = new QdrantClient("localhost", 6334);
|
||||
await client.CreateCollectionAsync(
|
||||
collectionName: "{collection_name}",
|
||||
vectorsConfig: new VectorParams { Size = 768, Distance = Distance.Cosine },
|
||||
optimizersConfig: new OptimizersConfigDiff { MemmapThreshold = 20000 }
|
||||
optimizersConfig: new OptimizersConfigDiff { IndexingThreshold = 20000 }
|
||||
);
|
||||
```
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ client.CreateCollection(context.Background(), &qdrant.CreateCollection{
|
||||
Distance: qdrant.Distance_Cosine,
|
||||
}),
|
||||
OptimizersConfig: &qdrant.OptimizersConfigDiff{
|
||||
MaxSegmentSize: qdrant.PtrOf(uint64(20000)),
|
||||
IndexingThreshold: qdrant.PtrOf(uint64(20000)),
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ client
|
||||
.build())
|
||||
.build())
|
||||
.setOptimizersConfig(
|
||||
OptimizersConfigDiff.newBuilder().setMemmapThreshold(20000).build())
|
||||
OptimizersConfigDiff.newBuilder().setIndexingThreshold(20000).build())
|
||||
.build())
|
||||
.get();
|
||||
```
|
||||
|
||||
+1
-1
@@ -6,6 +6,6 @@ client = QdrantClient(url="http://localhost:6333")
|
||||
client.create_collection(
|
||||
collection_name="{collection_name}",
|
||||
vectors_config=models.VectorParams(size=768, distance=models.Distance.COSINE),
|
||||
optimizers_config=models.OptimizersConfigDiff(memmap_threshold=20000),
|
||||
optimizers_config=models.OptimizersConfigDiff(indexing_threshold=20000),
|
||||
)
|
||||
```
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ client
|
||||
.create_collection(
|
||||
CreateCollectionBuilder::new("{collection_name}")
|
||||
.vectors_config(VectorParamsBuilder::new(768, Distance::Cosine))
|
||||
.optimizers_config(OptimizersConfigDiffBuilder::default().memmap_threshold(20000)),
|
||||
.optimizers_config(OptimizersConfigDiffBuilder::default().indexing_threshold(20000)),
|
||||
)
|
||||
.await?;
|
||||
```
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ client.createCollection("{collection_name}", {
|
||||
distance: "Cosine",
|
||||
},
|
||||
optimizers_config: {
|
||||
memmap_threshold: 20000,
|
||||
indexing_threshold: 20000,
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
+4
-2
@@ -12,7 +12,9 @@ func Main() {
|
||||
Port: 6334,
|
||||
})
|
||||
|
||||
if err != nil { panic(err) } // @hide
|
||||
if err != nil {
|
||||
panic(err)
|
||||
} // @hide
|
||||
|
||||
client.CreateCollection(context.Background(), &qdrant.CreateCollection{
|
||||
CollectionName: "{collection_name}",
|
||||
@@ -21,7 +23,7 @@ func Main() {
|
||||
Distance: qdrant.Distance_Cosine,
|
||||
}),
|
||||
OptimizersConfig: &qdrant.OptimizersConfigDiff{
|
||||
MaxSegmentSize: qdrant.PtrOf(uint64(20000)),
|
||||
IndexingThreshold: qdrant.PtrOf(uint64(20000)),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ PUT /collections/{collection_name}
|
||||
"distance": "Cosine"
|
||||
},
|
||||
"optimizers_config": {
|
||||
"memmap_threshold": 20000
|
||||
"indexing_threshold": 20000
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
+1
-1
@@ -5,5 +5,5 @@ client = QdrantClient(url="http://localhost:6333")
|
||||
client.create_collection(
|
||||
collection_name="{collection_name}",
|
||||
vectors_config=models.VectorParams(size=768, distance=models.Distance.COSINE),
|
||||
optimizers_config=models.OptimizersConfigDiff(memmap_threshold=20000),
|
||||
optimizers_config=models.OptimizersConfigDiff(indexing_threshold=20000),
|
||||
)
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ pub async fn main() -> anyhow::Result<()> {
|
||||
.create_collection(
|
||||
CreateCollectionBuilder::new("{collection_name}")
|
||||
.vectors_config(VectorParamsBuilder::new(768, Distance::Cosine))
|
||||
.optimizers_config(OptimizersConfigDiffBuilder::default().memmap_threshold(20000)),
|
||||
.optimizers_config(OptimizersConfigDiffBuilder::default().indexing_threshold(20000)),
|
||||
)
|
||||
.await?;
|
||||
|
||||
|
||||
+1
-1
@@ -8,6 +8,6 @@ client.createCollection("{collection_name}", {
|
||||
distance: "Cosine",
|
||||
},
|
||||
optimizers_config: {
|
||||
memmap_threshold: 20000,
|
||||
indexing_threshold: 20000,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user