Stability | experimental |
---|---|
Maintainer | Uwe Schmidt (uwe@fh-wedel.de) |
Safe Haskell | None |
A more space efficient substitute for Holumbus.Index.Documents and a more flexible implementation than Holumbus.Index.CompactDocuments.
DocIds are computed by a hash function, so the inverse map from URIs to DocIds is substituted by the hash function
- newtype Documents a = Documents {}
- newtype CompressedDoc a = CDoc {
- unCDoc :: ByteString
- type DocMap a = DocIdMap (CompressedDoc a)
- emptyDocuments :: Documents a
- singleton :: Binary a => Document a -> Documents a
- toDocument :: Binary a => CompressedDoc a -> Document a
- fromDocument :: Binary a => Document a -> CompressedDoc a
- fromDocMap :: Binary a => DocMap a -> DocIdMap (Document a)
- toDocMap :: Binary a => DocIdMap (Document a) -> DocMap a
Documents type
Binary a => HolDocuments Documents a | |
(Binary a, HolIndex i) => HolDocIndex Documents a i | |
Eq (Documents a) | |
Show (Documents a) | |
Binary a => Binary (Documents a) | |
NFData (Documents a) | |
(Binary a, XmlPickler a) => XmlPickler (Documents a) |
newtype CompressedDoc a Source
CDoc | |
|
Eq (CompressedDoc a) | |
Show (CompressedDoc a) | |
Binary a => Binary (CompressedDoc a) | |
NFData (CompressedDoc a) | |
(Binary a, XmlPickler a) => XmlPickler (CompressedDoc a) |
type DocMap a = DocIdMap (CompressedDoc a)Source
The table which is used to map a document to an artificial id and vice versa.
Construction
emptyDocuments :: Documents aSource
Create an empty table.
singleton :: Binary a => Document a -> Documents aSource
Create a document table containing a single document.
Conversion
toDocument :: Binary a => CompressedDoc a -> Document aSource
fromDocument :: Binary a => Document a -> CompressedDoc aSource