lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 30985] New: - Query.toString() and Query.toString(String field) not escaping special characters
Date Wed, 01 Sep 2004 08:56:00 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30985>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30985

Query.toString() and Query.toString(String field) not escaping special characters

           Summary: Query.toString() and Query.toString(String field) not
                    escaping special characters
           Product: Lucene
           Version: 1.4
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Search
        AssignedTo: lucene-dev@jakarta.apache.org
        ReportedBy: rlaboisse@opsys.fr


The Javadoc says that Query.toString(String field) produces a string 
representation that is readable by QueryParser.
QueryParser gives the ability to escape special characters
+ - && || ! ( ) { } [ ] ^ " ~ * ? : \
with a preceding backslash, but Query.toString() doesn't make any escaping.
So, QueryParser can parse dc\:title:hugo into a TermQuery with field dc:title 
and text hugo but toString() gives back dc:title:hugo (which gives a somewhat 
different result when parsed again, actually a TermQuery with field dc and 
text title, hugo goes in outer space).

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


Mime
View raw message