[
https://issues.apache.org/jira/browse/LUCENE-373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14643855#comment-14643855
]
Harish Kayarohanam commented on LUCENE-373:
-------------------------------------------
So as far my analysis goes , there is no must fix bug here . But there is
decision that is pending whether the proposal above can be brought
in or not in order to allay the confusing and silent leaving out of terms in
search . If the community decides that it is worth doing, then may be I can
give it a try to get in this feature .
On the other hand, if the community decides that it is not worth doing, then we
can leave it( or close this issue as there is nothing more to do in this issue).
> Query parts ending with a colon are handled badly
> -------------------------------------------------
>
> Key: LUCENE-373
> URL: https://issues.apache.org/jira/browse/LUCENE-373
> Project: Lucene - Core
> Issue Type: Bug
> Components: core/queryparser
> Affects Versions: 1.4
> Environment: Operating System: Windows 2000
> Platform: PC
> Reporter: Andrew Stevens
> Priority: Minor
> Labels: newdev
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]