You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Bryan LaPlante <bl...@netwebapps.com> on 2003/05/21 22:39:25 UTC

help debugging

I am have a tough time locating the source of my problem. If anyone is
interested in using the taglib for lucene and would care to interact with me
on this, a second pair of eyes would be greatly appreciated.

Using the latest version of the Search tag in
jakarta-lucene-sandbox/contributions/taglib/WEB-INF/classes/com/netwebapps/t
aglib/search/SearchTag.java, it has only one difference compared to the code
that I am running.

Just before the doSearch() method is about to exit I put in this if/try
block:

if(searcher != null){

    try {

        searcher.close();

    } catch (IOException e) {

        if(throwOnException){

            throw new JspException("A problem occurred trying to close the
searcher : " + e);

        }

    }

}



all of the try/catch blocks in doSearch() do not run by default if there is
a problem unless you use the throwOnException attribute in the search tag
and set it to true. Here is where the weird part comes in.

If I turn debugging off by using the throwOnException attribute as described
above and I submit a query that does return results everything works fine,
until I run a query that is capable of crashing lucene's Searcher.search()
method (an empty string will do it) and at that point my abort code
refreshes the state of the variables to be handed to the page and tells any
future methods that tag processing should be stopped. So far the tag is
working just as I would expect. Now unless I change the value of
throwOnException and allow the tag to crash the page, every query run from
that point forward will not return a result but rather show 0 hitCount.

I have gone over the code a million time and I can not see where this could
be happening. If anyone is interested in taking a look at the tag and see if
anything is glaringly obvious, I would appreciate the heads up.

Bryan LaPlante





---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: not fetching all results that has same file name

Posted by Shoba Ramachandran <sh...@yahoo.com>.
Does anyone have this problem???

Thanks
Shoba
--- Shoba Ramachandran <sh...@yahoo.com>
wrote:
> Hi,
> 
> I have indexed these documents using lucene
> test.doc
> test.xls
> test.htm
> test.txt
> 
> When I search "DocName:test", it returns only the
> first one test.doc.
> But if I say "DocName:text Type:txt", it returns
> text.txt.
> 
> So why not just "DocName:test" return all the 4
> files?
> 
> Thanks for your help
> Shoba
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> lucene-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


not fetching all results that has same file name

Posted by Shoba Ramachandran <sh...@yahoo.com>.
Hi,

I have indexed these documents using lucene
test.doc
test.xls
test.htm
test.txt

When I search "DocName:test", it returns only the
first one test.doc.
But if I say "DocName:text Type:txt", it returns
text.txt.

So why not just "DocName:test" return all the 4 files?

Thanks for your help
Shoba

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org