On Thu, Dec 04, 2003 at 04:41:33AM -0500, Erik Hatcher wrote:
> On Wednesday, December 3, 2003, at 08:51 PM, Dror Matalon wrote:
> > Hits hits = initSearch(queryString);
No, it doesn't. Here's the code. Also, as I mentioned, if I take the
explain out and just do a search it works fine.
private Hits initSearch(String queryString) throws IOException,
ParseException {
searcher = new IndexSearcher(indexName);
Analyzer analyzer = new StandardAnalyzer();
getFieldInfo();
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
MultiFieldQueryParser parser = new MultiFieldQueryParser(queryString, analyzer);
int arraySize = fields.size();
fieldsArray = new String[arraySize];
for (int ii = 0; ii < arraySize;
ii++) {
fieldsArray[ii] = (String)
fields.get(ii);
}
query = parser.parse(queryString, fieldsArray, analyzer);
System.out.println("Searching
for: " +
query.toString());
Hits hits =
searcher.search(query);
return
(hits);
}
>
> Does initSearch close the IndexSearcher?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
--
Dror Matalon
Zapatec Inc
1700 MLK Way
Berkeley, CA 94709
http://www.fastbuzz.com
http://www.zapatec.com
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
|