PluginList filter control block | |
|
Available filters | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Unified Index Field can be used to filter While not being "real" filters, you can use some Unified Index fields to filter results. For example, title_initial or title_firstword will work: {filter field="title_initial" exact="A"} (note: this is case sensitive, {filter field="title_initial" exact="a"} finds nothing)
|
Editable filters (option) | |
Since Tiki20 you can set directly a parameter to change several filter types from "hidden" to "editable" and doing so, select on the fly an existing value of a field and output results. This is very handy to set quickly a modifiable filters instead of using the plugin customSearch that require much more work. Copy to clipboard
|
Boolean Syntax | |
When applying an individual filter more complex logic can also be applied using a Boolean syntax - that applies to all aspects of Unified Search - e.g. when filtering on content you could exclude all items not containing the word "water" by using: Copy to clipboard
|
Empty or Non-empty | |
To filter for a empty or non-empty fields, the syntax might depend on the Search and List from Unified Index engine.
Special case: 'Non-empty' for date fields using Elasticsearch In the specific case of filtering for 'Non-empty' date fields when using Elasticsearch, you need to convert your syntax to filter for a (wide enough) range of valid dates: this way you will match all items having some date and leave out the ones without dates set. Otherwise, Elasticsearch will fail and trigger some error (tested with Elasticsearch 1.x and 2.x).
|
Category (categories) | |
categories vs deepcategoriesThe categories filter parameter will work like an EXACT filter and in the sample below ONLY object within the category 27 will be outputted. You can filter more categories by adding "AND" or "OR" operator. Will output category 27 objects Copy to clipboard
Will output category 27 and children objects Copy to clipboard
Not categorised for categoryTiki has a specific filter for object that are not categorised: "orphan" You will find an example for this usage down below. List of sub-categoryTo list the sub-categories under a category you need to set You will find an example for this usage down below. |
Peculiarities for Elasticsearch | |
When using Elasticsearch as the Unified Search Index, you need to be aware of a few peculiarities:
|
Examples | |
1.1.1. Basic | |
Basic usage Copy to clipboard
|
1.1.2. File gallery | |
File gallery Copy to clipboard
1.1.2.1. File gallery to display an image in a smarty templateDisplay image Copy to clipboard
|
1.1.3. Categories | |
1.1.3.1. Not categorised objectsYou can list uncategorized objects. {CODE(caption="List the object not categorized"}
1.1.3.2. Output the list of (sub)categories within a categoryList all the categories under category 15 Copy to clipboard
|
1.1.4. Date ranges | |
Parameters to, from and gap:
Note that the upper boundary of the range is not included in the search
Tiki 15+ Copy to clipboard
Tiki 15+ Copy to clipboard
Copy to clipboard
Tiki 24.1+ Copy to clipboard
Tiki 26 Copy to clipboard
1.1.4.1. Unix timestampsUnix timestamps may also be used. In Tiki 9+, the following date filters are possible: Tiki 9+ Copy to clipboard
|
1.1.5. Numeric ranges | |
Note that the upper boundary of the range is not included in the search When you use Elasticsearch as the unified search index, you can reuse the same parameters to, from and gap that are shown above for Date ranges: Tiki 15 Copy to clipboard
|
1.1.6. Tracker with categories | |
Filter in a specific tracker Copy to clipboard
|
1.1.7. Tracker and logged user items | |
Filter in a specific tracker and the logged user item(s) - single user selection Copy to clipboard
Filter in a specific tracker and the logged user item(s) - single user selection, username contain space(s) Copy to clipboard
Filter in a specific tracker and the logged user item(s) - multiple user selection Copy to clipboard
|
1.1.8. Tracker item status | |
Filter by tracker item status Copy to clipboard
|
1.1.9. Tracker items with empty field | |
Filter tracker items having an empty field (exact match) Copy to clipboard
|
1.1.10. Tracker items title that start with the letter B | |
Note: This is the object title, for the tracker items it is set in the fields (list) parameters. Display the items with a title that start with the letter B Copy to clipboard
|
1.1.11. Wiki pages with partial match | |
Filter wiki pages with a partial match with some text string such as 'foo' Copy to clipboard
|
1.1.12. Wiki pages with partial match and spaces in string | |
Filter wiki pages with a partial match with some text string containing spaces such as 'foo bar' Copy to clipboard
|
1.1.13. Wiki pages with exact match and spaces in string | |
Filter wiki pages with an exact match with some text string containing spaces such as 'foo bar' Copy to clipboard
|
1.1.14. Wiki pages with boolean partial matches and spaces in strings | |
Filter on literal text with spaces in Copy to clipboard
|
1.1.15. Users in specific group(s) | |
Filter users in a specific group Copy to clipboard
|
1.1.16. Related items | |
In this example we want to find all objects related to trackeritem itemId 42 related using the qualifier Related objects Copy to clipboard
Objects related to a wiki page Copy to clipboard
|
Grouping filters together for the purpose of OR searching instead of AND | |
This permits an OR query on two fields Copy to clipboard
This allows searching for a task assigned to the user devsecops or with devsecops in the summary. This is available since Tiki26: https://gitlab.com/tikiwiki/tiki/-/commit/23570b601811176840897824f6e66427ab00563e |
Related | |
For a list of available types: Search and List from Unified Index |
All the LIST Plugin control blocks | |
|