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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to