Skip to main content

mito2/sst/index/
fulltext_index.rs

1// Copyright 2023 Greptime Team
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15pub(crate) mod applier;
16pub(crate) mod creator;
17
18pub(crate) const INDEX_BLOB_TYPE_TANTIVY: &str = "greptime-fulltext-index-v1";
19/// Bloom blobs tokenized by `ScriptTokenizer`. A new key instead of a config field so that
20/// older versions, which would probe these tokens with their own rules and drop rows,
21/// don't find the blob and scan without pruning.
22pub(crate) const INDEX_BLOB_TYPE_BLOOM: &str = "greptime-fulltext-index-bloom-v2";
23/// Version of the bloom blobs stored under [`INDEX_BLOB_TYPE_BLOOM`], recorded in the
24/// manifest so that `ADMIN BUILD_INDEX` can find SSTs with older blobs.
25pub(crate) const FULLTEXT_BLOOM_VERSION: u8 = 2;
26/// Bloom blobs from older versions. Their tokens don't follow `matches_term` boundaries,
27/// so queries never probe them; they are kept only for index metadata listing.
28pub(crate) const INDEX_BLOB_TYPE_BLOOM_V1: &str = "greptime-fulltext-index-bloom";