修改为东南天坐标系

This commit is contained in:
2026-01-20 09:49:52 +08:00
parent 9538757047
commit 333fad40ac
7201 changed files with 1030888 additions and 85410 deletions

View File

@@ -6,6 +6,7 @@ from chromadb.api.types import (
Embedding,
PyEmbedding,
Include,
IndexingStatus,
Metadata,
Document,
Image,
@@ -15,6 +16,7 @@ from chromadb.api.types import (
QueryResult,
ID,
OneOrMany,
ReadLevel,
WhereDocument,
SearchResult,
maybe_cast_one_to_many,
@@ -96,6 +98,22 @@ class AsyncCollection(CollectionCommon["AsyncServerAPI"]):
database=self.database,
)
async def get_indexing_status(self) -> IndexingStatus:
"""Get the indexing status of this collection.
Returns:
IndexingStatus: An object containing:
- num_indexed_ops: Number of user operations that have been indexed
- num_unindexed_ops: Number of user operations pending indexing
- total_ops: Total number of user operations in collection
- op_indexing_progress: Proportion of user operations that have been indexed as a float between 0 and 1
"""
return await self._client._get_indexing_status(
collection_id=self.id,
tenant=self.tenant,
database=self.database,
)
async def get(
self,
ids: Optional[OneOrMany[ID]] = None,
@@ -294,6 +312,7 @@ class AsyncCollection(CollectionCommon["AsyncServerAPI"]):
async def search(
self,
searches: OneOrMany[Search],
read_level: ReadLevel = ReadLevel.INDEX_AND_WAL,
) -> SearchResult:
"""Perform hybrid search on the collection.
This is an experimental API that only works for Hosted Chroma for now.
@@ -304,6 +323,11 @@ class AsyncCollection(CollectionCommon["AsyncServerAPI"]):
- rank: Ranking expression for hybrid search (defaults to Val(0.0))
- limit: Limit configuration for pagination (defaults to no limit)
- select: Select configuration for keys to return (defaults to empty)
read_level: Controls whether to read from the write-ahead log (WAL):
- ReadLevel.INDEX_AND_WAL: Read from both the compacted index and WAL (default).
All committed writes will be visible.
- ReadLevel.INDEX_ONLY: Read only from the compacted index, skipping the WAL.
Faster, but recent writes that haven't been compacted may not be visible.
Returns:
SearchResult: Column-major format response with:
@@ -351,6 +375,10 @@ class AsyncCollection(CollectionCommon["AsyncServerAPI"]):
Search().where(K("type") == "paper").rank(Knn(query=[0.3, 0.4]))
]
results = await collection.search(searches)
# Skip WAL for faster queries (may miss recent uncommitted writes)
from chromadb.api.types import ReadLevel
result = await collection.search(search, read_level=ReadLevel.INDEX_ONLY)
"""
# Convert single search to list for consistent handling
searches_list = maybe_cast_one_to_many(searches)
@@ -367,6 +395,7 @@ class AsyncCollection(CollectionCommon["AsyncServerAPI"]):
searches=cast(List[Search], embedded_searches),
tenant=self.tenant,
database=self.database,
read_level=read_level,
)
async def update(

View File

@@ -7,6 +7,7 @@ from chromadb.api.types import (
Embedding,
PyEmbedding,
Include,
IndexingStatus,
Metadata,
Document,
Image,
@@ -16,6 +17,7 @@ from chromadb.api.types import (
QueryResult,
ID,
OneOrMany,
ReadLevel,
WhereDocument,
SearchResult,
maybe_cast_one_to_many,
@@ -50,6 +52,22 @@ class Collection(CollectionCommon["ServerAPI"]):
database=self.database,
)
def get_indexing_status(self) -> IndexingStatus:
"""Get the indexing status of this collection.
Returns:
IndexingStatus: An object containing:
- num_indexed_ops: Number of user operations that have been indexed
- num_unindexed_ops: Number of user operations pending indexing
- total_ops: Total number of user operations in collection
- op_indexing_progress: Proportion of user operations that have been indexed as a float between 0 and 1
"""
return self._client._get_indexing_status(
collection_id=self.id,
tenant=self.tenant,
database=self.database,
)
def add(
self,
ids: OneOrMany[ID],
@@ -303,6 +321,7 @@ class Collection(CollectionCommon["ServerAPI"]):
def search(
self,
searches: OneOrMany[Search],
read_level: ReadLevel = ReadLevel.INDEX_AND_WAL,
) -> SearchResult:
"""Perform hybrid search on the collection.
This is an experimental API that only works for Hosted Chroma for now.
@@ -313,6 +332,11 @@ class Collection(CollectionCommon["ServerAPI"]):
- rank: Ranking expression for hybrid search (defaults to Val(0.0))
- limit: Limit configuration for pagination (defaults to no limit)
- select: Select configuration for keys to return (defaults to empty)
read_level: Controls whether to read from the write-ahead log (WAL):
- ReadLevel.INDEX_AND_WAL: Read from both the compacted index and WAL (default).
All committed writes will be visible.
- ReadLevel.INDEX_ONLY: Read only from the compacted index, skipping the WAL.
Faster, but recent writes that haven't been compacted may not be visible.
Returns:
SearchResult: Column-major format response with:
@@ -360,6 +384,10 @@ class Collection(CollectionCommon["ServerAPI"]):
Search().where(K("type") == "paper").rank(Knn(query=[0.3, 0.4]))
]
results = collection.search(searches)
# Skip WAL for faster queries (may miss recent uncommitted writes)
from chromadb.api.types import ReadLevel
result = collection.search(search, read_level=ReadLevel.INDEX_ONLY)
"""
# Convert single search to list for consistent handling
searches_list = maybe_cast_one_to_many(searches)
@@ -376,6 +404,7 @@ class Collection(CollectionCommon["ServerAPI"]):
searches=cast(List[Search], embedded_searches),
tenant=self.tenant,
database=self.database,
read_level=read_level,
)
def update(