|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.xpn.xwiki.plugin.lucene.AbstractIndexData
com.xpn.xwiki.plugin.lucene.AbstractDocumentData
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.XWikiAttachment attachment,
XWikiContext context,
boolean deleted)
|
|
AttachmentData(com.xpn.xwiki.doc.XWikiDocument document,
java.lang.String filename,
XWikiContext context,
boolean deleted)
|
|
| Method Summary | |
|---|---|
void |
addDataToLuceneDocument(org.apache.lucene.document.Document luceneDoc,
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,
XWikiContext context)
|
java.lang.String |
getId()
overridden to append the filename |
int |
getSize()
|
void |
setFilename(java.lang.String filename)
|
void |
setSize(int size)
|
| Methods inherited from class com.xpn.xwiki.plugin.lucene.AbstractDocumentData |
|---|
addDocumentDataToLuceneDocument, getCreationDate, getCreator, getDocumentFullName, getDocumentName, getDocumentReference, getDocumentSpace, getDocumentTitle, getFullName, getFullText, getLanguage, getTerm, getWiki, setAuthor, setCreationDate, setCreator, setDocumentTitle, setLanguage, setModificationDate, toString |
| Methods inherited from class com.xpn.xwiki.plugin.lucene.AbstractIndexData |
|---|
getEntityName, getEntityReference, getType, isDeleted, setDeleted, setEntityReference |
| 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.XWikiAttachment attachment,
XWikiContext context,
boolean deleted)
public AttachmentData(com.xpn.xwiki.doc.XWikiDocument document,
java.lang.String filename,
XWikiContext context,
boolean deleted)
| Method Detail |
|---|
public void addDataToLuceneDocument(org.apache.lucene.document.Document luceneDoc,
XWikiContext context)
throws XWikiException
AbstractDocumentDataShort 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 AbstractDocumentDataluceneDoc - 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.
XWikiExceptionpublic void setSize(int size)
size - The size to set.public int getSize()
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 AbstractDocumentDataAbstractIndexData.getId()
protected void getFullText(java.lang.StringBuilder sb,
com.xpn.xwiki.doc.XWikiDocument doc,
XWikiContext context)
Return a string containing the result of AbstractIndexData.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 AbstractDocumentDataAbstractIndexData.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 | ||||||||