Skip to content

feat: use DocsFilter#372

Open
forshev wants to merge 2 commits into290-docs-filter-read-pathfrom
290-use-docs-filter
Open

feat: use DocsFilter#372
forshev wants to merge 2 commits into290-docs-filter-read-pathfrom
290-use-docs-filter

Conversation

@forshev
Copy link
Copy Markdown
Collaborator

@forshev forshev commented Mar 5, 2026

Description

Use DocsFilter struct in search and fetch

Fixes #290


  • I have read and followed all requirements in CONTRIBUTING.md;
  • I used LLM/AI assistance to make this pull request;

If you have used LLM/AI assistance please provide model name and full prompt:

Model: {{model-name}}
Prompt: {{prompt}}

@forshev forshev force-pushed the 290-use-docs-filter branch from 14e5d7f to 9eadbb5 Compare March 6, 2026 10:51
@forshev forshev changed the base branch from 290-docs-filter to 290-docs-filter-read-path March 6, 2026 10:52
@eguguchkin eguguchkin added docs_filter feature New feature or request labels Mar 13, 2026
@eguguchkin eguguchkin requested review from cheb0 and dkharms March 16, 2026 10:58
@eguguchkin eguguchkin added this to the v0.71.0 milestone Mar 16, 2026
@forshev forshev force-pushed the 290-docs-filter-read-path branch from 5cb9698 to 7f1ecc3 Compare March 20, 2026 14:21
@forshev forshev force-pushed the 290-use-docs-filter branch from 9eadbb5 to bfad0e9 Compare March 20, 2026 14:59
@forshev forshev force-pushed the 290-use-docs-filter branch from 6651e64 to 6001327 Compare March 23, 2026 11:36
@cheb0
Copy link
Copy Markdown
Collaborator

cheb0 commented Mar 31, 2026

@seqbenchbot up main search-keyword-exact-match-warm

@seqbenchbot
Copy link
Copy Markdown
Collaborator

seqbenchbot commented Mar 31, 2026

Oh-oh, @cheb0 ('>o.o)'>!

Something went wrong and I couldn't process your request.
Please take a closer look at error message:

cannot run several comparison benchmarks concurrently

return node.BuildORTree(lidsTids), nil
}

func evalTombstones(root, tombstonesIterator node.Node, stats *searchStats) node.Node {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, we always wrap a tree into nAnd node with (most of time) empty tombestone iterator. I decided to check if there is a noticeable perf overhead.

For relatively dense histogram (service:X and level:Y) fired against 3 stg fracs It went from 44-46 ms to 46-50 ms (hot case). I used testDocsFilter from fraction_test

"github.com/ozontech/seq-db/util"
)

type DocsFilter interface {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit (naming): doesn't look like a guy can filter docs. Since, it's able to get tombestone iterator and delete tombstones for a provided frac, It looks like a tombstone storage/provider to me.

"github.com/ozontech/seq-db/tokenizer"
)

type testDocsFilter struct{}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: technically it's possible to test deletion in this test. We could just modify testDocsFilter by allowing it to have deleted lids preconfigured and then add this filter as a field of FractionTestSuite. In a test it's possible to just preconfigure some lids deleted (let's say first 3), then bulk insert and if some docs are missing. Maybe I'll add it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs_filter feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants