hunt-searchengine- A search and indexing engine.

CopyrightCopyright (C) 2011 Sebastian M. Schlatt, Timo B. Huebel, Uwe Schmidt
MaintainerTimo B. Huebel (
Portabilitynone portable
Safe HaskellNone



Occurrences of words within the index. A word occurs in document at specific locations.



type Occurrences = DocIdMap Positions Source

The occurrences of words in documents. A mapping from document ids to the positions in the document.

empty :: Occurrences Source

Create an empty set of positions.

fromDocIdSet :: DocIdSet -> Occurrences Source

Create Occurrences from a DocIdSet Since the DocIdSet contains no position information, we assume position one for each DocId

singleton :: DocId -> Position -> Occurrences Source

Create a single dcid set with a single position.

singleton' :: DocId -> [Position] -> Occurrences Source

Create a single dcid set with a set of.

null :: Occurrences -> Bool Source

Test on empty set of positions.

size :: Occurrences -> Int Source

Determine the number of positions in a set of occurrences.

insert :: DocId -> Position -> Occurrences -> Occurrences Source

Add a position to occurrences.

insert' :: DocId -> Positions -> Occurrences -> Occurrences Source

Add multiple positions to occurrences

deleteOccurrence :: DocId -> Position -> Occurrences -> Occurrences Source

Remove a position from occurrences.

delete :: DocId -> Occurrences -> Occurrences Source

Delete a document (by DocId) from occurrences.

update :: (DocId -> DocId) -> Occurrences -> Occurrences Source

Changes the DocIDs of the occurrences.

merge :: Occurrences -> Occurrences -> Occurrences Source

Merge two occurrences.

merges :: [Occurrences] -> Occurrences Source

Merge occurrences

difference :: Occurrences -> Occurrences -> Occurrences Source

Difference of occurrences.

diffWithSet :: Occurrences -> DocIdSet -> Occurrences Source

Remove Set of DocIds from Occurrences

subtract :: Occurrences -> Occurrences -> Occurrences Source

Subtract occurrences from some other occurrences.