-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 10.10-HF49, 11.x, 2021.5
-
Component/s: Core, Events / Works
-
Tags:
-
Team:PLATFORM
-
Sprint:nxplatform #37
-
Story Points:2
We have cases where the fulltext extraction computation could fail due to OOM, in this part of code:
List<String> strings = new ArrayList<>(); for (Blob blob : blobsExtractor.getBlobs(document)) { String string = blobsText.computeIfAbsent(blob, this::blobToText); strings.add(string); } // add space at beginning and end for simulated phrase search using LIKE "% foo bar %" String text = " " + String.join(" ", strings) + " ";
Just after this computation, we limit the text length in order to be able to store the value in the DB.
In order to avoid OOM, we should take into account the maxSize when computing this field instead of computing globally and then limiting it.