IIndexDocument¶
-
interface
OCP\FullTextSearch\Model\
IIndexDocument
¶ - Class IIndexDocumentThis is one of the main class of the FullTextSearch, used as a data transferobject. An IIndexDocument is created to manage documents around FullTextSearch,during an index and during a search.The uniqueness of an IIndexDocument is made by the Id of the Content Providerand the Id of the original document within the Content Provider.We will call original document the source from which the IIndexDocument isgenerated. As an example, an original document can be a file, a mail, ...
Implemented by: OC\FullTextSearch\Model\IndexDocument
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#44
Constants¶
-
NOT_ENCODED = 0
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#45
-
ENCODED_BASE64 = 1
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#46
Methods¶
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getId
()¶ - Returns the Id of the original document.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#57 Since: 15.0.0 Returns: string
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getProviderId
()¶ - Returns the Id of the provider.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#67 Since: 15.0.0 Returns: string
-
public
OCP\FullTextSearch\Model\IIndexDocument::
setIndex
($index)¶ - Set the Index related to the IIndexDocument.
Source: Parameters: - $index (
OCP\FullTextSearch\Model\IIndex
)
See: Since: 15.0.0
Returns: - $index (
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getIndex
()¶ - Get the Index.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#90 Since: 15.0.0 Returns: \OCP\FullTextSearch\Model\IIndex
-
public
OCP\FullTextSearch\Model\IIndexDocument::
hasIndex
()¶ - return if Index is defined.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#99 Since: 16.0.0 Returns: bool
-
public
OCP\FullTextSearch\Model\IIndexDocument::
setModifiedTime
($modifiedTime)¶ - Set the modified time of the original document.
Source: Parameters: - $modifiedTime (int)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getModifiedTime
()¶ - Get the modified time of the original document.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#120 Since: 15.0.0 Returns: int
-
public
OCP\FullTextSearch\Model\IIndexDocument::
isOlderThan
($time)¶ - Check if the original document of the IIndexDocument is older than $time.
Source: Parameters: - $time (int)
Since: 15.0.0
Returns: bool
-
public
OCP\FullTextSearch\Model\IIndexDocument::
setAccess
($access)¶ - Set the read rights of the original document using a IDocumentAccess.
Source: Parameters: - $access (
OCP\FullTextSearch\Model\IDocumentAccess
)
See: Since: 15.0.0
Returns: $this
- $access (
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getAccess
()¶ - Get the IDocumentAccess related to the original document.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#154 Since: 15.0.0 Returns: \OCP\FullTextSearch\Model\IDocumentAccess
-
public
OCP\FullTextSearch\Model\IIndexDocument::
addTag
($tag)¶ - Add a tag to the list.
Source: Parameters: - $tag (string)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
setTags
($tags)¶ - Set the list of tags assigned to the original document.
Source: Parameters: - $tags (array)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getTags
()¶ - Get the list of tags assigned to the original document.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#186 Since: 15.0.0 Returns: array
-
public
OCP\FullTextSearch\Model\IIndexDocument::
addMetaTag
($tag)¶ - Add a meta tag to the list.
Source: Parameters: - $tag (string)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
setMetaTags
($tags)¶ - Set the list of meta tags assigned to the original document.
Source: Parameters: - $tags (array)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getMetaTags
()¶ - Get the list of meta tags assigned to the original document.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#218 Since: 15.0.0 Returns: array
-
public
OCP\FullTextSearch\Model\IIndexDocument::
addSubTag
($sub, $tag)¶ - Add a sub tag to the list.
Source: Parameters: - $sub (string)
- $tag (string)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
setSubTags
($tags)¶ - Set the list of sub tags assigned to the original document.
Source: Parameters: - $tags (array)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getSubTags
($formatted=false)¶ - Get the list of sub tags assigned to the original document.If $formatted is true, the result will be formatted in a onedimensional array.
Source: Parameters: - $formatted (bool)
Since: 15.0.0
Returns: array
-
public
OCP\FullTextSearch\Model\IIndexDocument::
setSource
($source)¶ - Set the source of the original document.
Source: Parameters: - $source (string)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getSource
()¶ - Get the source of the original document.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#276 Since: 15.0.0 Returns: string
-
public
OCP\FullTextSearch\Model\IIndexDocument::
setTitle
($title)¶ - Set the title of the original document.
Source: Parameters: - $title (string)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getTitle
()¶ - Get the title of the original document.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#297 Since: 15.0.0 Returns: string
-
public
OCP\FullTextSearch\Model\IIndexDocument::
setContent
($content, $encoded=0)¶ - Set the content of the document.$encoded can be NOT_ENCODED or ENCODED_BASE64 if the content is raw orencoded in base64.
Source: Parameters: - $content (string)
- $encoded (int)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getContent
()¶ - Get the content of the original document.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#321 Since: 15.0.0 Returns: string
-
public
OCP\FullTextSearch\Model\IIndexDocument::
isContentEncoded
()¶ - Returns the type of the encoding on the content.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#330 Since: 15.0.0 Returns: int
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getContentSize
()¶ - Return the size of the content.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#339 Since: 15.0.0 Returns: int
-
public
OCP\FullTextSearch\Model\IIndexDocument::
initHash
()¶ - Generate an hash, based on the content of the original document.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#349 Since: 15.0.0 Returns: \OCP\FullTextSearch\Model\IIndexDocument
-
public
OCP\FullTextSearch\Model\IIndexDocument::
setHash
($hash)¶ - Set the hash of the original document.
Source: Parameters: - $hash (string)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getHash
()¶ - Get the hash of the original document.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#369 Since: 15.0.0 Returns: string
-
public
OCP\FullTextSearch\Model\IIndexDocument::
addPart
($part, $content)¶ - Add a part, identified by a string, and its content.It is strongly advised to use alphanumerical chars with no space in the$part string.
Source: Parameters: - $part (string)
- $content (string)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
setParts
($parts)¶ - Set all parts and their content.
Source: Parameters: - $parts (array)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getParts
()¶ - Get all parts of the IIndexDocument.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#405 Since: 15.0.0 Returns: array
-
public
OCP\FullTextSearch\Model\IIndexDocument::
setLink
($link)¶ - Add a link, usable by the frontend.
Source: Parameters: - $link (string)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getLink
()¶ - Get the link.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#426 Since: 15.0.0 Returns: string
-
public
OCP\FullTextSearch\Model\IIndexDocument::
setMore
($more)¶ - Set more information that couldn’t be set using other method.
Source: Parameters: - $more (array)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getMore
()¶ - Get more information.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#447 Since: 15.0.0 Returns: array
-
public
OCP\FullTextSearch\Model\IIndexDocument::
addExcerpt
($source, $excerpt)¶ - Add some excerpt of the content of the original document, usually basedon the search request.
Source: Parameters: - $source (string)
- $excerpt (string)
Since: 16.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
setExcerpts
($excerpts)¶ - Set all excerpts of the content of the original document.
Source: Parameters: - $excerpts (array)
Since: 16.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getExcerpts
()¶ - Get all excerpts of the content of the original document.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#481 Since: 15.0.0 Returns: array
-
public
OCP\FullTextSearch\Model\IIndexDocument::
setScore
($score)¶ - Set the score to the result assigned to this document during a searchrequest.
Source: Parameters: - $score (string)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getScore
()¶ - Get the score.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#503 Since: 15.0.0 Returns: string
-
public
OCP\FullTextSearch\Model\IIndexDocument::
setInfo
($info, $value)¶ - Set some information about the original document that will be availableto the front-end when displaying search result. (as string)Because this information will not be indexed, this method can also beused to manage some data while filling the IIndexDocument before itsindexing.
Source: Parameters: - $info (string)
- $value (string)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getInfo
($info, $default="")¶ - Get an information about a document. (string)
Source: Parameters: - $info (string)
- $default (string)
Since: 15.0.0
Returns: string
-
public
OCP\FullTextSearch\Model\IIndexDocument::
setInfoArray
($info, $value)¶ - Set some information about the original document that will be availableto the front-end when displaying search result. (as array)Because this information will not be indexed, this method can also beused to manage some data while filling the IIndexDocument before itsindexing.
Source: Parameters: - $info (string)
- $value (array)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getInfoArray
($info, $default=[])¶ - Get an information about a document. (array)
Source: Parameters: - $info (string)
- $default (array)
Since: 15.0.0
Returns: array
-
public
OCP\FullTextSearch\Model\IIndexDocument::
setInfoInt
($info, $value)¶ - Set some information about the original document that will be availableto the front-end when displaying search result. (as int)Because this information will not be indexed, this method can also beused to manage some data while filling the IIndexDocument before itsindexing.
Source: Parameters: - $info (string)
- $value (int)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getInfoInt
($info, $default=0)¶ - Get an information about a document. (int)
Source: Parameters: - $info (string)
- $default (int)
Since: 15.0.0
Returns: int
-
public
OCP\FullTextSearch\Model\IIndexDocument::
setInfoBool
($info, $value)¶ - Set some information about the original document that will be availableto the front-end when displaying search result. (as bool)Because this information will not be indexed, this method can also beused to manage some data while filling the IIndexDocument before itsindexing.
Source: Parameters: - $info (string)
- $value (bool)
Since: 15.0.0
Returns:
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getInfoBool
($info, $default=false)¶ - Get an information about a document. (bool)
Source: Parameters: - $info (string)
- $default (bool)
Since: 15.0.0
Returns: bool
-
public
OCP\FullTextSearch\Model\IIndexDocument::
getInfoAll
()¶ - Get all info.
Source: lib/public/FullTextSearch/Model/IIndexDocument.php#625 Since: 15.0.0 Returns: array