Comment

Comment by dangoodmanUT

There are three kinds of queries supported for keywords:

- field

- term

- term in field

Each file, and each row group within the file, has 3 bloom filters to handle these queries.

So something like:

{"user": {"name": "John", "tags": [{"type": "user"}, {"role": "admin"}]}}

Gets turned into queryable pairs of:

[{Path: "user.name", Values: ["John"]}, {Path: "user.tags.type", Values: ["user"]}, {Path: "user.tags.role", Values: ["admin"]}]

Then you can search for:

- any record that has "john" in it

- any record that has the "user.tags.type" key

- any record that has "user.tags.type"="user" and "user.tags.role"="admin"

Which bloom filters are used depends on how you build the query, but they test for whether a row matching the condition(s) is in the file/row group

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton