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
|
private final String createTag(String namespace, String name, Object obj) throws IndexException
|
||||||
{
|
{
|
||||||
String objtag = m_base.getResolver(namespace,name).getResolverTag(obj);
|
String objtag = m_base.getResolver(namespace,name).getResolverTag(obj);
|
||||||
|
@ -307,12 +314,6 @@ class IndexServiceImpl implements IndexService
|
||||||
|
|
||||||
} // end compileQuery
|
} // 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
|
* Implementations from interface IndexService
|
||||||
*--------------------------------------------------------------------------------
|
*--------------------------------------------------------------------------------
|
||||||
|
@ -386,6 +387,9 @@ class IndexServiceImpl implements IndexService
|
||||||
{ // run that puppy!
|
{ // run that puppy!
|
||||||
irdr = IndexReader.open(m_directory);
|
irdr = IndexReader.open(m_directory);
|
||||||
srch = new IndexSearcher(irdr);
|
srch = new IndexSearcher(irdr);
|
||||||
|
if (query==null)
|
||||||
|
visitAllDocuments(srch,subc);
|
||||||
|
else
|
||||||
srch.search(query,subc);
|
srch.search(query,subc);
|
||||||
rc = subc.outputItems(irdr);
|
rc = subc.outputItems(irdr);
|
||||||
|
|
||||||
|
@ -426,6 +430,9 @@ class IndexServiceImpl implements IndexService
|
||||||
try
|
try
|
||||||
{ // run that puppy!
|
{ // run that puppy!
|
||||||
srch = new IndexSearcher(m_directory);
|
srch = new IndexSearcher(m_directory);
|
||||||
|
if (query==null)
|
||||||
|
visitAllDocuments(srch,cc);
|
||||||
|
else
|
||||||
srch.search(query,cc);
|
srch.search(query,cc);
|
||||||
|
|
||||||
} // end try
|
} // end try
|
||||||
|
|
Loading…
Reference in New Issue
Block a user