>>> >> else
>>> >> { // default stop words
>>> >> if(UseStemmer)
>>> >> {
>>> >> _parser = new QueryParser(TEXT_FIELD, new
>>>
; >> Transaction tx = _textSession.beginTransaction();
>> >> List predictions = _textSession.createQuery("from
>> >> Prediction as prediction").list();
>> &g
ateQuery("from
> >> Prediction as prediction").list();
> >> for(Prediction pred: predictions)
> >> {
> >> _textSession.index(pred);
> >> }
> >> tx.commit(); //index are written at commit time
> &g
in text column of predictions
>> try
>> {
>> if (queryStr != null && !queryStr.equals(""))
>> {
>> // need to add the field name to the querystring
>> queryStr = TEXT_FIELD + ":" + qu
sion.index(pred);
>> }
>> tx.commit(); //index are written at commit time
>> _beenIndexed=true;
>>}
>>
>>public List searchPredictions(String queryStr)
>> {
>> // look in text column of predictions
>> try
>>
:" + queryStr;
> org.apache.lucene.search.Query luceneQuery =
> _parser.parse(queryStr);
> Query query = _textSession.createFullTextQuery(luceneQuery,
> Prediction.class);
> List ret = query.list();
> //default fits the KEYWO
catch (Exception pe)
{// KKG TODO: Turn this into a better exception
pe.printStackTrace();
}
return new ArrayList();
}
}
--
View this message in context:
http://www.nabble.com/Help-with-Snowball-Analyzer-tf4497960.html#a12827864
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]