public interface Barrel extends AutoCloseable
BarrelReader
), manage the removal of documents from itself, and can return
metadata of inverted lists and documents. A Barrel can also destroy itself.Modifier and Type | Method and Description |
---|---|
void |
close()
Close this Barrel.
|
void |
commit()
Commit changes of this barrel to disk.
|
long |
deleted()
Return the number of deleted documents in this Barrel.
|
void |
destroy()
Destroy all data structures this Barrel uses.
|
Sequence<? extends IListMetadata> |
expand(String expr)
Return the enumeration of all IListMetadata objects which match the
expression.
|
Bitmap |
getBitmap(String label)
Return the Bitmap of a given label.
|
IListMetadata |
getIListMeta(String term)
Return the inverted list metadata of the given
term . |
DocumentData |
getMeta(long uid)
Return the metadata of document number
uid . |
BarrelReader |
open()
Return a reader for this Barrel.
|
IListReader |
openIList(String term,
boolean clean)
Open the inverted list of
term for reading. |
void |
query(Query q,
ResultList result)
Submit a query to this Barrel.
|
boolean |
removeDoc(long id)
Remove the given document from this Barrel.
|
void |
setBitmap(String label,
Bitmap bitmap)
Try to set the Bitmap of a given label.
|
long |
size()
Return the number of all documents in this Barrel (including the deleted
ones).
|
Bitmap getBitmap(String label)
label
- the label of the requested Bitmapvoid setBitmap(String label, Bitmap bitmap)
label
- the label of the requested Bitmapbitmap
- Bitmap of removed documents when label is nullSequence<? extends IListMetadata> expand(String expr)
expr
- the expression to matchlong size()
long deleted()
boolean removeDoc(long id)
id
- the document to removeIListReader openIList(String term, boolean clean)
term
for reading.term
- the termclean
- whether to remove all the items denoted as deletedBarrelReader open()
void destroy()
DocumentData getMeta(long uid)
uid
.uid
- the document numberIListMetadata getIListMeta(String term)
term
.term
- the termvoid close()
close
in interface AutoCloseable
void commit()
void query(Query q, ResultList result)
Above 1.2.5 : the equation of similarity in the extended boolean model. If p=1 the model is similar to the vector space model. As p approaches infinity (or a very large value), the model is equal to the classic boolean model. This parameter is not passed as a parameter to this routine - it should be part of the query object.
q
- the queryresult
- reads documents for similarity to the queryCopyright © 2016 Egothor. All Rights Reserved.