This extension replace the standard global search with a faster and more accurate search.
|2021-06-02||1.2.1|| * Compatibility iTop 2.7 and 3.0
* Fix CSS
|2021-05-25||1.2.0||* Compatibility iTop 2.7 and 3.0|
|2021-05-25||1.1.4|| * Prevent indexation concurrency
* Fix link for class drill down
* fix script refresh-search-index.cli.php to rebuild fully the index
* fix script populate-search-index.cli.php to populate the index
|2020-08-25||1.1.1|| - Admin console
- populate script more robust (memory)
- Default configuration moved to XML
- Avoid reading blobs from database
- Exclude classes by configuration
|2020-06-23||1.0.13|| - for iTop 2.7.0 and above
- Fix searches with some reserved characters
- Search admin menu
|2019-02-04||1.0.11||- Fix broken related link|
|2019-01-09||1.0.10|| - Fix the friendly name limit
- Fix Scheduled task
- Fix class name in tests
- Add Combodo license
|2019-01-09||1.0.9|| - Fix memory limit
- Fix Case log indexation
- Fix email search
- Limit the friendlyname size to fit in the DB
|2018-07-31||1.0.8|| - Better indexation
- Better search
- Support only InnoDB and BOOLEAN mode
- Display related objects on search
- Display matching fields
- Admin page : for re-indexation
- Class drill-down
- Debug mode
|2018-01-19||0.0.3|| - Better indexation when updating data
- 'populate_search.php' uses the configuration for the type of table to create (MyISAM or InnoDB)
- No constraint on MySQL (MyISAM must be used in version before 5.6)
|2018-01-09||0.0.2|| - Better error management.
- No indexation at setup (performance issues).
- 'populate_search.php' have to be used to create an InnoDB fulltext index.
- MySQL >= 5.6
|2017-12-14||0.0.1||- First version experimental.|
Use the Standard installation process for this extension.
|object_weight_factor||array||Weight factor to apply for a given object name (format: 'classname' ⇒ 'value') the values can vary from 0 to 10 generally (0 means no results for this class). The default is 1 for every class not specified. The modification of this parameter needs a complete re-indexation of the database.||
array( 'Organization' => 2.0, 'Person' => 1.5, 'Location' => 1.2, 'SLT' => 0.8, )
|sentence_weight_factor||float||Weight factor for searches with multiple words matching exactly the list of words in that order.||1000.0|
|mandatory_weight_factor||float||Weight factor for searches with all the words of the search matching at least once.||50.0|
|start_with_weight_factor||float||Weight factor for searches with one word matching the beginning.||0.5|
|max_interactive_index_update_time_in_sec||integer||Time in seconds allowed for direct indexation update on change.||5|
|background_index_refresh_period_in_min||integer||Period in minutes for background indexation.||1|
|background_max_indexation_time_in_min||integer||Execution time limit in minutes for background indexation.||0.8|
|background_index_full_rebuild_enabled||boolean||Allow daily rebuild of the index. Only useful if automatic archiving is done.||false|
|background_index_full_rebuild_time||hour||Starting hour of the full rebuild of the index.||'01:30'|
|background_index_full_rebuild_week_days||weekdays||List of days for index rebuild.||'sunday'|
|excluded_classes||array||List of classes excluded from search.|||
'combodo-fulltext-search' => array ( 'object_weight_factor' => array ( 'Organization' => 2.0, 'Person' => 5.0, 'Location' => 1.2, 'SLT' => 0.8, ), 'sentence_weight_factor' => 10.0, 'mandatory_weight_factor' => 2.0, 'start_with_weight_factor' => 0.5, // Max delay to re-index in realtime, // above this it flags index entries as out of date, // they will be computed by the background task 'max_interactive_index_update_time_in_sec' => 5, // Background task periodicity, should be more than iTop cron periodicity 'background_index_refresh_period_in_min' => 5, // Background task max time per run 'background_max_indexation_time_in_min' => 1, // identical to run refresh-search-index.cli.php in a system cron, // useful if you don't have system access 'background_index_full_rebuild_enabled' => false, // deactivated by default 'background_index_full_rebuild_time' => '11:00', 'background_index_full_rebuild_week_days' => 'wednesday', ),
Create, update or delete object
When ever a user create, update or delete an object in iTop, the extension will recompute the fulltext search indexes. If it cannot do it within
max_interactive_index_update_time_in_sec second, it flags out-of-date indexes and they will be processed by the itop-cron using a background task.
You may see that warning message when you change an organization name for example, as it is present in most iTop objects, so a lot of indexes will have to be updated, more than what can be processed in a user acceptable delay
Searching for one word When searching for a single word (example: demo) the following searches are done:
Searching for multiple words
When searching for multiple words, (example: user-level lock) the following searches are done:
- is a keyword to exclude a word, it is replaced by
_ which is another keyword to represent any single character.
Each search is bringing points calculated by MySQL fulltext search, which are then weighted with the configuration parameters set.
To ensure that the search will be efficient within your iTop, there are additional actions for Administrator users:
Debugaction on those “sampling searches”.
There is an administrator menu, which allow to
Read carefully the text near the checkbox, it is refreshed based on the check status.
background_index_refresh_period_in_minminutes for a maximum duration of
background_max_indexation_time_in_minminutes before stopping until the next run.
Consequences of your choices:
A better alternative to using this administrative page within iTop, is to run in CLI the below scripts:
wait_timeoutis around 28 800 before running
To prevent situation where the script and the cron would both try to recompute indexes at the same time, we have used a MySQL lock.
Some distribution, overwrite the default MySQL/MariaDB value for the
wait_timeout parameter and put 600 (seconds). That delay is not enough to populate indexes for a big database, as a result, the script will return “MySQL has gone away” which is the answer to the unlock request done by the script when it finishes. In reality, the work was done, indexes have been recomputed, the error is misleading, it's just the lock which could not be released, because after
wait_timeout seconds of inactivity on that session, MySQL/MariaDB has decided it was useless to wait more, and released the lock.
⇒ To get rid of that error, just restore default value for
wait_timeout (28 800).
Just type the words in the global search field, then
enter or click on the magnifier icon to get the result :
+at the beginning of required word
will search for User Requests which contain mandatorily 'PHP' and maybe 'error'
-at the beginning of excluded word
will search for User Requests which contain 'PHP' but not 'closed' (this exclude all UserRequest with status=closed)
*at the end of an incomplete word
will search for Organization which contain a word starting with 'Combo' and the exact word 'Grenoble'. This is useless in single word search, as it does it automatically.
By default the search searchs on all Classes with category searchable, including abstract classes, such as Ticket, Contact or FunctionalCI.
<class-name>:at the beginning of a search pattern to limit the search to objects of this classe or one of its descendants
will search for any FunctionalCI which contains “combodo”, so the returned objects can be Server, PC, Enclosure,…
The class name can be the internal name (like FunctionalCI) of the display name in the current language used (like CI fonctionnel).