Skip to content

Commit

Permalink
changed name for flag to '$noindex'
Browse files Browse the repository at this point in the history
issue #316
  • Loading branch information
rsoika committed Oct 18, 2017
1 parent 86c1a0e commit 99b5199
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public class DocumentService {
public static final String READACCESS = "$readaccess";
public static final String WRITEACCESS = "$writeaccess";
public static final String ISAUTHOR = "$isAuthor";
public static final String LUCENEIGNORE = "$luceneignore";
public static final String NOINDEX = "$noindex";
public static final String IMMUTABLE = "$immutable";

public static final String USER_GROUP_LIST = "org.imixs.USER.GROUPLIST";
Expand Down Expand Up @@ -448,8 +448,11 @@ public ItemCollection save(ItemCollection document) throws AccessDeniedException
document.replaceItemValue("$isauthor", isCallerAuthor(persistedDocument));

// add/update document into lucene index
if (!document.getItemValueBoolean(LUCENEIGNORE)) {
if (!document.getItemValueBoolean(NOINDEX)) {
luceneUpdateService.updateDocument(document);
} else {
// remove from index
luceneUpdateService.removeDocument(document.getUniqueID());
}

/*
Expand Down
4 changes: 2 additions & 2 deletions src/site/markdown/engine/documentservice.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ The method *count(String)* can be used to compute the total hits of a specific
The method *countPages(String,int)* can be used to compute the total pages of a specific search term by a given page size. The method expects the same search term as for the find() method but returns only the count of documents. The method counts only ItemCollections which are accessible by the CallerPrincipal.


### Ignore Lucene Index
The DocumentService adds a document automatically into the Lucene index. This default behavior can be deactivated on document level. To skip a document from indexing the item '$luceneIgnore' can be set to 'true'. In this case the document will not be added/updated in the lucene index. To remove an document already added to the lucene index, the method _removeDocument(id)_ must be called from the _LuceneUpdateService_.
### Ignore Index
The DocumentService adds a document automatically into the Lucene search index. This default behavior can be deactivated on document level. To skip a document from indexing the item '$noindex' can be set to 'true'. In this case the document will not be added/updated in the lucene index. If the document is already indexed it will be removed from the index.

## The Access Control List of a Document
Additional the _DocumentService_ allows to restrict the read- and write access for a document by providing a [ACL](.acl.html). The items '$readaccess' and '$writeaccess' can be added into a document to restrict the access. The items can provide a list of UserIds or Roles.
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/quickstart/workitem.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ The following table provides an overview about the data of a process instance ma
|$creator |String |no | The user who created the workItem. |
|$editor |String |no | The user who invoked the processWorkitem() method. |
|$lasteditor |String |no | The last user, that invoked the process method before the $editor |
|$luceneignore |Boolean |yes | If set to 'true' no lucene index will be created. (See [DocumentService](../engine/documentservice.html) for details.) |
|$noindex |Boolean |yes | If set to 'true', the document will not be added into the index. (See [DocumentService](../engine/documentservice.html) for details.) |
|$immutable |Boolean |yes | If set to 'true' updateing the workitem is no longer allowed. (See [DocumentService](../engine/documentservice.html) for details.) |
|namOwner |List |no | String list of User/Roles, that are owners of that WorkItem. |
|txtworkflowsummary |String|no | A short description of the current status |
Expand Down

0 comments on commit 99b5199

Please sign in to comment.