On Mon, May 16, 2011 at 7:05 PM, Gnanakumar <gna...@zoniac.com> wrote:
> Hi,
>
> I'm using Apache Solr v3.1.
>
> How do I configure/allow Solr to both index and query the term "c#" as a
> whole word/term?  From "Analysis" page, I could see that the term "c#" is
> being reduced/converted into just "c" by solr.WordDelimiterFilterFactory.
[...]

Yes, as you have discovered the analyzers for the field type in
question will affect the values indexed.

To index "c#" exactly as is, you can use the "string" type, instead
of the "text" type. However, what you probably want some filters
to be applied, e.g., LowerCaseFilterFactory. Take a look at the
definition of the fieldType "text" in schema.xml, define a new field
type that has only the tokenizers and analyzers that you need, and
use that type for your field. This Wiki page should be helpful:
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters

Regards,
Gora

Reply via email to