John Wang created LUCENE-5428:
---------------------------------

             Summary: Make Faceting counting array overridable
                 Key: LUCENE-5428
                 URL: https://issues.apache.org/jira/browse/LUCENE-5428
             Project: Lucene - Core
          Issue Type: Improvement
          Components: modules/facet
    Affects Versions: 4.6.1
            Reporter: John Wang
         Attachments: facetcounter.patch

In SortedSetDocValuesFacetCounts, the count array is allocated as an int[] size 
of number of total values across all facets and that is allocated per query.

In the case where number of values are large, large amount of garbage maybe 
created. Furthermore, the size of the array is dependent on the number of 
possible values, not number of number values needed for which facets fields are 
being accumulated for. E.g. if FacetSearchParam indicates counting only one 1 
field with 2 values, we are still creating the array for all values across all 
fields.

This patch makes the count array abstract to allow for
1) caching
2) hash counting - which can choose to count only of needed fields.

This patch can be further enhanced to create FacetCouter per segment, per field 
by pass in the ordinal map.




--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to