hunt-searchengine-0.3.0.1: A search and indexing engine.

Safe HaskellNone
LanguageHaskell98

Hunt.Common.Document

Description

The document representation.

This includes the

  • URI for identification,
  • the description for the data itself
  • the weight used in ranking and
  • optionally a score

Synopsis

Documentation

data Document Source

The document representation.

Constructors

Document 

Fields

uri :: !URI

Unique identifier of the document.

desc :: !Description

Description of the document (simple key-value store).

wght :: !Score

Weight used in ranking (default 1.0).

class NFData e => DocumentWrapper e where Source

Simple bijection between e and Document for compression.

Minimal complete definition

unwrap, wrap

Methods

unwrap :: e -> Document Source

Get the document.

wrap :: Document -> e Source

Create e from document.

update :: (Document -> Document) -> e -> e Source

Update the wrapped document. update f = wrap . f . unwrap.