Permalink
Browse files

Merge branch 'master' of git://github.com/javasoze/bobo

  • Loading branch information...
2 parents 2ad52a7 + 52a85eb commit 3c6672e57a532e93a94f63b2029b43eb2fc5900a @xiaoyang xiaoyang committed May 19, 2010
@@ -155,6 +155,27 @@ public IndexReader getInnerReader()
return in;
}
+ @Override
+ public synchronized IndexReader reopen() throws CorruptIndexException,
+ IOException {
+ IndexReader newInner = in.reopen(true);
+ if (newInner != in){
+ return BoboIndexReader.getInstance(newInner, _facetHandlers, _runtimeFacetHandlerFactories, _workArea);
+ }
+ else{
+ return this;
+ }
+ }
+
+ @Override
+ public synchronized IndexReader reopen(boolean openReadOnly)
+ throws CorruptIndexException, IOException {
+ if (!openReadOnly){
+ throw new IOException("BoboIndexReader is readonly-only");
+ }
+ return reopen();
+ }
+
public Object getFacetData(String name){
return _facetDataMap.get(name);
}
@@ -65,11 +65,11 @@ public BoboSubBrowser(BoboIndexReader reader)
_allFacetHandlerMap = null;
}
- private static boolean isNoQueryNoFilter(BrowseRequest req)
+ private boolean isNoQueryNoFilter(BrowseRequest req)
{
Query q = req.getQuery();
Filter filter = req.getFilter();
- return ((q == null || q instanceof MatchAllDocsQuery) && filter == null);
+ return ((q == null || q instanceof MatchAllDocsQuery) && filter == null && !_reader.hasDeletions());
}
public Object[] getRawFieldVal(int docid,String fieldname) throws IOException{

0 comments on commit 3c6672e

Please sign in to comment.