Defining search operations

Released: HTML page

You can use the Search feature to find saved items in the repository, provided that you have the appropriate authorizations. Based on their area of responsibility, users frequently search for the same items, which they can find quickly by using selected properties and categories. You can simplify the search process by providing users with a predefined search operation. In the search operation, you have already defined the values that your users otherwise have to enter repeatedly.

To make a predefined search operation available, transfer the parameters of the URL.

You can call the search operation in two ways:

  • Call the search operation without specifying a specific repository. In this case, the last selected repository is used for the search operation. However, the user can change the repository at any time.

  • You call the search operation for a specific repository, which means that the user can no longer change the repository.

Searching without specifying a repository

If you want to define the search operation without specifying a repository, proceed as follows:

When you open the URL /dms, you are notified of the URL for the search operation, including the available parameters, with the following HTTP response:

Request

GET /dms
Accept: application/hal+json

The JSON object for the root resource contains the search link relation with placeholders for the values used to perform the search for DMS objects.

Response

{
        _links: {
                search: {
                        href: "/dms/s/{?objectdefinitionids,fulltext,properties,showresultlist,repositoryid}"
                        templated: true
                }
        }
}

Searching in a predefined repository

If you want to define a search operation for a specific repository, you must first determine the URL for the repository. In the chapter Determining a repository, you can learn how to determine the URL for a repository.

Once you have determined the URL for the repository (for example: /dms/r/dee1f3d3-eae8-5d9d-84d8-2d758c5ddc27) and called the URL using HTTP GET, you receive the following result, which contains the repository-specific URL for the search operation:

Request

GET /dms/r/dee1f3d3-eae8-5d9d-84d8-2d758c5ddc27
Accept: application/hal+json

The JSON object for the repository contains the search link relation with placeholders for the values used to perform the search for DMS objects.

Response

{
        _links: {
                search: {
                        href: "/dms/r/dee1f3d3-eae8-5d9d-84d8-2d758c5ddc27/s/{?objectdefinitionids,fulltext,properties,showresultlist}"
                        templated: true
                }
        },
        id: "dee1f3d3-eae8-5d9d-84d8-2d758c5ddc27"
}

Specifying response control parameters

You control the system response for searching and displaying using the following parameters:

Parameter

Description

showresultlist

If values are available for a search operation, this specifies whether the search operation is executed directly and the results of the search query are displayed (default value: false).

repositoryid

Defines the repository ID.

For descriptions of the objectdefinitionidsfulltext and properties parameters, see the Defining the parameters for a search operation chapter.

Note

You can also define multiple values for a parameter, provided that facets are displayed for the corresponding property. If no facets for viewing have been defined for the property, the last value is always adopted for the search operation.

Opening the URL for the search operation

Once you have created a URL for the search operation, you can then call the results using the corresponding requests.

Request without a repository ID:

Request

GET /dms/s/?objectdefinitionids=["RECH"]&fulltext=Mustermann&properties={"227":["KND001"]}&repoid=dee1f3d3-eae8-5d9d-84d8-2d758c5ddc27
Accept: text/html

Request with a repository ID:

Request

GET /dms/r/dee1f3d3-eae8-5d9d-84d8-2d758c5ddc27/s/?objectdefinitionids=["RECH"]&fulltext=Mustermann&properties={"227":["KND001"]}
Accept: text/html

The search operation in the Search feature is then loaded with the transferred parameters as a result.

Note

You must encode the URL parameters (e.g. spaces in %20). The length of the encoded query parameter is limited to 2000 characters.

Use cases for various search queries (not encoded):

  • Searching across a category: Add the part objectdefinitionids=["<category ID>"] to the URL.

https://<Base address>/dms/r/<RepositoryID>/s/?fulltext=5353&objectdefinitionids=["RECH"]

  • Searching across several categories: Add the part objectdefinitionids=["<category ID>","<category ID>"] to the URL.

https://<Base address>/dms/r/<RepositoryID>/s/?fulltext=5353&objectdefinitionids=["RECH","AUFT"]

  • Searching for PDF documents restricted to the file type: Complete the URL by the part properties={"property_filetype":["<File type>"]}.

https://<Base address>/dms/r/<RepositoryID>/s/?fulltext=test&properties={"property_filetype":["pdf"]}

  • Searching for an alphanumeric property: Add properties={"227":["KND001"]} (not encoded) to the properties parameter in the URL to find the property field with the RID 227 (customer number) and the value "KND001" as the customer number.

https://<Base address>/dms/r/<RepositoryID>/s/?objectdefinitionids=["RECH"]&fulltext=&properties={"227":["KND001"]}

  • Searching for multiple properties: Add properties={"227":["KND001"],"231":["|-100"]} (not encoded) to the properties parameter in the URL to find the property field with the RID 227 (customer number) with the value "KND001" and the property field with the RID 231 (invoice amount) with a value lower than or equal to 100.

https://<Base address>/dms/r/<RepositoryID>/s/?objectdefinitionids=["RECH"]&fulltext=&properties={"227":["KND001"],"231":["|-100"]}