views:

167

answers:

1

Hi,

I am trying to search on a field declared as 'text' using the wildcard '*' but am getting mixed results. Basically, it seems to me that it's stripping off the '*' character and isn't handling numbers or spaces well.

I'm using the 'text' field type for case insensitive fields but after running an analysis, am starting to think itmight be the wrong type to use as it runs a lot more filters when compared with the string field. Basically all I want is a field type that can index or search on lowercase only with spaces stripped out (and works with wildcards). Is such a type available?

Thanks MARCO

+1  A: 

If you look at your solrconfig.xml, you can see the definition of your "text" type. You should see a WhitespaceTokenizerFactory as the first tokenizer. This indicates that the content of the fields is cut on white spaces. Down in the list you should have a LowerCaseFilterFactory filter. This will lower-cased all words. If you have at least those two for both the index and query analyzer for the "text" type, you should be ok.

For you problems with numbers, take a look at the settings for the WordDelimiterFilterFactory filter. The generateNumberParts settings might not be what you want.

Pascal Dimassimo