23#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_DEX_POSTINGLIST_H
24#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_DEX_POSTINGLIST_H
27#include "llvm/ADT/ArrayRef.h"
28#include "llvm/ADT/SmallVector.h"
46 llvm::SmallVector<DocID, PayloadSize + 1>
decompress()
const;
53static_assert(
sizeof(
Chunk) == 32,
"Chunk should take 32 bytes of memory.");
61 explicit PostingList(llvm::ArrayRef<DocID> Documents);
66 std::unique_ptr<Iterator>
iterator(
const Token *Tok =
nullptr)
const;
69 size_t bytes()
const {
return Chunks.capacity() *
sizeof(
Chunk); }
72 const std::vector<Chunk> Chunks;
Symbol index queries consist of specific requirements for the requested symbol, such as high fuzzy ma...
PostingList is the storage of DocIDs which can be inserted to the Query Tree as a leaf by constructin...
std::unique_ptr< Iterator > iterator(const Token *Tok=nullptr) const
Constructs DocumentIterator over given posting list.
size_t bytes() const
Returns in-memory size of external storage.
A Token represents an attribute of a symbol, such as a particular trigram present in the name (used f...
uint32_t DocID
Symbol position in the list of all index symbols sorted by a pre-computed symbol quality.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
NOTE: This is an implementation detail.
llvm::SmallVector< DocID, PayloadSize+1 > decompress() const
std::array< uint8_t, PayloadSize > Payload
VByte-encoded deltas.
static constexpr size_t PayloadSize
Keep sizeof(Chunk) == 32.
DocID Head
The first element of decompressed Chunk.