Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-12914

Solr crashes in /terms request handler

    XMLWordPrintableJSON

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

        1. terms.patch
          1 kB
          Vadim Miller

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vadim_miller Vadim Miller
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: