cuba-platform / fts

Full-Text Search Addon
https://www.cuba-platform.com/
Apache License 2.0
4 stars 1 forks source link

Optimize memory consumption on search operations #62

Closed gorbunkov closed 4 years ago

gorbunkov commented 5 years ago

LuceneSearcher.searchAllField methods return a list of EntityInfo objects. In case of searchAllField(String searchTerm, Collection<String> entityNames) method that is used by the full-text search from entity browsers all entities found in the index will be there. The problem is that EntityInfo contains the text field. If the file was indexed, full file content will be in the text field. This may cause out of memory errors.

gorbunkov commented 5 years ago

For QA: to test you may generate a large set of entities, each of the entities should have large file attachments. Then perform a full-text search (both in a generic filter in entity browser screen and using the FTS text field) - no out-of-memory errors should appear. You may use the https://github.com/cuba-platform/fts-test project for testing.

Also, a smoke test of the FTS is required, because add-on internals have been refactored.