public interface I_CmsSearchDocument
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SEARCH_PRIORITY_HIGH_VALUE
Value for "high" search priority.
|
static java.lang.String |
SEARCH_PRIORITY_LOW_VALUE
Value for "low" search priority.
|
static java.lang.String |
SEARCH_PRIORITY_MAX_VALUE
Value for "maximum" search priority.
|
static java.lang.String |
SEARCH_PRIORITY_NORMAL_VALUE
Value for "normal" search priority.
|
static java.lang.String |
VFS_DOCUMENT_KEY_PREFIX
The VFS prefix for document keys.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCategoryField(java.util.List<CmsCategory> categories)
Adds the list of the given categories to this document.
|
void |
addContentField(byte[] content)
Adds the given content byte array to this document.
|
void |
addContentLocales(java.util.Collection<java.util.Locale> locales)
Adds the locales of the content to this document.
|
void |
addDateField(java.lang.String name,
long date,
boolean analyzed)
Puts the given date into the field with the given name.
|
void |
addFileSizeField(int length)
Adds the given file size as field to this document.
|
void |
addPathField(java.lang.String rootPath)
Puts the given path into this document.
|
void |
addResourceLocales(java.util.Collection<java.util.Locale> locales)
Adds the locales of the resource to this document.
|
void |
addRootPathField(java.lang.String rootPath)
Puts the given root path into its default field.
|
void |
addSearchField(CmsSearchField field,
java.lang.String value)
Adds a dynamic search field to the index.
|
void |
addSuffixField(java.lang.String suffix)
Adds the suffix field to the document.
|
void |
addTypeField(java.lang.String type)
Adds the resource type to this document.
|
byte[] |
getContentBlob()
Returns the content blob of this document.
|
java.lang.Object |
getDocument()
Returns the concrete document as Object to be cast if necessary.
|
java.util.List<java.lang.String> |
getFieldNames()
Returns all field names of this document.
|
java.util.Date |
getFieldValueAsDate(java.lang.String fieldName)
Tries to return the value of the field for the given name as Date,
null if the field is empty or if the field is not of the type date. |
java.lang.String |
getFieldValueAsString(java.lang.String fieldName)
Returns the value of the field for the given name as String.
|
java.util.List<java.lang.String> |
getMultivaluedFieldAsStringList(java.lang.String fieldName)
Returns the values of a multi-valued field as list of strings.
|
java.lang.String |
getPath()
Returns the root path of the referenced VFS resource of this document.
|
float |
getScore()
Returns the score for this document.
|
java.lang.String |
getType()
Returns the resource type of the referenced VFS resource of this document.
|
void |
setScore(float score)
Sets the score for this document.
|
static final java.lang.String SEARCH_PRIORITY_HIGH_VALUE
static final java.lang.String SEARCH_PRIORITY_LOW_VALUE
static final java.lang.String SEARCH_PRIORITY_MAX_VALUE
static final java.lang.String SEARCH_PRIORITY_NORMAL_VALUE
static final java.lang.String VFS_DOCUMENT_KEY_PREFIX
void addCategoryField(java.util.List<CmsCategory> categories)
categories - the categories to addvoid addContentField(byte[] content)
content - the content to addvoid addContentLocales(java.util.Collection<java.util.Locale> locales)
locales - the locales of the contentvoid addDateField(java.lang.String name, long date, boolean analyzed)
name - the name to put the date indate - the date to pu into the fieldanalyzed - true if the inserted value should be analyzablevoid addFileSizeField(int length)
length - the lengthvoid addPathField(java.lang.String rootPath)
rootPath - the given path into this documentvoid addResourceLocales(java.util.Collection<java.util.Locale> locales)
locales - the locales of the resourcevoid addRootPathField(java.lang.String rootPath)
rootPath - the root path to put into the fieldvoid addSearchField(CmsSearchField field, java.lang.String value)
field - the fieldvalue - the valuevoid addSuffixField(java.lang.String suffix)
Example
'html' for a file named 'article.html'
suffix - the suffix to addvoid addTypeField(java.lang.String type)
type - the resource type name.byte[] getContentBlob()
java.lang.Object getDocument()
java.util.List<java.lang.String> getFieldNames()
java.util.Date getFieldValueAsDate(java.lang.String fieldName)
null if the field is empty or if the field is not of the type date.fieldName - the name of the field to get the Date value fornulljava.lang.String getFieldValueAsString(java.lang.String fieldName)
fieldName - the name of the field to get the String value fornull if emptyjava.util.List<java.lang.String> getMultivaluedFieldAsStringList(java.lang.String fieldName)
fieldName - the name of the multivalued field to get the values from.java.lang.String getPath()
float getScore()
java.lang.String getType()
void setScore(float score)
score - the score