lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan LaPlante" <>
Subject help debugging
Date Wed, 21 May 2003 20:39:25 GMT
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
aglib/search/, 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

if(searcher != null){

    try {


    } catch (IOException e) {


            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
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:
For additional commands, e-mail:

View raw message