Skip to content

Commit

Permalink
don't filter slice for distinct scans
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminpkane committed Dec 3, 2024
1 parent cea9b9a commit 04bc724
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fiftyone/server/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ async def _do_async_query(
):
if isinstance(query, DistinctQuery):
if query.has_list:
return await _do_distinct_query(collection, query, filter)
return await _do_distinct_query(collection, query)

return await _do_distinct_pipeline(dataset, collection, query, filter)

Expand All @@ -343,14 +343,13 @@ async def _do_async_query(
async def _do_distinct_query(
collection: AsyncIOMotorCollection,
query: DistinctQuery,
filter: t.Optional[t.Mapping[str, str]],
):
match = None
if query.search:
match = query.search

try:
result = await collection.distinct(query.path, filter)
result = await collection.distinct(query.path)
except:
# too many results
return None
Expand Down

0 comments on commit 04bc724

Please sign in to comment.