org.apache.lucene.search
public class Hit extends Object implements Serializable
HitIterator
to provide a lazily loaded hit
from Hits
.Modifier and Type | Method and Description |
---|---|
String |
get(String name)
Returns the string value of the field with the given name if any exist in
this document, or null.
|
float |
getBoost()
Returns the boost factor for this hit on any field of the underlying document.
|
Document |
getDocument()
Returns document for this hit.
|
int |
getId()
Returns id for this hit.
|
float |
getScore()
Returns score for this hit.
|
String |
toString()
Prints the parameters to be used to discover the promised result.
|
public Document getDocument() throws CorruptIndexException, IOException
CorruptIndexException
- if the index is corruptIOException
- if there is a low-level IO errorHits.doc(int)
public float getScore() throws IOException
IOException
Hits.score(int)
public int getId() throws IOException
IOException
Hits.id(int)
public float getBoost() throws CorruptIndexException, IOException
CorruptIndexException
- if the index is corruptIOException
- if there is a low-level IO errorDocument.getBoost()
public String get(String name) throws CorruptIndexException, IOException
CorruptIndexException
- if the index is corruptIOException
- if there is a low-level IO errorDocument.get(String)
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.