lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gora Mohanty <>
Subject Re: How to index and query "C#" as whole term?
Date Mon, 16 May 2011 14:46:51 GMT
On Mon, May 16, 2011 at 7:05 PM, Gnanakumar <> 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:


View raw message