+1. Fault tolerance good. ParseExceptions bad.
Can you open a JIRA issue for it? If you feel you see the problem, a
patch would be great, too.
-Grant
On Jun 2, 2008, at 5:15 PM, Sean Timm wrote:
It seems that the DisMaxRequestHandler tries hard to handle any
query that the user can throw at it.
From http://wiki.apache.org/solr/DisMaxRequestHandler:
"Quotes can be used to group phrases, and +/- can be used to denote
mandatory and optional clauses ... but all other Lucene query parser
special characters are escaped to simplify the user experience. The
handler takes responsibility for building a good query from the
user's input" [...] "any query containing an odd number of quote
characters is evaluated as if there were no quote characters at all."
Would it be outside the scope of the DisMaxRequestHandler to also
handle improper use of +/-? There are a couple of other cases where
a user query could fail to parse. Basically they all boil down to a
+ or - operator not being followed by a term. A few examples of
queries that fail:
chocolate cookie -
chocolate -+cookie
chocolate --cookie
chocolate - - cookie
-Sean
Grant Ingersoll wrote:
See http://wiki.apache.org/solr/DisMaxRequestHandler
Namely, "-" is the prohibited operator, thus, -- really is
meaningless. You either need to escape them or remove them
-Grant
On Jun 2, 2008, at 7:14 AM, Bram de Jong wrote:
hello all,
just a small note to say that the dismax query parser crashes on:
q = "apple -- pear"
I'm running through a stored batch of my users' searches and it went
down on the double dash :)
- Bram
--
http://freesound.iua.upf.edu
http://www.smartelectronix.com
http://www.musicdsp.org
--------------------------
Grant Ingersoll
http://www.lucidimagination.com
Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ
--------------------------
Grant Ingersoll
http://www.lucidimagination.com
Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ