English

Full-text and Keyword Indexes for String Searching

Data Structures and Algorithms 2015-08-27 v1

Abstract

In this work, we present a literature review for full-text and keyword indexes as well as our contributions (which are mostly practice-oriented). The first contribution is the FM-bloated index, which is a modification of the well-known FM-index (a compressed, full-text index) that trades space for speed. In our approach, the count table and the occurrence lists store information about selected qq-grams in addition to the individual characters. Two variants are described, namely one using O(nlog2n)O(n \log^2 n) bits of space with O(m+logmloglogn)O(m + \log m \log \log n) average query time, and one with linear space and O(mloglogn)O(m \log \log n) average query time, where nn is the input text length and mm is the pattern length. We experimentally show that a significant speedup can be achieved by operating on qq-grams (albeit at the cost of very high space requirements, hence the name "bloated"). In the category of keyword indexes we present the so-called split index, which can efficiently solve the kk-mismatches problem, especially for 1 error. Our implementation in the C++ language is focused mostly on data compaction, which is beneficial for the search speed (by being cache friendly). We compare our solution with other algorithms and we show that it is faster when the Hamming distance is used. Query times in the order of 1 microsecond were reported for one mismatch for a few-megabyte natural language dictionary on a medium-end PC. A minor contribution includes string sketches which aim to speed up approximate string comparison at the cost of additional space (O(1)O(1) per string). They can be used in the context of keyword indexes in order to deduce that two strings differ by at least kk mismatches with the use of fast bitwise operations rather than an explicit verification.

Keywords

Cite

@article{arxiv.1508.06610,
  title  = {Full-text and Keyword Indexes for String Searching},
  author = {Aleksander Cisłak},
  journal= {arXiv preprint arXiv:1508.06610},
  year   = {2015}
}

Comments

Master's thesis, 107 pages

R2 v1 2026-06-22T10:42:16.208Z