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

[Bug] Index fails with immense terms #2289

Closed
3 tasks done
To-om opened this issue Dec 14, 2021 · 0 comments
Closed
3 tasks done

[Bug] Index fails with immense terms #2289

To-om opened this issue Dec 14, 2021 · 0 comments
Assignees
Labels
bug contains-docs TheHive4 TheHive4 related issues
Milestone

Comments

@To-om
Copy link
Contributor

To-om commented Dec 14, 2021

Request Type

Bug

Problem Description

The index engine fails to process the document if it contains a "non full-text" field with more than 32766 bytes.

During document creation, the document won't be indexed and become invisible (even if it stored in the database).
During a data reindex, the process stops and a part of the data is not indexed.

TheHive 4.1.15 triggers a data reindex. If the database contains a huge field, not all data will be visible/usable.

The impacted fields are:

  • type (alert)
  • source (alert)
  • sourceRef (alert)
  • name (customField, role, organisation, attachment, caseTemplate)
  • login (user)
  • title (alert, case, task)
  • contentType (attachment)
  • tags (case, alert, observable)
  • dataType (observable)
  • value (resolutionStatus, impactStatus)
  • data (observable)
  • group (task)

The field "data" is probably the only one that could be filled with more than 32k bytes, in a normal use.

Possible Solutions

Only for Elasticsearch, the mapping can be updated to ignore all fields with a size greater than a value using ignore_above

"store_generic": {
  "mapping": {
    "index": "not_analyzed",
    "ignore_above": 32766
  },
  "match": "*"
}
@To-om To-om added bug TheHive4 TheHive4 related issues labels Dec 14, 2021
@To-om To-om added this to the 4.1.16 milestone Dec 14, 2021
@To-om To-om self-assigned this Dec 14, 2021
@To-om To-om closed this as completed Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug contains-docs TheHive4 TheHive4 related issues
Projects
None yet
Development

No branches or pull requests

2 participants