|
|||||||||
| 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
public abstract class AbstractDocumentData
| Field Summary | |
|---|---|
protected static float |
AUTHOR_BOOST
The importance of the last document author username. |
protected static float |
CONTENT_BOOST
The importance of the full document content. |
protected static float |
CREATION_DATE_BOOST
The importance of the document creation date. |
protected static float |
CREATOR_BOOST
The importance of the document creator username. |
protected static float |
DATE_BOOST
The importance of the document last modification date. |
protected static float |
FULL_NAME_BOOST
The importance of the document full name. |
protected static float |
ID_BOOST
The importance of the document ID. |
protected static float |
LANGUAGE_BOOST
The importance of the document language. |
protected static float |
NAME_BOOST
The importance of the document's name. |
protected static float |
SPACE_BOOST
The importance of the document's space. |
protected static float |
TITLE_BOOST
The importance of the document title. |
protected static float |
TYPE_BOOST
The importance of the entity type. |
protected static float |
WIKI_BOOST
The importance of the document's wiki. |
| Constructor Summary | |
|---|---|
AbstractDocumentData(String type,
com.xpn.xwiki.doc.XWikiDocument doc,
com.xpn.xwiki.XWikiContext context,
boolean deleted)
|
|
| Method Summary | |
|---|---|
void |
addDataToLuceneDocument(org.apache.lucene.document.Document luceneDoc,
com.xpn.xwiki.XWikiContext context)
Adds this documents data to a lucene Document instance for indexing. |
void |
addDocumentDataToLuceneDocument(org.apache.lucene.document.Document luceneDoc,
com.xpn.xwiki.doc.XWikiDocument doc,
com.xpn.xwiki.XWikiContext context)
|
protected static void |
addFieldToDocument(String fieldName,
String value,
org.apache.lucene.document.Field.Store howToStore,
org.apache.lucene.document.Field.Index howToIndex,
float boost,
org.apache.lucene.document.Document luceneDoc)
Indexes data into a Lucene field and adds it to the specified Lucene document. |
Date |
getCreationDate()
|
String |
getCreator()
|
String |
getDocumentFullName()
|
String |
getDocumentName()
|
org.xwiki.model.reference.DocumentReference |
getDocumentReference()
|
String |
getDocumentSpace()
|
String |
getDocumentTitle()
|
String |
getFullName()
|
protected void |
getFullText(StringBuilder sb,
com.xpn.xwiki.doc.XWikiDocument doc,
com.xpn.xwiki.XWikiContext context)
|
String |
getFullText(com.xpn.xwiki.doc.XWikiDocument doc,
com.xpn.xwiki.XWikiContext context)
|
String |
getId()
|
String |
getLanguage()
|
org.apache.lucene.index.Term |
getTerm()
|
String |
getVersion()
|
String |
getWiki()
|
void |
setAuthor(String author)
|
void |
setCreationDate(Date creationDate)
|
void |
setCreator(String creator)
|
void |
setDocumentTitle(String documentTitle)
|
void |
setLanguage(String lang)
|
void |
setModificationDate(Date modificationDate)
|
void |
setVersion(String version)
|
String |
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 |
| Field Detail |
|---|
protected static final float ID_BOOST
protected static final float LANGUAGE_BOOST
protected static final float TYPE_BOOST
protected static final float WIKI_BOOST
protected static final float SPACE_BOOST
protected static final float NAME_BOOST
protected static final float FULL_NAME_BOOST
protected static final float TITLE_BOOST
protected static final float CONTENT_BOOST
protected static final float CREATOR_BOOST
protected static final float AUTHOR_BOOST
protected static final float CREATION_DATE_BOOST
protected static final float DATE_BOOST
| Constructor Detail |
|---|
public AbstractDocumentData(String type,
com.xpn.xwiki.doc.XWikiDocument doc,
com.xpn.xwiki.XWikiContext context,
boolean deleted)
| Method Detail |
|---|
public void addDataToLuceneDocument(org.apache.lucene.document.Document luceneDoc,
com.xpn.xwiki.XWikiContext context)
throws com.xpn.xwiki.XWikiException
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 AbstractIndexDataluceneDoc - 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.
com.xpn.xwiki.XWikiException
public void addDocumentDataToLuceneDocument(org.apache.lucene.document.Document luceneDoc,
com.xpn.xwiki.doc.XWikiDocument doc,
com.xpn.xwiki.XWikiContext context)
public String getId()
getId in class AbstractIndexDatapublic org.apache.lucene.index.Term getTerm()
getTerm in class AbstractIndexData
public String getFullText(com.xpn.xwiki.doc.XWikiDocument doc,
com.xpn.xwiki.XWikiContext context)
getFullText in class AbstractIndexData
protected void getFullText(StringBuilder sb,
com.xpn.xwiki.doc.XWikiDocument doc,
com.xpn.xwiki.XWikiContext context)
getFullText in class AbstractIndexDatapublic void setAuthor(String author)
author - The author to set.public void setVersion(String version)
version - the version of the documentpublic void setDocumentTitle(String documentTitle)
documentTitle - the document titlepublic void setModificationDate(Date modificationDate)
modificationDate - The modificationDate to set.public String getDocumentTitle()
public org.xwiki.model.reference.DocumentReference getDocumentReference()
public String getDocumentName()
getDocumentName in class AbstractIndexDatapublic String getDocumentSpace()
getDocumentSpace in class AbstractIndexDatapublic String getWiki()
getWiki in class AbstractIndexDatapublic String getDocumentFullName()
getDocumentFullName in class AbstractIndexDatapublic String getVersion()
public Date getCreationDate()
public void setCreationDate(Date creationDate)
public String getCreator()
public void setCreator(String creator)
public String getFullName()
getFullName in class AbstractIndexDatapublic String getLanguage()
public void setLanguage(String lang)
public String toString()
toString in class AbstractIndexData
protected static void addFieldToDocument(String fieldName,
String value,
org.apache.lucene.document.Field.Store howToStore,
org.apache.lucene.document.Field.Index howToIndex,
float boost,
org.apache.lucene.document.Document luceneDoc)
fieldName - the target field name under which to index this datavalue - the data to indexhowToStore - whether or not to store this fieldhowToIndex - how to index the data: analyzed or notboost - how much to weight hits on this field in search resultsluceneDoc - the Lucene document to which the resulting field should be added
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||