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=34453>. 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=34453 Summary: Query parts ending with a colon are handled badly Product: Lucene Version: 1.4 Platform: PC OS/Version: Windows 2000 Status: NEW Severity: normal Priority: P2 Component: QueryParser AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] I'm using Lucene 1.4.3, running Query query = QueryParser.parse(queryString, "contents", new StandardAnalyzer()); If queryString is "search title:" i.e. specifying a field name without a corresponding value, I get a parsing exception: Encountered "<EOF>" at line 1, column 8. Was expecting one of: "(" ... <QUOTED> ... <TERM> ... <PREFIXTERM> ... <WILDTERM> ... "[" ... "{" ... <NUMBER> ... If queryString is "title: search", there's no exception. However, the parsed query which is returned is "title:search". If queryString is "title: contents: text", the parsed query is "title:contents" and the "text" part is ignored completely. When queryString is "title: text contents:" the above exception is produced again. This seems inconsistent. Given that it's pointless searching for an empty string (since it has no tokens), I'd expect both "search title:" & "title: search" to be parsed as "search" (or, given the default field I specified, "contents:search"), and "title: contents: text" & "title: text contents:" to parse as "text" ("contents:text") i.e. parts which have no term are ignored. At worst I'd expect them all to throw a ParseException rather than just the ones with the colon at the end of the string. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
