|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CompassTermFreqsBuilder
A term and frequencies builder, allows to set different settings regarding the available terms for certain properties and their respective frequencies.
Allows to narrow down the sub indexes searched either by setting the aliases or the sub indexes (or both of them).
Allows to set how the returned terns will be sort. Either by the TERM value or
the TERM frequency. Note, the (adjustable) size of terms will always be based on
the ones with the highest frequency. Within this size based list (controlled using
setSize(int)), the sorting will occur.
By default, the frequency will be returned according to the search engine implementation values (in Lucene, it is the doc freq). The builder allows to normalize this values. For example, to values between 0 and 1, 0 and 100, or any other range.
| Nested Class Summary | |
|---|---|
static class |
CompassTermFreqsBuilder.Sort
|
| Method Summary | |
|---|---|
CompassTermFreqsBuilder |
normalize(int min,
int max)
Normalizes the result frequencies based on the provided min and max values. |
CompassTermFreqsBuilder |
setAliases(String... aliases)
Narrow down the terms to specific aliases (which in trun automatically map to a sub index). |
CompassTermFreqsBuilder |
setSize(int size)
Sets the size of the results that will be returned. |
CompassTermFreqsBuilder |
setSort(CompassTermFreqsBuilder.Sort sort)
Sets the sorting direction of the size based results terms. |
CompassTermFreqsBuilder |
setSubIndexes(String... subIndexes)
Narrow down the terms to specific sub indexes. |
CompassTermFreqsBuilder |
setTypes(Class... types)
Narrow down teh terms to specific classes (which map to aliases). |
CompassTermFreq[] |
toTermFreqs()
Builds and returns the term and their frequencies. |
| Method Detail |
|---|
CompassTermFreqsBuilder setSize(int size)
10.
CompassTermFreqsBuilder setAliases(String... aliases)
CompassTermFreqsBuilder setTypes(Class... types)
CompassTermFreqsBuilder setSubIndexes(String... subIndexes)
CompassTermFreqsBuilder setSort(CompassTermFreqsBuilder.Sort sort)
setSize(int) setting.
CompassTermFreqsBuilder normalize(int min,
int max)
CompassTermFreq[] toTermFreqs()
throws CompassException
CompassException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||