public class InternalSearchHit extends Object implements SearchHit
| 修飾子とタイプ | クラスと説明 |
|---|---|
static class |
InternalSearchHit.Fields |
static class |
InternalSearchHit.InternalNestedIdentity |
SearchHit.NestedIdentityToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsEMPTY_PARAMS| コンストラクタと説明 |
|---|
InternalSearchHit(int nestedTopDocId,
String id,
Text type,
InternalSearchHit.InternalNestedIdentity nestedIdentity,
Map<String,SearchHitField> fields) |
InternalSearchHit(int docId,
String id,
Text type,
Map<String,SearchHitField> fields) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
int |
docId() |
org.apache.lucene.search.Explanation |
explanation()
If enabled, the explanation of the search hit.
|
void |
explanation(org.apache.lucene.search.Explanation explanation) |
SearchHitField |
field(String fieldName)
The hit field matching the given field name.
|
Map<String,SearchHitField> |
fields()
A map of hit fields (from field name to hit fields) if additional fields
were required to be loaded.
|
void |
fields(Map<String,SearchHitField> fields) |
Map<String,SearchHitField> |
fieldsOrNull() |
org.apache.lucene.search.Explanation |
getExplanation()
If enabled, the explanation of the search hit.
|
Map<String,SearchHitField> |
getFields()
A map of hit fields (from field name to hit fields) if additional fields
were required to be loaded.
|
Map<String,HighlightField> |
getHighlightFields()
A map of highlighted fields.
|
String |
getId()
The id of the document.
|
String |
getIndex()
The index of the hit.
|
Map<String,SearchHits> |
getInnerHits() |
String[] |
getMatchedQueries()
The set of query and filter names the query matched with.
|
SearchHit.NestedIdentity |
getNestedIdentity()
If this is a nested hit then nested reference information is returned otherwise
null is returned. |
float |
getScore()
The score.
|
SearchShardTarget |
getShard()
The shard of the search hit.
|
Object[] |
getSortValues()
An array of the sort values used.
|
Map<String,Object> |
getSource()
The source of the document as a map (can be null).
|
String |
getSourceAsString()
The source of the document as string (can be null).
|
BytesReference |
getSourceRef()
Returns bytes reference, also un compress the source if needed.
|
String |
getType()
The type of the document.
|
long |
getVersion()
The version of the hit.
|
Map<String,HighlightField> |
highlightFields()
A map of highlighted fields.
|
void |
highlightFields(Map<String,HighlightField> highlightFields) |
String |
id()
The id of the document.
|
String |
index()
The index of the hit.
|
Map<String,HighlightField> |
internalHighlightFields() |
BytesReference |
internalSourceRef()
Internal source representation, might be compressed....
|
boolean |
isSourceEmpty()
Is the source empty (not available) or not.
|
Iterator<SearchHitField> |
iterator() |
String[] |
matchedQueries()
The set of query and filter names the query matched with.
|
void |
matchedQueries(String[] matchedQueries) |
void |
readFrom(StreamInput in) |
void |
readFrom(StreamInput in,
InternalSearchHits.StreamContext context) |
static InternalSearchHit |
readSearchHit(StreamInput in,
InternalSearchHits.StreamContext context) |
float |
score()
The score.
|
void |
score(float score) |
void |
setInnerHits(Map<String,InternalSearchHits> innerHits) |
SearchShardTarget |
shard()
The shard of the search hit.
|
void |
shard(SearchShardTarget target) |
void |
shardTarget(SearchShardTarget shardTarget) |
Object[] |
sortValues()
An array of the sort values used.
|
void |
sortValues(Object[] sortValues) |
byte[] |
source()
The source of the document (can be null).
|
Map<String,Object> |
sourceAsMap()
The source of the document as a map (can be null).
|
String |
sourceAsString()
The source of the document as string (can be null).
|
BytesReference |
sourceRef()
Returns bytes reference, also un compress the source if needed.
|
InternalSearchHit |
sourceRef(BytesReference source)
Sets representation, might be compressed....
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
String |
type()
The type of the document.
|
long |
version()
The version of the hit.
|
void |
version(long version) |
void |
writeTo(StreamOutput out) |
void |
writeTo(StreamOutput out,
InternalSearchHits.StreamContext context) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic InternalSearchHit(int docId,
String id,
Text type,
Map<String,SearchHitField> fields)
public InternalSearchHit(int nestedTopDocId,
String id,
Text type,
InternalSearchHit.InternalNestedIdentity nestedIdentity,
Map<String,SearchHitField> fields)
public int docId()
public void shardTarget(SearchShardTarget shardTarget)
public void score(float score)
public float getScore()
SearchHitpublic void version(long version)
public long version()
SearchHitpublic long getVersion()
SearchHitgetVersion インタフェース内 SearchHitpublic SearchHit.NestedIdentity getNestedIdentity()
SearchHitnull is returned.getNestedIdentity インタフェース内 SearchHitpublic BytesReference sourceRef()
public InternalSearchHit sourceRef(BytesReference source)
public BytesReference getSourceRef()
SearchHitgetSourceRef インタフェース内 SearchHitpublic BytesReference internalSourceRef()
public byte[] source()
SearchHitSearchHit.sourceRef() so there won't be a need to copy.public boolean isSourceEmpty()
SearchHitisSourceEmpty インタフェース内 SearchHitpublic Map<String,Object> getSource()
SearchHitpublic String sourceAsString()
SearchHitsourceAsString インタフェース内 SearchHitpublic String getSourceAsString()
SearchHitgetSourceAsString インタフェース内 SearchHitpublic Map<String,Object> sourceAsMap() throws ElasticsearchParseException
SearchHitsourceAsMap インタフェース内 SearchHitElasticsearchParseExceptionpublic Iterator<SearchHitField> iterator()
iterator インタフェース内 Iterable<SearchHitField>public SearchHitField field(String fieldName)
SearchHitpublic Map<String,SearchHitField> fields()
SearchHitpublic Map<String,SearchHitField> fieldsOrNull()
public Map<String,SearchHitField> getFields()
SearchHitpublic void fields(Map<String,SearchHitField> fields)
public Map<String,HighlightField> internalHighlightFields()
public Map<String,HighlightField> highlightFields()
SearchHithighlightFields インタフェース内 SearchHitpublic Map<String,HighlightField> getHighlightFields()
SearchHitgetHighlightFields インタフェース内 SearchHitpublic void highlightFields(Map<String,HighlightField> highlightFields)
public void sortValues(Object[] sortValues)
public Object[] sortValues()
SearchHitsortValues インタフェース内 SearchHitpublic Object[] getSortValues()
SearchHitgetSortValues インタフェース内 SearchHitpublic org.apache.lucene.search.Explanation explanation()
SearchHitexplanation インタフェース内 SearchHitpublic org.apache.lucene.search.Explanation getExplanation()
SearchHitgetExplanation インタフェース内 SearchHitpublic void explanation(org.apache.lucene.search.Explanation explanation)
public SearchShardTarget shard()
SearchHitpublic SearchShardTarget getShard()
SearchHitpublic void shard(SearchShardTarget target)
public void matchedQueries(String[] matchedQueries)
public String[] matchedQueries()
SearchHitmatchedQueries インタフェース内 SearchHitpublic String[] getMatchedQueries()
SearchHitgetMatchedQueries インタフェース内 SearchHitpublic Map<String,SearchHits> getInnerHits()
getInnerHits インタフェース内 SearchHitnull if there are nonepublic void setInnerHits(Map<String,InternalSearchHits> innerHits)
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent インタフェース内 ToXContentIOExceptionpublic static InternalSearchHit readSearchHit(StreamInput in, InternalSearchHits.StreamContext context) throws IOException
IOExceptionpublic void readFrom(StreamInput in) throws IOException
readFrom インタフェース内 StreamableIOExceptionpublic void readFrom(StreamInput in, InternalSearchHits.StreamContext context) throws IOException
IOExceptionpublic void writeTo(StreamOutput out) throws IOException
writeTo インタフェース内 StreamableIOExceptionpublic void writeTo(StreamOutput out, InternalSearchHits.StreamContext context) throws IOException
IOExceptionCopyright © 2009–2016. All rights reserved.