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. Copy to clipboard
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 | |
Copy to clipboard
|
1.1.2. File gallery | |
Copy to clipboard
1.1.2.1. File gallery to display an image in a smarty templateCopy 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 categoryCopy 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
Copy to clipboard
Copy to clipboard
Copy to clipboard
Copy to clipboard
Copy to clipboard
1.1.4.1. Unix timestampsUnix timestamps may also be used. In Tiki 9+, the following date filters are possible: 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: Copy to clipboard
|
1.1.6. Tracker with categories | |
Copy to clipboard
|
1.1.7. Tracker and logged user items | |
Copy to clipboard
Copy to clipboard
Copy to clipboard
|
1.1.8. Tracker item status | |
Copy to clipboard
|
1.1.9. Tracker items with empty field | |
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. Copy to clipboard
|
1.1.11. Wiki pages with partial match | |
Copy to clipboard
|
1.1.12. Wiki pages with partial match and spaces in string | |
Copy to clipboard
|
1.1.13. Wiki pages with exact match and spaces in string | |
Copy to clipboard
|
1.1.14. Wiki pages with boolean partial matches and spaces in strings | |
Copy to clipboard
|
1.1.15. Users in specific group(s) | |
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 Copy to clipboard
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 | |
|