Copyright© 2008-2022 Sitevision AB, all rights reserved.
@Requireable(value="IndexingUtil") public interface IndexingUtil extends VelocityAccess.IndexingUtilConstants
An instance of the Sitevision class implementing this interface can be obtained via
SearchFactory.getIndexingUtil()
.
See SearchFactory
for how to obtain an instance of the SearchFactory
interface.
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_RESOURCE_PRIORITY
The default resource priority.
|
static int |
MAX_RESOURCE_PRIORITY
The maximum resource priority.
|
static int |
MIN_RESOURCE_PRIORITY
The minimum resource priority.
|
Modifier and Type | Method and Description |
---|---|
boolean |
setResourcePriority(Node aNode,
int aPriority)
Sets the resource priority for an indexable node.
|
getDEFAULT_RESOURCE_PRIORITY, getMAX_RESOURCE_PRIORITY, getMIN_RESOURCE_PRIORITY
static final int MIN_RESOURCE_PRIORITY
0.1F
.static final int DEFAULT_RESOURCE_PRIORITY
1.0F
.static final int MAX_RESOURCE_PRIORITY
2.0F
.boolean setResourcePriority(Node aNode, int aPriority)
The resource priority of a node will influence its document boost when indexed.
Note! Method invocations that doesn't fulfill these 3 criteria will always fail (i.e. return false
):
aNode
must be an indexable node, typically a sv:page
, sv:article
,
sv:file
or sv:image
.
aPriority
must be in interval: [ MIN_RESOURCE_PRIORITY
.. MAX_RESOURCE_PRIORITY
].
PermissionUtil.Permission.WRITE
and
PermissionUtil.Permission.MODIFY_SEARCH_PRIORITY
on aNode
.
This method tries to acquire a lock on aNode
in order to mutate its resource priority.
Mutation will fail (i.e. this method will return false
) if aNode
is already locked.
Indexing note! Changing the value of the resource priority of a node will automatically trigger a re-index of the node.
aNode
- the indexable nodeaPriority
- the priority, i.e. in interval: [ MIN_RESOURCE_PRIORITY
.. MAX_RESOURCE_PRIORITY
]true
if the operation succeeded, false
otherwiseSitevision - Portal and Content Management Made Easy
Sitevision is an advanced Java enterprise portal product and a portlet container (JSR 286) that implements Java Content Repository (JSR 283).
Copyright© 2008-2022 Sitevision AB, all rights reserved.