public class Hit extends Object implements Serializable, Cloneable
Information about a document that matches the search request.
Constructor and Description |
---|
Hit() |
Modifier and Type | Method and Description |
---|---|
Hit |
addExprsEntry(String key,
String value)
The expressions returned from a document that matches the search
request.
|
Hit |
addFieldsEntry(String key,
List<String> value)
The fields returned from a document that matches the search request.
|
Hit |
addHighlightsEntry(String key,
String value)
The highlights returned from a document that matches the search
request.
|
Hit |
clearExprsEntries()
Removes all the entries added into Exprs.
|
Hit |
clearFieldsEntries()
Removes all the entries added into Fields.
|
Hit |
clearHighlightsEntries()
Removes all the entries added into Highlights.
|
Hit |
clone() |
boolean |
equals(Object obj) |
Map<String,String> |
getExprs()
The expressions returned from a document that matches the search
request.
|
Map<String,List<String>> |
getFields()
The fields returned from a document that matches the search request.
|
Map<String,String> |
getHighlights()
The highlights returned from a document that matches the search
request.
|
String |
getId()
The document ID of a document that matches the search request.
|
int |
hashCode() |
void |
setExprs(Map<String,String> exprs)
The expressions returned from a document that matches the search
request.
|
void |
setFields(Map<String,List<String>> fields)
The fields returned from a document that matches the search request.
|
void |
setHighlights(Map<String,String> highlights)
The highlights returned from a document that matches the search
request.
|
void |
setId(String id)
The document ID of a document that matches the search request.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Hit |
withExprs(Map<String,String> exprs)
The expressions returned from a document that matches the search
request.
|
Hit |
withFields(Map<String,List<String>> fields)
The fields returned from a document that matches the search request.
|
Hit |
withHighlights(Map<String,String> highlights)
The highlights returned from a document that matches the search
request.
|
Hit |
withId(String id)
The document ID of a document that matches the search request.
|
public String getId()
public void setId(String id)
id
- The document ID of a document that matches the search request.public Hit withId(String id)
Returns a reference to this object so that method calls can be chained together.
id
- The document ID of a document that matches the search request.public Map<String,List<String>> getFields()
public void setFields(Map<String,List<String>> fields)
fields
- The fields returned from a document that matches the search request.public Hit withFields(Map<String,List<String>> fields)
Returns a reference to this object so that method calls can be chained together.
fields
- The fields returned from a document that matches the search request.public Hit addFieldsEntry(String key, List<String> value)
The method adds a new key-value pair into Fields parameter, and returns a reference to this object so that method calls can be chained together.
key
- The key of the entry to be added into Fields.value
- The corresponding value of the entry to be added into Fields.public Hit clearFieldsEntries()
Returns a reference to this object so that method calls can be chained together.
public Map<String,String> getExprs()
public void setExprs(Map<String,String> exprs)
exprs
- The expressions returned from a document that matches the search
request.public Hit withExprs(Map<String,String> exprs)
Returns a reference to this object so that method calls can be chained together.
exprs
- The expressions returned from a document that matches the search
request.public Hit addExprsEntry(String key, String value)
The method adds a new key-value pair into Exprs parameter, and returns a reference to this object so that method calls can be chained together.
key
- The key of the entry to be added into Exprs.value
- The corresponding value of the entry to be added into Exprs.public Hit clearExprsEntries()
Returns a reference to this object so that method calls can be chained together.
public Map<String,String> getHighlights()
public void setHighlights(Map<String,String> highlights)
highlights
- The highlights returned from a document that matches the search
request.public Hit withHighlights(Map<String,String> highlights)
Returns a reference to this object so that method calls can be chained together.
highlights
- The highlights returned from a document that matches the search
request.public Hit addHighlightsEntry(String key, String value)
The method adds a new key-value pair into Highlights parameter, and returns a reference to this object so that method calls can be chained together.
key
- The key of the entry to be added into Highlights.value
- The corresponding value of the entry to be added into Highlights.public Hit clearHighlightsEntries()
Returns a reference to this object so that method calls can be chained together.
public String toString()
toString
in class Object
Object.toString()
Copyright © 2015. All rights reserved.