Thanks Yonik! Cheers for the extra advice too.

On 24 Aug 2007, at 17:14, Yonik Seeley wrote:

On 8/24/07, Simon Peter Nicholls <[EMAIL PROTECTED]> wrote:
I've just noticed that for ISO 2 character country codes such as "BE"
and "IT", my queries are not working as expected.

The field is being stored as country_t, dynamically from acts_as_solr
v0.9, as follows (from schema.xml):

<dynamicField name="*_t" type="text" indexed="true" stored="false"/>

The thing that sprang to my mind was that BE and IT are also valid
words, and perhaps Solr is doing something I'm not expecting
(ignoring them, which would make sense mid-text). With this in mind,
perhaps an _s type of field is needed, since it is indeed a single
important string rather than text composed of many strings.

Right, type "text" by default in solr has stopword removal and
stemmers (see the fieldType definition in the schema.xml)

A string would give you exact values with no analysis at all.  If you
want to lowercase (for case insensitive matches) start off with a text
field and configure it with keyword analyzer followed by lowercase
filter).  If it can have multiple words, an analyzer that had a
whitespace analyzer followed by a lowercase filter would fit the bill.

-Yonik

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to