This commit is contained in:
Timo Westkämper 2010-12-23 09:47:55 +00:00
parent 4bb47f9a50
commit a3eaf15d83
2 changed files with 21 additions and 2 deletions

View File

@ -1,6 +1,7 @@
package com.mysema.query.lucene.session;
/**
* General interface on using Lucene.
*
@ -8,6 +9,11 @@ package com.mysema.query.lucene.session;
*/
public interface LuceneSession {
// /**
// * @return
// */
// LuceneQuery createQuery();
/**
* Lucene query callback for querying
*
@ -18,14 +24,14 @@ public interface LuceneSession {
/**
* Creates a new index, adds updates to it and publishes the new index to
* all readers after callback finishes.
* all readers after the callback finishes.
*
* @param callback
*/
void updateNew(WriteCallback callback);
/**
* Updates the current index and publishes it to all readers after callback
* Updates the current index and publishes it to all readers after the callback
* finishes.
*
* @param callback

View File

@ -87,6 +87,19 @@ public class LuceneSessionImpl implements LuceneSession {
return searcher.get();
}
// @Override
// public LuceneQuery createQuery() {
// try {
// IndexSearcher searcher = getSearcher();
// searcher.getIndexReader().incRef();
// return new LuceneQuery(serializer, searcher);
// } catch (IOException e) {
// throw new QueryException(e);
// }
// }
@Override
public <T> T query(QueryCallback<T> callback) {