|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectFieldSpans
public class FieldSpans
Keeps a record of the matching spans and search terms for each field.
| Nested Class Summary | |
|---|---|
private class |
FieldSpans.Entry
Stores all the information for a field |
| Field Summary | |
|---|---|
private HashMap |
entries
One FieldSpans.Entry per field |
| Constructor Summary | |
|---|---|
FieldSpans()
|
|
| Method Summary | |
|---|---|
void |
addSpans(FieldSpans other)
Add matching spans for one or more fields. |
Set |
getFields()
Get a set of all the field names |
int |
getSpanCount(String field)
Retrieve the number of spans stored for a given field |
Span[] |
getSpans(String field)
Retrieve the matching spans for a given field. |
int |
getSpanTotal(String field)
Retrieve the total number of spans which matched the field |
Set |
getTerms(String field)
Retrieve the set of search terms for a given field |
boolean |
isEmpty()
true if no spans have yet been stored |
void |
recordSpans(String field,
int spanTotal,
Span[] spans,
Set terms)
Record matching spans for a given field. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private HashMap entries
FieldSpans.Entry per field
| Constructor Detail |
|---|
public FieldSpans()
| Method Detail |
|---|
public void recordSpans(String field,
int spanTotal,
Span[] spans,
Set terms)
field - field that was matchedspanTotal - total number of matching spans (which might be more
than we're recording if some low-scoring ones dropped
off the bottom.)spans - matching spansterms - set of all search terms on this fieldpublic void addSpans(FieldSpans other)
other - set of matching spanspublic Set getFields()
public int getSpanTotal(String field)
public int getSpanCount(String field)
public Span[] getSpans(String field)
public Set getTerms(String field)
public boolean isEmpty()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||