typesense / typesense/typesense

Allow filtering based on size of arrays

Open
#2,346 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement feature:filtering
Dominant language
C++
Stars
26.6k
Forks
973
Avg merge
18h 45m
Merged PRs (30d)
4

Description

Hey guys,

We have the situation where some of the TS collections synced from the source DB Firestore have sub collections. The sub collections of course don't come across, but are sometimes needed to be considered in the queries that we perform.

Currently we have some arrays in the root level collection in Firebase/Firestore that store IDs for docs in the sub collections so they can be referenced, such as items[]. These arrays are at least already being written to, so if we could filter on the array length or items in the array with something like filter_by: count(items) >= 0 or the like, would be great.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the filter_by entry point and how array-valued fields are handled; the issue names no files or tests. Done means defining and validating filtering by array length or array contents, including the requested comparison and membership cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.