Holumbus-Searchengine-1.2.3: A search and indexing engine.

Portabilityportable
Stabilityexperimental
MaintainerUwe Schmidt (uwe@fh-wedel.de)
Safe HaskellNone

Holumbus.Index.Inverted.PrefixMem

Contents

Description

A variant of the Inverted.Memory index with an optimized prefix tree instead of a trie as central data structure. This version should be more space efficient as the trie and more runtime efficient when combining whole indexes.

For switching from Memory to this module, only the import has to be modified

Synopsis

Inverted index types

newtype Inverted Source

The index consists of a table which maps documents to ids and a number of index parts.

Constructors

Inverted 

Fields

indexParts :: Parts
 

type Parts = Map Context PartSource

The index parts are identified by a name, which should denote the context of the words.

type Part = PrefixTree CompressedOccurrencesSource

The index part is the real inverted index. Words are mapped to their occurrences.

Construction

singleton :: Context -> String -> Occurrences -> InvertedSource

Create an index with just one word in one context.

emptyInverted :: InvertedSource

Create an empty index.