Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
7.5
-
None
-
None
Description
TermsComponent class always tries to fetch all terms from all shards for a further processing. There is java.lang.OutOfMemoryError exception if the resulting list is too long. Solr stops working on this shard after this exception, only restart helps.
There is a very common use case when the full terms list is not required: a client needs to see next N terms in alphabetically sorted list starting with a given value. Usually, this is needed for some autocomplete field on a page.
Example URL:
http://localhost:8983/solr/mycollection/terms?terms.fl=fulltext&terms.sort=index&terms.lower=cat&terms.limit=50
In this example TermsComponent needs to fetch only 50 terms from each shard starting with a value provided in terms.lower URL parameter. So, it should not reset TermsParams.TERMS_LIMIT parameter when generates a shard query in createSmartShardQuery() method.
The patch is attached.
Attachments
Attachments
Issue Links
- is duplicated by
-
SOLR-13337 TermsComponent sharded and terms.sort=index performance
- Closed