mirror of
https://github.com/querydsl/querydsl.git
synced 2026-07-03 21:07:49 +08:00
This commit is contained in:
parent
4bb47f9a50
commit
a3eaf15d83
@ -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
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user