|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hrstc.lucene.queryexpansion.GoogleSearcher
public class GoogleSearcher
Performs Query Expansion, utilizing google for document source
Field Summary | |
---|---|
static java.lang.String |
AUTH_KEY_FLD
Auth key in order to use google's web api |
private java.io.File |
cache
Location where cache is stored |
static java.lang.String |
FILE_CACHE_FLD
Location where cache is stored |
private java.lang.String |
key
Auth key in order to use google's web api |
private static java.util.logging.Logger |
logger
|
private java.util.Properties |
prop
Properties that contain necessary values |
Constructor Summary | |
---|---|
GoogleSearcher(java.util.Properties prop)
|
Method Summary | |
---|---|
java.lang.String |
htmlToTxt(java.io.InputStream inputStream)
Reads html and returns txt contents |
java.lang.String |
readURL(java.net.URL url,
com.google.soap.search.GoogleSearch search)
Attempts to read url directly; if not possible tries to read it from google's cache. |
java.util.Vector<org.apache.lucene.document.Document> |
search(java.lang.String queryTxt)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String AUTH_KEY_FLD
public static final java.lang.String FILE_CACHE_FLD
private static java.util.logging.Logger logger
private java.util.Properties prop
private java.io.File cache
private java.lang.String key
Constructor Detail |
---|
public GoogleSearcher(java.util.Properties prop)
key
- to use google's web apicacheFileName
- where search results returned from google will be keptanalyzer
- - used to parse documents to extract termssearcher
- - used to obtain idfsimilarity
- Method Detail |
---|
public java.util.Vector<org.apache.lucene.document.Document> search(java.lang.String queryTxt) throws com.google.soap.search.GoogleSearchFault, java.io.IOException
queryTxt
-
com.google.soap.search.GoogleSearchFault
java.io.IOException
public java.lang.String readURL(java.net.URL url, com.google.soap.search.GoogleSearch search) throws com.google.soap.search.GoogleSearchFault, java.io.IOException
args
-
com.google.soap.search.GoogleSearchFault
java.io.IOException
java.lang.Exception
public java.lang.String htmlToTxt(java.io.InputStream inputStream) throws java.io.IOException
in
-
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |