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

Facet allow paging and make bucketSizeLimit as optional parameter

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 6.6
    • Fix Version/s: None
    • Component/s: streaming expressions
    • Labels:

      Description

      FacetStream in streaming expression do not have paging capability and do not have the ability to retrieve all the facet.

      To resolve the bucketSizeLimit to be optional:
      1. The "\lucene-solr\solr\solrj\src\java\org\apache\solr\client\solrj\io\stream\FacetStream.java" the constructor with StreamExpression parameters, comment out the checking of limit must be greater zero and when it is exception assign a negative value to bucketSizeLimit.
      2. The method read() update the logic to "if(index < tuples.size() && (index < bucketSizeLimit || bucketSizeLimit <= 0))"

      To add paging to facetStream:
      1. create a private variable call startAt as int (dafault 0).
      2. retrieve the value from StreamExpression variable and start the value to startAt.
      3. overwrite the method writeMap from tupleStream and in the method in the try catch before the for loop. Set index with startAt and set bucketSizeLimit to bucketSizeLimit plus startAt if(bucketSizeLimit is a positive integer).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              minh.truong minh truong
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 3h
                3h
                Remaining:
                Remaining Estimate - 3h
                3h
                Logged:
                Time Spent - Not Specified
                Not Specified