diff --git a/querydsl-lucene/src/main/java/com/mysema/query/lucene/session/LuceneSession.java b/querydsl-lucene/src/main/java/com/mysema/query/lucene/session/LuceneSession.java index 34c402034..6406e854d 100644 --- a/querydsl-lucene/src/main/java/com/mysema/query/lucene/session/LuceneSession.java +++ b/querydsl-lucene/src/main/java/com/mysema/query/lucene/session/LuceneSession.java @@ -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 diff --git a/querydsl-lucene/src/main/java/com/mysema/query/lucene/session/LuceneSessionImpl.java b/querydsl-lucene/src/main/java/com/mysema/query/lucene/session/LuceneSessionImpl.java index 9b30ed88a..8092300b7 100644 --- a/querydsl-lucene/src/main/java/com/mysema/query/lucene/session/LuceneSessionImpl.java +++ b/querydsl-lucene/src/main/java/com/mysema/query/lucene/session/LuceneSessionImpl.java @@ -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 query(QueryCallback callback) {