The Search Dialog is reached from the Search menu and displays a window that allows a search to be created using a variety of tools and saved (under a Search Filter Name) for future use. The Search Filter Names are displayed on the Search menu for quick access (hovering over the search filter name will display the text filter string).
The Search Dialog Window is shown and each element described (left to right, top to bottom) in the following sections:
This name identifies the search and allows it to be retained for subsequent use using the Save button or selected from the Search Filter List on the Search Dialog menu. The name may be 1 - 50 characters in length and may not contain space, dot or comma. Descriptive names should be used to allow recall of the search filter's functionality.
When intially opened, the Search Dialog is empty (set to default values). To create a new filter enter the new Search Filter Name as shown highlighted above and enter or modify the various filter fields.
Alternatively, to load an existing filter select its name from the drop down list.
To save an existing filter under a new name simply load the filter, edit or change it as required, change the Search Filter Name and then use the Save button.
Search Filters are shared between all LDAPviewer windows.
Defines the base DN from which the search will start. On initial entry or when creating a new Search filter this field is set to the currently selected entry in the Primary DIT. Edit or replace as necessary. If Aliases exist in the path to this base DN then the Alias Options determine how this base is found and should be carefully reviewed.
Note: Security details used for the search are those defined for the Primary DIT in the Connection Profile.
These options determine how the search treats Alias entries prior to or during the search operation. By default they are both unset which indicates that alias dereferencing will never occur (corresponding to Never in the Connection Profile).
This will cause the search function to NOT resolve (or Dereference) Alias entries when finding the base DN for the search but will resolve (Deference) Alias entries during the search operation. This corresponds to Searching in the Connection Profile.
This will cause the search function to resolve (or Dereference) Alias entries when finding the base DN for the search but will NOT resolve (Deference) Alias entries during the search operation. This corresponds to Finding in the Connection Profile.
Notes:
If both fields are checked then the search will always dereference aliases, this corresponds to Always in the Connection Profile. If both fields are unchecked then the search will never dereference aliases, this corresponds to Never in the Connection Profile.
The Alias Dereference options in the Connection Profile or as modified by the Options menu are ignored when using the Search dialog, but are used when using the Quick Search bar.
When aliases are known or suspected to exist within a search base DN the Alias Dereferencing value can significantly affect both the displayed result format and the number of entries returned. See Alias Handling in Searches for more inormation on this topic.
Select the appropriate value from the drop down menu. Search Base DN Level will search only at the same level in the DIT hierarchy (it will search only siblings and not children) of the Base DN. Search Next Level will search at the Base DN Level and the first child level below the entries at the Base DN. Search Full Subtree will search at the Base DN Level and all child entries (and child entries of children) below that.
To maximise performance always select the minimum level necessary to find the desired entry/Entries.
The default is None which will return no attributes from the found entries. If specific attributes should be returned then a return attribute set should be defined.
If the required return attribute set has not been defined, confinue to create the search filter, Save the filter, dismiss this window (with Cancel) create the Return Attribute set. Return to this Search Dialog, load the saved filter and select the newly created return attribute set from the drop-down menu and re-save this filter.
The Search Dialog window provides two features to assist in the creation of a search. Build Filter allows creation of a single or multi-parameter search using a simple template. Elements may be added or deleted as required. Existing filters may be combined with the current filter. Text Filter allows the user to create a text filter manually, paste one from the clipboard or edit a filter built using the Build Filter method.
The Build Filter panel allows the user to create a filter on a single line by selecting the required attribute (from a drop-down list), the test operation (from a drop-down list) and entering the search-value. Filters may be added or deleted and may be combined using an AND, NOT AND, OR or NOT OR operation.
The best way to understand what can look like a complex process is to quickly scan each column description and then go to the Examples which show the process in action for seaches varying from the very simple to complex.
Each line in the table may be one of a Single Filter, a Join Filter or a Group Expression.
A Single Filter line allows a simple search expression to be created from an attribute, a test expression and a search value.
A Join Filter line allows a simple search expression to be created from an attribute, a test expression and (optional) seaarch value and additionally allows for individual filters to be combined using AND, NOT AND, OR or NOT OR operations.
A Group Expression line is used to grpup two or more sets of expressions using an AND, NOT AND, OR or NOT OR operation.
The Build Filter panel contains a number of columns which, depending on the line type are either enabled (they have a white background) or disabled (they have a grey background). In all cases hovering over a white (enabled) column will indicated the editing action required as shown:
The group column is only enabled when either the Group button is clicked or when an existing filter is added to the filter using the Filter button. The drop-down menu defines how this group relates to all previously defined filters (or groups of filters). It offers 4 choices; AND, NOT AND, OR and NOT OR.
This defines how all subsequent filters (until a new group is defined) are joined. It may take the values AND, NOT AND, OR and NOT OR. Exceptionally, a single line filter may take an empty join value.
Select from the alphabetically ordered drop-down menu the attribute that is to be tested in this filter. Entering the first character of the attribute name will position the drop-down menu to the first attribute starting with that character and minimizes scrolling.
Select the search function from the drop down-down menu. A significant number of operation are provided:
Equal To match, the value entered in the Search Value Column must completely match the value. For example, if the value entered in Search Value with this function is ton it will not match if the attribute contains tons, tonne or tonnes or aton.
Attribute Function Search Value sn Equal To smith ; generates a filter of the form (sn=smith)
Not Equal To match, the value entered in the Search Value Column must not match the value.
Attribute Function Search Value sn Not Equal To smith ; generates a filter of the form (!(sn=smith))
Present match, the attribute (irrespective of value) must be present in an entry. The contents of the Search Value Column are ignored.
Attribute Function Search Value sn Present ; generates a filter of the form (sn=*)
Not Present match, the attribute must not be present in an entry. The contents of the Search Value Column are ignored.
Attribute Function Search Value sn Not Present ; generates a filter of the form (!(sn=*))
Beginning With match, an attribute value in an entry must start or begin with the contents of the Search Value Column.
Attribute Function Search Value sn Beginning With smi ; generates a filter of the form (sn=smi*)
Not Beginning With match, an attribute value in an entry must not start or begin with the contents of the Search Value Column.
Attribute Function Search Value sn Not Beginning With smi ; generates a filter of the form (!(sn=smi*))
Ending With match, an attribute value in an entry must precisely end (or terminate) with the contents of the Search Value Column.
Attribute Function Search Value sn Ending With ith ; generates a filter of the form (sn=*ith)
Not Ending With match, an attribute value in an entry must not precisely end (or terminate) with contents of the Search Value Column.
Attribute Function Search Value sn Not Ending With ith ; generates a filter of the form (!(sn=*ith))
Containing match, an attribute value in an entry must contain the contents of the Search Value Column anywhere, including the start or end.
Attribute Function Search Value sn Containing smi ; generates a filter of the form (sn=*smi*)
Not Containing match, an attribute value in an entry must not contain the contents of the Search Value Column anywhere, including the start or end.
Attribute Function Search Value sn Not Containing smi ; generates a filter of the form (!(sn=*smi*))
Greater Than Or Equal To match, an attribute value in an entry must be greater than or equal to the contents of the Search Value Column.
Attribute Function Search Value sn Greater Than or Equal To 100 ; generates a filter of the form (sn>=100)
Note: >= uses a lexiographic comparison on string attributes which may not yield the expected result. In the case of integer attributes they require an ordering matchingRule which is not universal with integer attributes.
Not Greater Than Or Equal To match, an attribute value in an entry must not be greater than or equal to the contents of the Search Value Column.
Attribute Function Search Value sn Not Greater Than or Equal To 100 ; generates a filter of the form (!(sn>=100))
Note: >= uses a lexiographic comparison on string attributes which may not yield the expected result. In the case of integer attributes they require an ordering matchingRule which is not universal with integer attributes.
Less Than Or Equal To match, an attribute value in an entry must be less than or equal to the contents of the Search Value Column.
Attribute Function Search Value sn Less Than or Equal To 100 ; generates a filter of the form (sn<=100)
Note: <= uses a lexiographic comparison on string attributes which may not yield the expected result. In the case of integer attributes they require an ordering matchingRule which is not universal with integer attributes.
Not Less Than Or Equal To match, an attribute value in an entry must not be less than or equal to the contents of the Search Value Column.
Attribute Function Search Value sn Less Than or Equal To 100 ; generates a filter of the form (!(sn<=100))
Note: <= uses a lexiographic comparison on string attributes which may not yield the expected result. In the case of integer attributes they require an ordering matchingRule which is not universal with integer attributes.
Similar To match, an attribute value in an entry must be similar to the contents of the Search Value Column as determined by the LDAP servers algorithm (if implemented).
Attribute Function Search Value sn Similar To smyth ; generates a filter of the form (sn~=smyth)
Note: ~= (sounds-like) search algorithms are not defined in the LDAP standards and therefore not uniformly implemented in LDAP servers. Where they are implemented using, say, a Soundex style algorithm, they typically require the target attribute to have an optimized index (approx) to give acceptable performance.
Not Similar To match, an attribute value in an entry must be not similar to the contents of the Search Value Column as determined by the LDAP servers algorithm (if implemented).
Attribute Function Search Value sn Not Similar To smyth ; generates a filter of the form (!(sn~=smyth))
Note: ~= (sounds-like) search algorithms are not defined in the LDAP standards and therefore not uniformly implemented in LDAP servers. Where they are implemented using, say, a Soundex style algorithm, they typically require the target attribute to have an optimized index (approx) to give acceptable performance.
Double-click to add the search value or expression. Note: As previously noted when the filter is created any wild cards required by the function will be automatically added. A '*' (or ')', '(' and '\') entered in this field will be treated as a search literal and automatically escaped when the search filter is created.
In this example a single filter is created as shown;
Notes:
This filter will return all entries below the base that have an sn attribute (irrespective of its value).
Because there is only a single expression the Join column can be left blank and is the only time any empty value is allowed.
If a negative version of this search is required then the Not form of the Function should be used - in the example case this would be Not Present.
The search expression shown will generate the text filter:
(sn=*)
This example illustrates a two expression search:
Notes:
The search will return all entries below the base DN which have an sn attribute (irrespective of its value) AND have a cn attribute that starts with joh (case insensitive and may contain any other following text).
The individual expressions are Joined using AND.
Any number of expression may be added by clicking the Add button and will be combined using the AND operation of the Join column. If a new expression is to be combined using, say, an OR then a new Group must be created.
If a negative version of any search expression is required then the Not form of the Function should be used - in the example case this would be Not Present or Not Beginning With.
If a negative version of both search expression is required then the AND NOT form of the join may be used. Alternatively, the Not form of each Function may be used. While the text filter form generated will differ the search results will be the same.
The search expressions shown will generate the text filter:
(&(sn=*)(cn=ith*))
This filter illustrates combining different search expressions using the group feature as shown:
Notes:
This search combines two multi-expression searches using an OR operation.
The first two line expression set is described in Example 2
The second multi-expression search is combined using the GroupExpression which in the example case is OR.
The Group may be created in one of two ways:
Clicking the Group button will add an empty Group Expression followed by an empty Join line. Clicking Add will generate an empty Single line. The various columns should set as shown (or required).
Alternatively, the first and second set of expressions may be created and saved as separate filters. The two filters may then be combined by loading any filter and using the Filter button to add the second (saving to a new filter name as required). This method is most useful where both sets of expressions may be used separately but also in combination.
The search expressions shown will generate the text filter:
(|(&(sn=*)(cn=ith*))(!(&(mail=*)(!(givenName=*ith)))))
This feature will display either the text version of any filters constructed using the Build Filter panel or an empty window (if no filter has been created in the Build Filter panel) in which the complete text filter can be entered (or pasted from the clipboard). Note: Syntax validation but no logical checking is performed on the data entered using this panel.
Right-clicking in this panel will bring up a pop-up menu that allows cut, copy or paste to/from the system clipboard as shown:
The Build Filter panel supports all the buttons. The Text Filter panel supports only the Save button and all others are disabled when it selected.
Adds an empty filter line immeditely below the currently selected line. If no line is selected the click is silently ignored. The line added will depend on context. If the currently selected line is a Normal or Join line (enabled Join column) then a new Normal line is added. If the Line is a Group line (Group column enabled) then a new Join line is added and the current Join condition is preserved but the rest of the line is empty.
Deletes the currently selected line. If no line is selected the click is silently ignored.
Adds an empty Group line (the Group column is enabled) followed by an empty Join line (the Join column is enabled).
Displays a dialog which allows an existing filter to be added immediately following the currently selected line. If no line is selected the click is silently ignored.
Saves the current filter definition to the Search Filter Name.
Dismisses this window and initiates a search operation using the current parameters. If there are outstanding (unsaved) changes the user will be prompted to save them before exit as shown:
Dismisses the window. If there are outstanding (unsaved) changes the user will be prompted to save them before exit.
Displays this help page.
© LV Project 2016. Creative Commons Attribution 4.0 International License.