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 on additional events attributes #21029

Open
dennisoelkers opened this issue Nov 22, 2024 · 5 comments
Open

Sorting on additional events attributes #21029

dennisoelkers opened this issue Nov 22, 2024 · 5 comments

Comments

@dennisoelkers
Copy link
Member

dennisoelkers commented Nov 22, 2024

Events should be sortable on additional attributes, which do not allow sorting yet:

On regular events page:

  • Description
  • Event Definition
  • Aggregation Time Range?

On security events page:

  • Description
  • Type
@dennisoelkers
Copy link
Member Author

Sorting based on Event Definition is most probably not possible with pagination. The event definition of an event is stored in MongoDB, while the event itself is stored in OpenSearch. We would need to join the two, which does not work with pagination.

@dennisoelkers
Copy link
Member Author

Sorting based on Description is not possible out of the box, because the message field is text and not keyword by default (this means it is optimized for full text search instead of sorting/aggregating). We could enable fielddata on it, but that would increase memory usage significantly.

@Emy-01
Copy link

Emy-01 commented Nov 25, 2024

@dennisoelkers would we still need pagination if we limit the results so that we only show a defined number of messages? I think this was a conversation you had with @tellistone.
If we do that, what’s the ideal number of messages we could show to allow the sorting?
Also, in case we do an asynchronous job -and not sure if this is right but- wouldn’t this mean that at the end we get already all the results and therefore we wouldn’t need to perform additional fetching?

@coffee-squirrel
Copy link

Related: #17437

@dennisoelkers
Copy link
Member Author

@Emy-01: I am not sure I get the questions correctly. We always need to some kind of pagination, because we don't know how many events we will get back. Under any circumstance we can assume that there will be more than 25/50/100 events in the system, so optimizing for the corner case that there is only a single page of events in order to be able to sort in-memory based on the event definition title does not appear to useful here.
Also, what do you mean with asynchronous job? We are not doing anything asynchronous here when fetching events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants