Differences

This shows you the differences between two versions of the page.

Link to this comparison view

documentation:white-pages:latest:config_quick_search [2018/04/18 14:40] (current)
Line 1: Line 1:
 +====== Quick search ======
  
 +<​note>​Configuration file: use [[config_general#​configuration_files|White-Pages'​ local configuration file]]</​note>​
 +
 +The quick search feature allows to search on multiple attributes (attribute1 or attribute2 or ...) with a substring matching (attribute=*query*) by default or an exact matching, see ''​$quick_search_use_substring_match''​ below. The quick search input is located in menu bar.
 +
 +===== Activation =====
 +
 +Enable or disable this feature:
 +<file php>
 +$use_quick_search = true;
 +</​file>​
 +
 +===== Search filter =====
 +
 +Define on which LDAP attributes the search will be done:
 +<file php>
 +$quick_search_attributes = array('​uid',​ '​cn',​ '​mail'​);​
 +</​file>​
 +
 +<​note>​With this example, the search filter for query ''​test''​ will be ''​(|(uid=*test*)(cn=*test*)(mail=*test*))''</​note>​
 +
 +===== Exact matching =====
 +
 +By default, as shown in the example above, the query is used as substring match. You can change this by forcing exact matching:
 +<file php>
 +$quick_search_use_substring_match = false;
 +</​file>​
 +
 +<​note>​With this example, the search filter for query ''​test''​ will be ''​(|(uid=test)(cn=test)(mail=test))''</​note>​