slight cleanup and handling of one cornr case
This commit is contained in:
parent
7da8104954
commit
1b15703d3f
|
@ -236,6 +236,13 @@ class IndexServiceImpl implements IndexService
|
|||
*--------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
private static final void visitAllDocuments(IndexSearcher srch, HitCollector c) throws IOException
|
||||
{
|
||||
for (int i=0; i<srch.maxDoc(); i++)
|
||||
c.collect(i,1.0F);
|
||||
|
||||
} // end visitAllDocuments
|
||||
|
||||
private final String createTag(String namespace, String name, Object obj) throws IndexException
|
||||
{
|
||||
String objtag = m_base.getResolver(namespace,name).getResolverTag(obj);
|
||||
|
@ -307,12 +314,6 @@ class IndexServiceImpl implements IndexService
|
|||
|
||||
} // end compileQuery
|
||||
|
||||
private final void doQuery(String query_string, java.util.Date date_low, java.util.Date date_high,
|
||||
DynamoUser match_owner, String match_scope, HitCollector output) throws IndexException
|
||||
{
|
||||
|
||||
} // end doQuery
|
||||
|
||||
/*--------------------------------------------------------------------------------
|
||||
* Implementations from interface IndexService
|
||||
*--------------------------------------------------------------------------------
|
||||
|
@ -386,6 +387,9 @@ class IndexServiceImpl implements IndexService
|
|||
{ // run that puppy!
|
||||
irdr = IndexReader.open(m_directory);
|
||||
srch = new IndexSearcher(irdr);
|
||||
if (query==null)
|
||||
visitAllDocuments(srch,subc);
|
||||
else
|
||||
srch.search(query,subc);
|
||||
rc = subc.outputItems(irdr);
|
||||
|
||||
|
@ -426,6 +430,9 @@ class IndexServiceImpl implements IndexService
|
|||
try
|
||||
{ // run that puppy!
|
||||
srch = new IndexSearcher(m_directory);
|
||||
if (query==null)
|
||||
visitAllDocuments(srch,cc);
|
||||
else
|
||||
srch.search(query,cc);
|
||||
|
||||
} // end try
|
||||
|
|
Loading…
Reference in New Issue
Block a user