Configuring default search behavior
This topic outlines how you can set the default mode of operation when a user performs a search, including search string modification.
How FotoWeb searches
FotoWeb performs searches in the indexed archives through Index Manager. Index Manager receives a search string and parameters from FotoWeb. It then performs the search and returns the results to FotoWeb.
FotoWeb provides some parameters to configure these searches on three levels:
- preparing the search string by making required modifications
- telling Index Manager how to perform the actual search
- processing the search results.
From the Tools menu (cogwheel icon) go to Site Configuration > Searching.
A search can return many thousand results. When that is the case, it is not always practical to present users with the entire result set for them to browse. When a search result is large, it means that the search parameters need to be refined so that a smaller and more relevant result set can be retrieved. The Maximum number of hits setting allows FotoWeb to define the maximum size of the data set to be presented to clients in case of large search results. Note that limiting the number of search results will not necessarily give you the most relevant files. It's important to teach your users to be specific when searching so they learn to limit the search results as much as possible.
Note: The Maximum number of hits setting does not always work as expected. This option will be removed in a future release.
Search timeout settings
If Index Manager gets many hits on a search in a relatively large archive, it can take some time to prepare the result set and deliver it to FotoWeb. If the system resources happen to be scarce during this operation, this time can be even longer. There can also be situations when Index Manager is not running or is busy with some other operations and use a long time to respond to FotoWeb. Such situations can be handled by setting the Timeout value. FotoWeb will then wait for a maximum of these seconds and then continue processing without getting any results from Index Manager. The client will be presented with a proper error message and the system resources will be made available for the next request.
Search string modification
These options allow an administrator to choose how literal search strings with no operators in between are combined:
- using AND
- using OR
- Unmodified (as an exact phrase with a space between each two literals)
- Search string modification is only applied when searching using the Search field in the main FotoWeb interface and in the Collection Queries API (not in the FotoWeb Pro interface).
- When search string modification is enabled, it causes certain words, such as "and" and "or" to be removed from the search string.
- Search string modification does not apply to custom search strings in taxonomies.
The search input apples bananas pears is interpreted as follows:
|Option||Actual search expression|
|AND||"apples" AND "bananas" AND "pears"|
|OR||"apples" OR "bananas" or "pears"|
|Do not modify||"apples bananas pears"|
Note that search these rules are only applied to simple search requests, i.e. requests that fulfill all of these criteria:
- A flat sequence of unquoted words with no operators or predicates
- The entire search expression is simple. In other words, search string modification is not applied to "simple" parts of a search expression
Which search expressions are "simple"?
|apples pears -bananas||No, because an operator is used|
|apples bananas pears||Yes|
|apples and bananas||No, because an operator is used|
|apples "bananas" pears||No, because a quoted string is used|
|apples 2014-01-01 ~~ 2015-01-01||No, because a range is used|
|(apples bananas) pears||No, and the expression in parentheses is not treated as "simple", either|
|(apples bananas pears) OR cars||No, and the expression in parentheses is not treated as "simple", either|
|25:apples 25:pears||No, because field predicates are used|
In the above examples that are not simple, AND is inserted wherever a logical operator was omitted, regardless of the search string modification setting. The search string modification setting is used only in the examples that are simple.
Synonym lists, stemming, and phonetic search are features used by Index Manager directly and allow Index Manager to use its built-in features to retrieve better and more precise search results. For more information, see Index Manager documentation.