|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.nutch.searcher.NutchBean
One stop shopping for search-related functionality.
Field Summary | |
static Logger |
LOG
|
Constructor Summary | |
NutchBean()
Construct reading from connected directory. |
|
NutchBean(File dir)
Construct in a named directory. |
Method Summary | |
static NutchBean |
get(javax.servlet.ServletContext app)
Cache in servlet context. |
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. |
ParseData |
getParseData(HitDetails hit)
Returns the ParseData of a hit document. |
String[] |
getSegmentNames()
|
String[] |
getSummary(HitDetails[] hits,
Query query)
Returns summaries for a set of details. |
String |
getSummary(HitDetails hit,
Query query)
Returns a summary for the given hit details. |
static void |
main(String[] args)
For debugging. |
Hits |
search(Query query,
int numHits)
Return the top-scoring hits for a query. |
Hits |
search(Query query,
int numHits,
int maxHitsPerSite)
Search for pages matching a query, eliminating excessive hits from sites. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Logger LOG
Constructor Detail |
public NutchBean() throws IOException
public NutchBean(File dir) throws IOException
Method Detail |
public static NutchBean get(javax.servlet.ServletContext app) throws IOException
IOException
public String[] getSegmentNames()
public Hits search(Query query, int numHits) throws IOException
Searcher
search
in interface Searcher
IOException
public Hits search(Query query, int numHits, int maxHitsPerSite) throws IOException
maxHitsPerSite
are removed from
the results. The remaining hits for such sites have Hit.moreFromSiteExcluded()
set.
If maxHitsPerSite is zero then all hits are returned.
query
- querynumHits
- number of requested hitsmaxHitsPerSite
- the maximum hits returned per site, or zero
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 String 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 String[] 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 String[] getAnchors(HitDetails hit) throws IOException
HitContent
getAnchors
in interface HitContent
IOException
public static void main(String[] args) throws Exception
Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |