You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by bu...@apache.org on 2003/10/09 11:17:39 UTC

DO NOT REPLY [Bug 9970] - QueryParser blows up when fed malformed query

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9970>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9970

QueryParser blows up when fed malformed query

jakarta@ehatchersolutions.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From jakarta@ehatchersolutions.com  2003-10-09 09:17 -------
I believe QueryParser now handles this situation appropriately and throws a ParseException:

  public void testParseException() {
    try {
//      QueryParser.parse("^&#", "contents", analyzer);
      QueryParser.parse("sach^0.1429s^0.0227 morton h. & co ^ 0.0030.dba company ^ 0.0149", 
"contents", analyzer);
    } catch (ParseException expected) {
      // expression is invalid, as expected
      return;
    }

    fail("ParseException expected, but not thrown");
  }

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