On Thu, 7 Oct 2010 06:55:14 -0400, Allistair Crossley
<a...@roxxor.co.uk> wrote:
Hi,
Quick one ... we have some documents that have punctuation in their
indexed title, e.g.
!Fast
Note the leading exclamation.
Our tests show we cannot query for !Fast and find the document.
I've just taken a look and Solr is coming back with
Invalid boolean value: !Fast
It's a valid query for a valid value. I appreciate that exclamation
is a "not" operator. But how does one get around this scenario?
http://lucene.apache.org/java/3_0_0/queryparsersyntax.html#Escaping%20Special%20Characters
My instinct tells me that Solr indexes without the exclamation
through its tokenisation and other filters and so perhaps I should
just be stripping incoming queries of punctuation - particularly
leading/trailing?
This depends on your analyzer.
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
Cheers
--
Markus Jelsma - CTO - Openindex
http://www.linkedin.com/in/markus17
050-8536600 / 06-50258350