Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting of entries in Webservice Debugger #1551

Closed
1 task done
bschmalhofer opened this issue Jan 22, 2022 · 1 comment
Closed
1 task done

Sorting of entries in Webservice Debugger #1551

bschmalhofer opened this issue Jan 22, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bschmalhofer
Copy link
Contributor

bschmalhofer commented Jan 22, 2022

Entries in the Webservice Debugger are sorted per default by creation time. But it is often the case that there are multiple requests per second and it is not obvious which request came first. An example is the autocompletion search with Elasticsearch. This search fires three requests per typed character. When typing arbitrary characters, the following debug entries were shown as the latest entries:

$VAR1 = {
  'Filter' => [],
  'IndexName' => 'ticket',
  'Limit' => '10',
  'Must' => [
    {
      'query_string' => {
        'fields' => [
          'Title',
          'TicketNumber',
          'ArticlesExternal.From',
          'ArticlesExternal.To',
          'ArticlesExternal.Body',
          'ArticlesExternal.Subject',
          'AttachmentsExternal.Content',
          'AttachmentsExternal.Filename',
          'ArticlesInternal.From',
          'ArticlesInternal.To',
          'ArticlesInternal.Body',
          'ArticlesInternal.Subject',
          'AttachmentsInternal.Content',
          'AttachmentsInternal.Filename'
        ],
        'query' => '*asdfghj*'
      }
    }
  ],
  'Return' => '',
  'Sort' => [
    {
      '_score' => 'desc'
    },
    {
      'Created' => 'desc'
    }
  ]
};

and

$VAR1 = {
  'Filter' => [],
  'IndexName' => 'ticket',
  'Limit' => '10',
  'Must' => [
    {
      'query_string' => {
        'fields' => [
          'Title',
          'TicketNumber',
          'ArticlesExternal.From',
          'ArticlesExternal.To',
          'ArticlesExternal.Body',
          'ArticlesExternal.Subject',
          'AttachmentsExternal.Content',
          'AttachmentsExternal.Filename',
          'ArticlesInternal.From',
          'ArticlesInternal.To',
          'ArticlesInternal.Body',
          'ArticlesInternal.Subject',
          'AttachmentsInternal.Content',
          'AttachmentsInternal.Filename'
        ],
        'query' => '*asdfghjk*'
      }
    }
  ],
  'Return' => '',
  'Sort' => [
    {
      '_score' => 'desc'
    },
    {
      'Created' => 'desc'
    }
  ]
};

The expected result would have been that asdfghj was searched before asdfghjk.

TODO:

  • order by gi_debugger_entry.id instead of gi_debugger_entry.create_time
@bschmalhofer bschmalhofer added the enhancement New feature or request label Jan 22, 2022
@bschmalhofer bschmalhofer added this to the OTOBO 10.1.1 milestone Jan 22, 2022
@bschmalhofer bschmalhofer self-assigned this Jan 22, 2022
bschmalhofer added a commit that referenced this issue Jan 22, 2022
Because there can be multiple requests per second.
@bschmalhofer
Copy link
Contributor Author

See also #1471.
Changed the search. A test with the Elasticsearch-Box gave the expected order of the the debug entries. Issue can be closed when PR is merged.

bschmalhofer added a commit that referenced this issue Jan 23, 2022
Because there can be multiple requests per second.
bschmalhofer added a commit that referenced this issue Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant