public interface MetaIndex extends Closeable
Examples:
MetaIndex meta = index.getMetaIndex();
//get docno of document with id 10
String docno = meta.getItem("docno", 10);
//get URL of document with id 100
String url = meta.getItem("url", 100);
//get docid of documet with url http://www.bbc.co.uk/
int docid = meta.getDocument("url", "http://www.bbc.co.uk/");
| Modifier and Type | Method and Description |
|---|---|
String[] |
getAllItems(int docid)
Obtain all metadata for specified document.
|
int |
getDocument(String key,
String value)
Obtain docid where document has specified metadata value in the specified type.
|
String |
getItem(String Key,
int docid)
Obtain metadata of specified type for specified document.
|
String[] |
getItems(String[] keys,
int docid)
Obtain metadata of specified types for specified document.
|
String[][] |
getItems(String[] Key,
int[] docids)
Obtain metadata of specified types for specified documents.
|
String[] |
getItems(String Key,
int[] docids)
Obtain metadata of specified type for specified documents.
|
String[] |
getKeys()
Returns the keys of this meta index
|
default String[] |
getReverseKeys()
Returns the reverse keys of this meta index
|
String getItem(String Key, int docid) throws IOException
IOExceptionString[] getAllItems(int docid) throws IOException
IOExceptionString[] getItems(String Key, int[] docids) throws IOException
IOExceptionString[] getItems(String[] keys, int docid) throws IOException
IOExceptionString[][] getItems(String[] Key, int[] docids) throws IOException
IOExceptionint getDocument(String key, String value) throws IOException
IOExceptionString[] getKeys()
default String[] getReverseKeys()
Terrier Information Retrieval Platform 5.1. Copyright © 2004-2019, University of Glasgow