Search documents by query
URL
GET <application-url>/api/document/search
Query parameter
-
query
mandatory: true
url encoded search query
-
allLanguages
possible: true, false
default: false
optionally overwrites the language key to return all docs in all languages.
since 2.4.0
-
languageKey
possible: de, en, fr, it, …
default: all languages
language key
-
categoryIdsAnd
category-filter (and-related) (multiple):
“&categoryIdsAnd=1&categoryIdsAnd=2&categoryIdsAnd=3”
-
categoryIdsOr
category-filter (or-related) (multiple):
“&categoryIdsOr=1&categoryIdsOr=2&categoryIdsOr=3”
Does only work, if categoryIdsAnd
is not set.
-
categoryTypeId
since v2.5.2
catgegory-type-id(s) (multiple), i.e.:
“&categoryTypeId=4&categoryTypeId=5”
-
roleRightRoleId
Id of a related role (workgroup or personal role).
-
roleRightType
Type of a related roleRight (1 - READ, 2 EDIT). Should normally be used with roleRightRoleId.
-
read
true - only read documents
false - only unread documents
unreadSinceAccountCreation - only unread docs since first login
unreadSinceLastLogin - only unread docs since last login
-
showInvalid
true - get also invalid-documents
-
showInvalidOnly
true - get only invalid-documents
-
showBios
true - get also bio-documents
-
showBiosOnly
true - get only bio-documents
-
showTemplates
true - get also templates
-
showTemplatesOnly
true - get only templates
-
showArchived
true - get also archived docs
-
showArchivedOnly
true - get only archived docs
-
showRemoved
true - get also removed docs
-
showRemovedOnly
true - get only removed docs
-
showLandscapeOnly
true - get only docs in landscape mode
-
hideLandscape
true - do not get docs in landscape mode
-
showReadConfirmationActiveOnly
true - get only docs with active read confirmation
Since v2.5.0
-
hideReadConfirmationActive
true - do not get docs in no read confirmation
Since v2.5.0
-
followerAccountId
documents, the given account id follow. this will be OR-related with “categoryfolloweraccountid”, if both are given.
-
following
if true, currently logged-in account follows documents
-
markedHelpfulByContactId
id of a contact that marked the document-language-version as helpful
-
lastChangedSinceDays
possible: 0, 1, 2, …
last changed within the last count of days
-
lastChangedSince
last changed since “timestamp” in seconds, e.g. 1451904693
-
responsibleContactId
contact-id of a responsible
-
responsible
if true, currently logged-in account is responsible of documents
-
authorshipAccountId
account-id of an “author” (stored in WriteRelation-Table).
Does only work, if authorship
is not set.
-
authorship
possible: true, false
if true, currently logged-in account is author of documents
-
showLanguageVersionReviewedOnly
possible: true, false
default: false
show only reviewed documents.
document is “reviewed” (status-bit REVIEWED (4) is set)
-
hideLanguageVersionReviewed
possible: true, false
default: false
hide reviewed documents
document is not “reviewed” (status-bit REVIEWED (4) is not set)
-
showLanguageVersionReadyOnly
possible: true, false
default: false
show only published documents.
document is “ready” (status-bit READY (1) is set)
-
hideLanguageVersionReady
possible: true, false
default: false
hide published documents
document is not “ready” (status-bit READY (1) is not set)
-
showLanguageVersionCurrentlyInProcessingOnly
possible: true, false
default: false
show only documents that are currently in processing.
document is “currently in processing” (status-bit CURRENTLY_IN_PROCESSING (2) is set)
-
hideLanguageVersionCurrentlyInProcessing
possible: true, false
default: false
hide documents, that are currently in processing.
document is not “currently in processing” (status-bit CURRENTLY_IN_PROCESSING (2) is not set)
-
showLanguageVersionReviewRequestedOnly
possible: true, false
default: false
show only review requested documents
-
hideLanguageVersionReviewRequested
possible: true, false
default: false
review for document is not requested
-
additionalPropertyId
possible: 1, 2, 3, 4, 5, …
id of an additional-property
-
additionalPropertyType
possible: 1, 2, 3, 4, 5
type of an additional-property
1 - NEWS
2 - URGENT
3 - HELP_SECTION_DASHBOARD
4 - HELP_SECTION_DOCUMENT_EDITOR
5 - INFO_CENTER
-
showSnapOnly
possible: true, false
default: false
show only documents with related open snap-task.
-
hideSnap
possible: true, false
default: false
hide documents with related open snap-task.
-
mentionedAccountIdInComment
account-id of a mentioned account within a document-related comment
-
readConfirmationRequested
possible: true, false
default: false
true to get documents I should confirm reading.
Since v2.5.0
-
orderBy
possible:
id - document-id
createTimeInSeconds - document-createtime
languageVersionTitle - version-title
languageVersionLastChangeInSeconds - version-lastchange
sumRating - version-rating
validBeginOrCreateTime - document-validbegin
firstReadTimeAndValidBegin - version-firstreadtime
removed - document-removed
lastReadTime - version-lastreadtime
default: scoring of the searchengine
the order by
-
orderDir
possible: asc, desc
default: asc
the ordering direction
- offset
- limit
-
categoryAggregations
possible: true, false
default: false
whether to build category aggregations or not
-
languageAggregations
possible: true, false
default: false
whether to build language aggregations or not
-
lastChangeAggregations
possible: true, false
default: false
whether to build last change aggregations or not
-
highlightField
field(s) in which to apply highlighting (multiple):
“&highlightField=field1&highlightField=field2”
Produces
application/json
application/xml
com.matterial.mtr.api.object.SearchResult<Document>
- 200 OK
- 400 BAD_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
GET http://localhost:8080/mtr-backend/api/document/search?query=markdown&languageKey=de
Reindex all documents
Clears the document-part of the index and reindexes all documents for the current instance.
URL
PUT/POST <application-url>/api/document/search/reindexall
- 202 ACCEPTED
- 500 INTERNAL_SERVER_ERROR
Permission
ADMINISTRATE_ALL
Sample
PUT http://localhost:8080/mtr-backend/api/document/search/reindexall
Search autocomplete
URL
GET <application-url>/api/document/search/autocomplete
Query parameter
-
query
mandatory: true
url encoded search query
-
allLanguages
possible: true, false
default: false
optionally overwrites the language key to return all docs in all languages
since 2.4.0
-
languageKey
possible: de, en, fr, it, …
default: all languages
language key
-
categoryIdsAnd
category-filter (and-related) (multiple):
“&categoryIdsAnd=1&categoryIdsAnd=2&categoryIdsAnd=3”
-
categoryIdsOr
category-filter (or-related) (multiple):
“&categoryIdsOr=1&categoryIdsOr=2&categoryIdsOr=3”
-
roleRightRoleId
Id of a related role (workgroup or personal role).
-
categoryTypeId
since v2.5.2
catgegory-type-id(s) (multiple), i.e.:
“&categoryTypeId=4&categoryTypeId=5”
-
roleRightType
Type of a related roleRight (1 - READ, 2 EDIT). Should normally be used with roleRightRoleId.
-
read
true - only read documents
false - only unread documents
unreadSinceAccountCreation - only unread docs since first login
unreadSinceLastLogin - only unread docs since last login
-
showInvalid
true - get also invalid-documents
-
showInvalidOnly
true - get only invalid-documents
-
showBios
true - get also bio-documents
-
showBiosOnly
true - get only bio-documents
-
showTemplates
true - get also templates
-
showTemplatesOnly
true - get only templates
-
showArchived
true - get also archived docs
-
showArchivedOnly
true - get only archived docs
-
showRemoved
true - get also removed docs
-
showRemovedOnly
true - get only removed docs
-
showLandscapeOnly
true - get only docs in landscape mode
-
hideLandscape
true - do not get docs in landscape mode
-
showReadConfirmationActiveOnly
true - get only docs with active read confirmation
Since v2.5.0
-
hideReadConfirmationActive
true - do not get docs in no read confirmation
Since v2.5.0
-
followerAccountId
documents, the given account id follow. this will be OR-related with “categoryfolloweraccountid”, if both are given.
-
following
if true, currently logged-in account follows documents
-
markedHelpfulByContactId
id of a contact that marked the document-language-version as helpful
-
lastChangedSinceDays
possible: 0, 1, 2, …
last changed within the last count of days
-
lastChangedSince
last changed since “timestamp” in seconds, e.g. 1451904693
-
responsibleContactId
contact-id of a responsible
-
responsible
if true, currently logged-in account is responsible of documents
-
authorshipAccountId
account-id of an “author” (stored in WriteRelation-Table)
-
authorship
if true, currently logged-in account is author of documents
possible: true, false
review for document is requested
-
showLanguageVersionReviewedOnly
possible: true, false
default: false
show only reviewed documents.
document is “reviewed” (status-bit REVIEWED (4) is set)
-
hideLanguageVersionReviewed
possible: true, false
default: false
hide reviewed documents
document is not “reviewed” (status-bit REVIEWED (4) is not set)
-
showLanguageVersionReadyOnly
possible: true, false
default: false
show only published documents.
document is “ready” (status-bit READY (1) is set)
-
hideLanguageVersionReady
possible: true, false
default: false
hide published documents
document is not “ready” (status-bit READY (1) is not set)
-
showLanguageVersionCurrentlyInProcessingOnly
possible: true, false
default: false
show only documents that are currently in processing.
document is “currently in processing” (status-bit CURRENTLY_IN_PROCESSING (2) is set)
-
hideLanguageVersionCurrentlyInProcessing
possible: true, false
default: false
hide documents, that are currently in processing.
document is not “currently in processing” (status-bit CURRENTLY_IN_PROCESSING (2) is not set)
-
showLanguageVersionReviewRequestedOnly
possible: true, false
default: false
show only review requested documents
-
hideLanguageVersionReviewRequested
possible: true, false
default: false
review for document is not requested
-
additionalPropertyId
possible: 1, 2, 3, 4, 5, …
id of an additional-property
-
additionalPropertyType
possible: 1, 2, 3, 4, 5
type of an additional-property
1 - NEWS
2 - URGENT
3 - HELP_SECTION_DASHBOARD
4 - HELP_SECTION_DOCUMENT_EDITOR
5 - INFO_CENTER
-
showSnapOnly
possible: true, false
default: false
show only documents with related open snap-task.
-
hideSnap
possible: true, false
default: false
hide documents with related open snap-task.
-
mentionedAccountIdInComment
account-id of a mentioned account within a document-related comment
-
readConfirmationRequested
possible: true, false
default: false
true to get documents I should confirm reading.
Since v2.5.0
Produces
application/json
application/xml
List<com.matterial.mtr.api.object.SearchAutocompleteSuggest
>
- 200 OK
- 400 BAR_REQUEST
- 500 INTERNAL_SERVER_ERROR
Permission
Login
Sample
GET http://localhost:8080/mtr-backend/api/document/search/autocomplete
Index document
Reindexes one document by id.
URL
PUT/POST <application-url>/api/document/search/index/<documentId>
Path parameter
Produces
- 202 ACCEPTED
- 500 INTERNAL_SERVER_ERROR
Permission
ADMINISTRATE_ALL
Sample
PUT http://localhost:8080/mtr-backend/api/document/search/index/5
Index document-language-version
Reindexes one document by language-version-id.
URL
PUT/POST <application-url>/api/document/search/index/<documentId>/version/<documentLanguageVersionId>
Path parameter
- documentId
- documentLanguageVersionId
Produces
- 202 ACCEPTED
- 500 INTERNAL_SERVER_ERROR
Permission
ADMINISTRATE_ALL
Sample
PUT http://localhost:8080/mtr-backend/api/document/search/index/5/version/32