forked from apache/lucene-solr
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bitmap aggs for non-distributed mode
- Loading branch information
Showing
8 changed files
with
113 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
solr/core/src/java/org/apache/solr/search/facet/BitmapFrequencyOfFrequenciesSlotAcc.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.apache.solr.search.facet; | ||
|
||
import java.util.Collections; | ||
|
||
import org.apache.lucene.queries.function.ValueSource; | ||
|
||
public class BitmapFrequencyOfFrequenciesSlotAcc extends BitmapFrequencySlotAcc { | ||
public BitmapFrequencyOfFrequenciesSlotAcc(ValueSource values, FacetContext fcontext, int numSlots, int maxFrequency) { | ||
super(values, fcontext, numSlots, maxFrequency); | ||
} | ||
|
||
@Override | ||
public Object getFinalValue(BitmapFrequencyCounter result) { | ||
if (result != null) { | ||
result.normalize(); | ||
return result.toFrequencyOfFrequencies(); | ||
} else { | ||
return Collections.emptyMap(); | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
solr/core/src/java/org/apache/solr/search/facet/BitmapFrequencyOfFrequenciesSlotAcc64.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.apache.solr.search.facet; | ||
|
||
import java.io.IOException; | ||
import java.util.Arrays; | ||
import java.util.Collections; | ||
import java.util.function.IntFunction; | ||
|
||
import org.apache.lucene.queries.function.ValueSource; | ||
|
||
public class BitmapFrequencyOfFrequenciesSlotAcc64 extends BitmapFrequencySlotAcc64 { | ||
public BitmapFrequencyOfFrequenciesSlotAcc64(ValueSource values, FacetContext fcontext, int numSlots, int maxFrequency) { | ||
super(values, fcontext, numSlots, maxFrequency); | ||
} | ||
|
||
@Override | ||
public Object getFinalValue(BitmapFrequencyCounter64 result) { | ||
if (result != null) { | ||
result.normalize(); | ||
return result.toFrequencyOfFrequencies(); | ||
} else { | ||
return Collections.emptyMap(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters