|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MetaIndex
Interface for document metadata. Metadata is stored compressed on disk. Document offsets are stored in memory. Use getItem() methods to get metadata for a given document. Use getDocument() method to determine docid for a given metadata value.
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/");
Method Summary | |
---|---|
java.lang.String[] |
getAllItems(int docid)
Obtain all metadata for specified document. |
int |
getDocument(java.lang.String key,
java.lang.String value)
Obtain docid where document has specified metadata value in the specified type. |
java.lang.String |
getItem(java.lang.String Key,
int docid)
Obtain metadata of specified type for specified document. |
java.lang.String[] |
getItems(java.lang.String[] keys,
int docid)
Obtain metadata of specified types for specified document. |
java.lang.String[][] |
getItems(java.lang.String[] Key,
int[] docids)
Obtain metadata of specified types for specified documents. |
java.lang.String[] |
getItems(java.lang.String Key,
int[] docids)
Obtain metadata of specified type for specified documents. |
java.lang.String[] |
getKeys()
Returns the keys of this meta index |
Methods inherited from interface java.io.Closeable |
---|
close |
Method Detail |
---|
java.lang.String getItem(java.lang.String Key, int docid) throws java.io.IOException
java.io.IOException
java.lang.String[] getAllItems(int docid) throws java.io.IOException
java.io.IOException
java.lang.String[] getItems(java.lang.String Key, int[] docids) throws java.io.IOException
java.io.IOException
java.lang.String[] getItems(java.lang.String[] keys, int docid) throws java.io.IOException
java.io.IOException
java.lang.String[][] getItems(java.lang.String[] Key, int[] docids) throws java.io.IOException
java.io.IOException
int getDocument(java.lang.String key, java.lang.String value) throws java.io.IOException
java.io.IOException
java.lang.String[] getKeys()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |