Kernel::WebApp::Util::DocumentSearch::Article

NAME

Kernel::WebApp::Util::DocumentSearch::Article – Wrapper for ticket document search type.

has TicketObject

Attribute that holds the ticket object.

has TicketHook

Attribute that holds the ticket hook.

has ChildDocumentSearchTypes

The /ChildDocumentSearchTypes() attribute holds the child document search types.

BusinessObjectType()

The /BusinessObjectType() which the module belongs to.

ResultFields()

The /ResultFields() method should return the required fields for the different document search types.

Performs a search on all article indices and combines their results into one hash reference.

Returns:

    {
        ArticleChat => {
            'SearchAfter' => [ '4.0277452', undef ],
            'Label'       => 'Articles (MIME)',
            'Hits'        => 7,
            'Documents'   => [
                {
                    'Score'         => '4.0277452',
                    'DocumentID'    => 123,
                    'ArticleID'     => 123,
                    'DocumentTitle' => 'MIME Title',
                    'Subject'       => 'First MIME subject',
                    'TicketNumber'  => '2019042354000037'
                    'TicketID'      => 123,
                    'Highlight'     => {
                        'Subject' => ['First MIME subject <em>text</em>!']
                    },
                },
            ]
        },
        ArticleChat => {
            'SearchAfter' => [ '0.07266441', undef ],
            'Label'       => 'Articles (Chat)',
            'Hits'        => 7,
            'Documents'   => [
                {
                    'Score'         => '4.0179528',
                    'DocumentID'    => 234,
                    'ArticleID'     => 234,
                    'DocumentTitle' => 'Chat Title',
                    'Subject'       => 'First chat subject',
                    'TicketNumber'  => '2019042354000037'
                    'TicketID'      => 234,
                    'Highlight'     => {
                        'ChatMessageList.MessageText' => ['First chat message <em>text</em>!']
                    },
                },
                ...
            ]
        },
        ArticleSMS => {
            'SearchAfter' => [ '0.07266441', undef ],
            'Label'       => 'Articles (SMS)',
            'Hits'        => 7,
            'Documents'   => [
                {
                    'Score'         => '0.10567498',
                    'DocumentID'    => 345,
                    'ArticleID'     => 345,
                    'DocumentTitle' => 'SMS Title',
                    'Subject'       => 'First SMS subject',
                    'TicketNumber'  => '2019042354000037'
                    'TicketID'      => 345,
                    'Highlight'     => {
                        'Text' => ['First <em>text</em>']
                    },
                },
                ...
            ]
        },
    }

TransformDocumentData()

The /TransformDocumentData() method transforms the given document data for the frontend.

ChildDocumentSearchTypes()

The /ChildDocumentSearchTypes() method returns the child document search type for the given document search type.

PRIVATE INTERFACE

_BuildConfigObject()

The /_BuildConfigObject() method retrieves the config object.

_BuildTicketObject()

The /_BuildTicketObject() method retrieves the ticket object.

_BuildTicketHook()

The /_BuildTicketHook() method constructs the ticket hook.

_BuildChildDocumentSearchTypes()

The /_BuildChildDocumentSearchTypes() method gets child document search types.

Scroll to Top