OTRS::SphinxSearch - Implementation of the OTRS search engine by Sphinx search
version 0.011
use OTRS::SphinxSearch; my $sphinx_search = OTRS::SphinxSearch->new( config => $otrs_sphinx_search_config_part, # Optional ); ... some manipulation with request data ... my $results = $sphinx_search->search( SortBy => $sort_by, # Optional, default is 'create_time' OrderBy => $order_by, # Optional, default is 'DESC' Result => 'ARRAY' | 'COUNT', # Default is 'ARRAY' %Param, # Required );
The module is designed as an alternative to the native search OTRS. It serves to generate search queries from OTRS to the full-text search engine Sphinx through module Sphinx::Search. Using this module requires some changes in the OTRS controller: Modules/AgentTikketsearh.pm. These changes relate mainly to the processing of input data. For instance queue names are converted to their IDs. All this is true if you do not want something exotic. Config example of the Sphinx and important parts of the controller are located in the directory "samples/".
Create new OTRS::SphinxSearch object
Returns: self object
Returns: an array with results or count founded results
Get start and stop time points in UNIX format from calendar format start and stop points
Returns: Self object with hash refs $self->{time_start} $self->{time_stop}
Get start and stop time points before or after some time
Minimum configuration required to submit name of the index which will be used for searching. Before using this module you will be needed create index. Sample of the Sphinx config you can find in samples/ directory. Also you will be needed override the method which will be get and parse fields of search form. The name of this module is AgentTicketSearch.pm (trimmed version you can look in samples/ directory).
The Sphinx::Search version 0.28 or highter.
Sphinx:Search
Time::Piece
Iurii Shikin <shikin@cpan.org>
This software is copyright (c) 2014 by REG.RU LLC.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install OTRS::SphinxSearch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OTRS::SphinxSearch
CPAN shell
perl -MCPAN -e shell install OTRS::SphinxSearch
For more information on module installation, please visit the detailed CPAN module installation guide.