lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Rowe (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-1122) queryparser whitespace escaping and documentation?
Date Tue, 08 Jan 2008 16:33:34 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-1122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556934#action_12556934
] 

Steven Rowe commented on LUCENE-1122:
-------------------------------------

{quote}
shouldn't a space be considered "special" since it does trigger certain behavior? ... so shouldn't
QueryParser.escape(String) escape spaces as well as the other special characters?
{quote}

If escape() were changed to escape spaces, a previously supported use case (escaping an entire
query, consisting exclusively of terms in the default field) would no longer be supported.
 In this case, the Javadocs should be changed to be very explicit about the supported use
case(s).

> queryparser whitespace escaping and documentation?
> --------------------------------------------------
>
>                 Key: LUCENE-1122
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1122
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: QueryParser, Website
>            Reporter: Hoss Man
>
> as noted in this solr thread...
> http://www.nabble.com/PhraseQuery-and-WildcardQuery-to14503609.html#a14503609
> ...it's possible to escape a whitespace character in the value of a term or prefix query
by using a backslash so that the QueryParser will not treat it as "special" (ie: won't split
on it when dividing the input into chunks for analysis).
> at a minimum, this should be noted here...
> http://lucene.apache.org/java/docs/queryparsersyntax.html#Escaping%20Special%20Characters
> ...but it got me wondering...
>    * is this a side effect of something else, or will QueryParser really respect this
everywhere? even in field names? (i haven't tested) ... i think this is a result of QueryParser
allowing you to escape any character even if it isn't "special" to the syntax
>    * shouldn't a space be considered "special" since it does trigger certain behavior?
... so shouldn't QueryParser.escape(String) escape spaces as well as the other special characters?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message