|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.labs.minion.indexer.postings.PostingsIteratorFeatures
public class PostingsIteratorFeatures
A set of features that can be used to configure various aspects of a postings iterator.
Field Summary | |
---|---|
protected boolean |
caseSensitive
Whether the iterator will return postings for case-sensitive or case insensitive variations. |
protected int[] |
fields
The fields that we want to return postings for. |
protected float[] |
mult
The multipliers that we wish to apply to scores from certain fields. |
protected boolean |
positions
Whether the iterator must be able to return positions. |
protected QueryStats |
qs
|
protected WeightingComponents |
wc
A set of weighting components that can be used when calculating term weights. |
protected WeightingFunction |
wf
The weighting function that the iterator will use to calculate weights. |
Constructor Summary | |
---|---|
PostingsIteratorFeatures()
Creates a default set of features. |
|
PostingsIteratorFeatures(WeightingFunction wf,
WeightingComponents wc)
Creates a set of features. |
|
PostingsIteratorFeatures(WeightingFunction wf,
WeightingComponents wc,
int[] fields,
float[] mult,
boolean positions,
boolean caseSensitive)
Creates a set of features. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Clones this set of features. |
boolean |
getCaseSensitive()
Gets the required case sensitivity for the postings. |
int[] |
getFields()
Gets the fields that we're currently using. |
float[] |
getMult()
Gets the field multipliers that we're currently using. |
boolean |
getPositions()
Gets whether this set of features requires that iterators be able to return positions. |
QueryStats |
getQueryStats()
|
WeightingComponents |
getWeightingComponents()
Gets the weighting components to be used by iterators. |
WeightingFunction |
getWeightingFunction()
Gets the weighting function to be used by iterators. |
void |
setCaseSensitive(boolean caseSensitive)
Sets the case sensitiveness of the postings. |
void |
setFields(int[] fields)
Sets the fields that we should use. |
void |
setFields(java.lang.String[] fields,
InvFileDiskPartition dp)
Sets the fields that we should use. |
void |
setMult(float[] mult)
Sets the fied multipliers that we should be using. |
void |
setMult(java.util.Map mult,
InvFileDiskPartition dp)
Sets the field multipliers that we should be using. |
void |
setPositions(boolean positions)
Sets the value of the positions. |
void |
setQueryStats(QueryStats qs)
|
void |
setWeightingComponents(WeightingComponents wc)
Sets the weighting components to be used by iterators. |
void |
setWeightingFunction(WeightingFunction wf)
Sets the weighting function to be used by iterators. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected QueryStats qs
protected WeightingFunction wf
protected WeightingComponents wc
protected int[] fields
protected float[] mult
null
, then no multipliers will be applied.
protected boolean positions
true
, then the iterator must be capable of returning
positions.
protected boolean caseSensitive
Constructor Detail |
---|
public PostingsIteratorFeatures()
public PostingsIteratorFeatures(WeightingFunction wf, WeightingComponents wc)
wf
- A weighting function to use for these postings. If
null
, no weighting function will be used.wc
- a collection of components that can be used when
calculating weighting functions.public PostingsIteratorFeatures(WeightingFunction wf, WeightingComponents wc, int[] fields, float[] mult, boolean positions, boolean caseSensitive)
wf
- A weighting function to use for these postings. If
null
, no weighting function will be used.wc
- a collection of components that can be used when
calculating weighting functions.fields
- If the ith element of this field
is greater than zero, then the iterator will return postings for the
field whose ID is i. If element 0 of the array is greater
than zero, then postings that are not in any field will be
returned.mult
- An array of floats indicating the field IDs for which we
want to apply multipliers. The value in the ith
position indicates the weight that will be used to multiply the
score of a term that has occurrences in the field whose ID is
i. If this array is null
, then no multipliers
will be applied.positions
- if true
, then iterators created using
this set of features must be able to return positions.caseSensitive
- if true
then the iterator that is
returned will be for case sensitive postings. If false
then the iterator that is returned will be for case insensitive
postings.Method Detail |
---|
public void setWeightingFunction(WeightingFunction wf)
public WeightingFunction getWeightingFunction()
public void setWeightingComponents(WeightingComponents wc)
public WeightingComponents getWeightingComponents()
public void setQueryStats(QueryStats qs)
public QueryStats getQueryStats()
public void setPositions(boolean positions)
positions
- if true
, then iterators created using
this set of features must be able to return positions.public boolean getPositions()
public void setCaseSensitive(boolean caseSensitive)
caseSensitive
- if true
, postings will be returned
for case sensitive instances of an entry in a dictionary.public boolean getCaseSensitive()
public void setFields(int[] fields)
public void setFields(java.lang.String[] fields, InvFileDiskPartition dp)
fields
- The names of the fields of interest.dp
- A partition that we can use to map field names to field
IDs.public int[] getFields()
public void setMult(float[] mult)
public void setMult(java.util.Map mult, InvFileDiskPartition dp)
mult
- A map from field names to multiplier values.dp
- A partition that we can use to map field names to field
IDs.public float[] getMult()
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |