Search for a component

Build your search queries

Search queries enable you to search for components stored in FlowerDocs according to various criteria. These search queries are composed as follows:

The different clauses

Select clause

Use selectClause to define the fields to be brought up. It consists of a list of fields values.

Clauses Filter

Use filterClauses to define filters to be applied to the search. A filterClause is composed as follows:

  • criteria: filter criteria
  • filterClauses : les sous-filters

A Filter clause can contain one or more other clauses, enabling you to perform complex queries with logical AND and OR operators. There are two types of Filter clause for this purpose:

  • AndClause : Clause AND, a logical AND operator is applied between its criteria and sub-clauses
  • OrClause : Clause OR, a logical OR operator is applied between its criteria and sub-clauses

Clauses Order

The orderClauses allow you to define the order in which results will be returned. They are composed as follows:

  • name: the name of the criterion on which to sort
  • type: type of criterion
  • ascending: sorting in ascending or descending order

Pagination of results

  • start : Defines the start of the search page
  • max : Defines the maximum number of results to be returned

Examples

The examples below show how to search for a document with a name containing the invoice string.


In search criteria, the CONTAINS operator is not case-sensitive (does not distinguish between upper and lower case), unlike the EQUALS_TO and DIFFERENT operators. So the above example will retrieve documents whose name contains: “invoice”, but also “INVOICE”, “Invoice” …

These examples need to be adapted for each component category.