|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.apache.nutch.searcher.DistributedSearch.Client
public static class DistributedSearch.Client
The search client.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static long |
versionID
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
DistributedSearch.Client(InetSocketAddress[] addresses,
org.apache.hadoop.conf.Configuration conf)
Construct a client talking to the named servers. |
|
DistributedSearch.Client(org.apache.hadoop.fs.Path file,
org.apache.hadoop.conf.Configuration conf)
Construct a client talking to servers listed in the named file. |
Method Summary | |
---|---|
void |
close()
Stops the watchdog thread. |
String[] |
getAnchors(HitDetails hit)
Returns the anchors of a hit document. |
byte[] |
getContent(HitDetails hit)
Returns the content of a hit document. |
HitDetails |
getDetails(Hit hit)
Returns the details for a hit document. |
HitDetails[] |
getDetails(Hit[] hits)
Returns the details for a set of hits. |
String |
getExplanation(Query query,
Hit hit)
Return an HTML-formatted explanation of how a query scored. |
long |
getFetchDate(HitDetails hit)
Returns the fetch date of a hit document. |
Inlinks |
getInlinks(HitDetails hit)
Return the inlinks of a hit document. |
boolean[] |
getLiveServer()
|
ParseData |
getParseData(HitDetails hit)
Returns the ParseData of a hit document. |
ParseText |
getParseText(HitDetails hit)
Returns the ParseText of a hit document. |
String[] |
getSegmentNames()
Return the names of segments searched. |
Summary[] |
getSummary(HitDetails[] hits,
Query query)
Returns summaries for a set of details. |
Summary |
getSummary(HitDetails hit,
Query query)
Returns a summary for the given hit details. |
boolean |
isFileModified()
Check to see if search-servers file has been modified |
static void |
main(String[] args)
|
void |
run()
|
Hits |
search(Query query,
int numHits,
String dedupField,
String sortField,
boolean reverse)
Return the top-scoring hits for a query. |
void |
updateSegments()
Updates segment names. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long versionID
Constructor Detail |
---|
public DistributedSearch.Client(org.apache.hadoop.fs.Path file, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public DistributedSearch.Client(InetSocketAddress[] addresses, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
Method Detail |
---|
public boolean isFileModified() throws IOException
IOException
public void updateSegments() throws IOException
IOException
public String[] getSegmentNames()
public Hits search(Query query, int numHits, String dedupField, String sortField, boolean reverse) throws IOException
Searcher
search
in interface Searcher
IOException
public String getExplanation(Query query, Hit hit) throws IOException
Searcher
getExplanation
in interface Searcher
IOException
public HitDetails getDetails(Hit hit) throws IOException
HitDetailer
getDetails
in interface HitDetailer
IOException
public HitDetails[] getDetails(Hit[] hits) throws IOException
HitDetailer
getDetails
in interface HitDetailer
IOException
public Summary getSummary(HitDetails hit, Query query) throws IOException
HitSummarizer
getSummary
in interface HitSummarizer
hit
- the details of the hit to be summarizedquery
- indicates what should be higlighted in the summary text
IOException
public Summary[] getSummary(HitDetails[] hits, Query query) throws IOException
HitSummarizer
getSummary
in interface HitSummarizer
hits
- the details of hits to be summarizedquery
- indicates what should be higlighted in the summary text
IOException
public byte[] getContent(HitDetails hit) throws IOException
HitContent
getContent
in interface HitContent
IOException
public ParseData getParseData(HitDetails hit) throws IOException
HitContent
getParseData
in interface HitContent
IOException
public ParseText getParseText(HitDetails hit) throws IOException
HitContent
getParseText
in interface HitContent
IOException
public String[] getAnchors(HitDetails hit) throws IOException
HitInlinks
getAnchors
in interface HitInlinks
IOException
public Inlinks getInlinks(HitDetails hit) throws IOException
HitInlinks
getInlinks
in interface HitInlinks
IOException
public long getFetchDate(HitDetails hit) throws IOException
HitContent
getFetchDate
in interface HitContent
IOException
public static void main(String[] args) throws Exception
Exception
public void run()
run
in interface Runnable
run
in class Thread
public void close()
close
in interface Closeable
public boolean[] getLiveServer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |