|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jbox.searcher.AbstractSearcher
org.jbox.searcher.simpleSearcher.SimpleSearcher
public class SimpleSearcher
A concrete Searcher.
Page,
PageProxy| Field Summary |
|---|
| Fields inherited from class org.jbox.searcher.AbstractSearcher |
|---|
ALLPAGENUM, cutterBox, pageHome, wordHome |
| Constructor Summary | |
|---|---|
SimpleSearcher()
|
|
| Method Summary | |
|---|---|
protected java.util.HashMap<java.lang.Long,PageProxy> |
query(java.lang.String word)
Query the index with a specified word string. |
java.util.Collection<PageProxy> |
query(java.lang.String[] words)
Query index by a string array. |
Page[] |
search(java.lang.String query)
Search index by a query string, return a Page array related to
the query string. |
| Methods inherited from class org.jbox.searcher.AbstractSearcher |
|---|
calculateTFIDF, getAllPageNum, pageRank, setCutterBox, setPageHome, setWordHome |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleSearcher()
| Method Detail |
|---|
protected java.util.HashMap<java.lang.Long,PageProxy> query(java.lang.String word)
word - a string to queried.
PageProxy.public java.util.Collection<PageProxy> query(java.lang.String[] words)
words - String array to be queried.
PageProxy objects which relate to
the query words.public Page[] search(java.lang.String query)
Page array related to
the query string.
It should be noticed that the type of result of this method is not real
Page,but PageProxy, a proxy of Page. It change
the behavior of Page.getText(), returning a introduction instead
of returning the whole text.
If need to get the the prototype of Page, cast the result type
to PageProxy, and then calling PageProxy.getPage() to
get the Page object.
Note: results of the method are sorted by TFIDF.
query - string to be queried.
Page array related to the query string.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||