|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.xpn.xwiki.plugin.lucene.IndexData
com.xpn.xwiki.plugin.lucene.AttachmentData
public class AttachmentData
Holds all data but the content of an attachment to be indexed. The content is retrieved at indexing time, which should save us some memory especially when rebuilding an index for a big wiki.
| Constructor Summary | |
|---|---|
AttachmentData(com.xpn.xwiki.doc.XWikiDocument document,
com.xpn.xwiki.doc.XWikiAttachment attachment,
com.xpn.xwiki.XWikiContext context)
|
|
| Method Summary | |
|---|---|
void |
addDataToLuceneDocument(org.apache.lucene.document.Document luceneDoc,
com.xpn.xwiki.doc.XWikiDocument doc,
com.xpn.xwiki.XWikiContext context)
Adds this documents data to a lucene Document instance for indexing. |
java.lang.String |
getFilename()
|
protected void |
getFullText(java.lang.StringBuilder sb,
com.xpn.xwiki.doc.XWikiDocument doc,
com.xpn.xwiki.XWikiContext context)
|
java.lang.String |
getId()
overridden to append the filename |
int |
getSize()
|
java.lang.String |
getType()
|
void |
setFilename(java.lang.String filename)
|
void |
setSize(int size)
|
| Methods inherited from class com.xpn.xwiki.plugin.lucene.IndexData |
|---|
buildQuery, getCreationDate, getCreator, getDocumentFullName, getDocumentName, getDocumentSpace, getDocumentTitle, getDocumentWeb, getFullName, getFullText, getLanguage, getWiki, setAuthor, setCreationDate, setCreator, setDocumentFullName, setDocumentName, setDocumentSpace, setDocumentTitle, setDocumentWeb, setFullName, setLanguage, setModificationDate, setWiki, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AttachmentData(com.xpn.xwiki.doc.XWikiDocument document,
com.xpn.xwiki.doc.XWikiAttachment attachment,
com.xpn.xwiki.XWikiContext context)
| Method Detail |
|---|
public void addDataToLuceneDocument(org.apache.lucene.document.Document luceneDoc,
com.xpn.xwiki.doc.XWikiDocument doc,
com.xpn.xwiki.XWikiContext context)
Short introduction to Lucene field types
Which type of Lucene field is used determines what Lucene does with data and how we can use it for searching and showing search results:
addDataToLuceneDocument in class IndexDataluceneDoc - if not null, this controls which translated version of the content will be indexed. If null, the
content in the default language will be used.IndexData.addDataToLuceneDocument(org.apache.lucene.document.Document,
com.xpn.xwiki.doc.XWikiDocument, com.xpn.xwiki.XWikiContext)public void setSize(int size)
size - The size to set.public int getSize()
public java.lang.String getType()
getType in class IndexDataIndexData.getType()public java.lang.String getFilename()
public void setFilename(java.lang.String filename)
filename - The filename to set.public java.lang.String getId()
getId in class IndexDataIndexData.getId()
protected void getFullText(java.lang.StringBuilder sb,
com.xpn.xwiki.doc.XWikiDocument doc,
com.xpn.xwiki.XWikiContext context)
Return a string containing the result of IndexData.getFullText(com.xpn.xwiki.doc.XWikiDocument, com.xpn.xwiki.XWikiContext) plus the full text content of this
attachment, as far as it could be extracted.
getFullText in class IndexDataIndexData.getFullText(java.lang.StringBuilder, com.xpn.xwiki.doc.XWikiDocument,
com.xpn.xwiki.XWikiContext)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||