Vadim Miller created SOLR-12914:
-----------------------------------

             Summary: Solr crashes in /terms request handler
                 Key: SOLR-12914
                 URL: https://issues.apache.org/jira/browse/SOLR-12914
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
    Affects Versions: 7.5
            Reporter: Vadim Miller


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.  

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.

 

 

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to