lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anima13 <anima...@hotmail.com>
Subject Solr, insensitive query
Date Sat, 22 Jan 2011 14:49:13 GMT

Hi all.

I have a problem with Solr.

I want to do query case-insensitive.

I configured it but its queries are case-sensitive, for example (titulo:
Esto*) + (titulo: *esto*)

Here is an example of my sorlconfig.xml is:

<?xml version="1.0" encoding="UTF-8"?>

<schema name="liferay" version="1.1">
	<types>
		<fieldType name="string" class="solr.StrField" sortMissingLast="true"
omitNorms="true" />
		<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"
omitNorms="true" />
		<fieldType name="integer" class="solr.IntField" omitNorms="true" />
		<fieldType name="long" class="solr.LongField" omitNorms="true" />
		<fieldType name="float" class="solr.FloatField" omitNorms="true" />
		<fieldType name="double" class="solr.DoubleField" omitNorms="true" />
		<fieldType name="sint" class="solr.SortableIntField"
sortMissingLast="true" omitNorms="true" />
		<fieldType name="slong" class="solr.SortableLongField"
sortMissingLast="true" omitNorms="true" />
		<fieldType name="sfloat" class="solr.SortableFloatField"
sortMissingLast="true" omitNorms="true" />
		<fieldType name="sdouble" class="solr.SortableDoubleField"
sortMissingLast="true" omitNorms="true" />
		<fieldType name="date" class="solr.DateField" sortMissingLast="true"
omitNorms="true" />
		<fieldType name="text_ws" class="solr.TextField"
positionIncrementGap="100">
			<analyzer>
				<tokenizer class="solr.WhitespaceTokenizerFactory" />
			</analyzer>
		</fieldType>
		<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
			<analyzer type="index">
				<tokenizer class="solr.WhitespaceTokenizerFactory" />
				<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" />
				<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1"
generateNumberParts="1" catenateWords="1" catenateNumbers="1"
catenateAll="0" />
				<filter class="solr.LowerCaseFilterFactory" />
				<filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt" />
				<filter class="solr.RemoveDuplicatesTokenFilterFactory" />
			</analyzer>
			<analyzer type="query">
				<tokenizer class="solr.WhitespaceTokenizerFactory" />
				<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true" />
				<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" />
				<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1"
generateNumberParts="1" catenateWords="0" catenateNumbers="0"
catenateAll="0" />
				<filter class="solr.LowerCaseFilterFactory" />
				<filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt" />
				<filter class="solr.RemoveDuplicatesTokenFilterFactory" />
			</analyzer>
		</fieldType>
		<fieldType name="textTight" class="solr.TextField"
positionIncrementGap="100" >
			<analyzer>
				<tokenizer class="solr.WhitespaceTokenizerFactory" />
				<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="false" />
				<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" />
				<filter class="solr.WordDelimiterFilterFactory" generateWordParts="0"
generateNumberParts="0" catenateWords="1" catenateNumbers="1"
catenateAll="0" />
				<filter class="solr.LowerCaseFilterFactory" />
				<filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt" />
				<filter class="solr.RemoveDuplicatesTokenFilterFactory" />
			</analyzer>
		</fieldType>
		<fieldType name="alphaOnlySort" class="solr.TextField"
sortMissingLast="true" omitNorms="true">
			<analyzer>
				<tokenizer class="solr.KeywordTokenizerFactory" />
				<filter class="solr.LowerCaseFilterFactory" />
				<filter class="solr.TrimFilterFactory" />
				<filter class="solr.PatternReplaceFilterFactory" pattern="([^a-z])"
replacement="" replace="all" />
			</analyzer>
		</fieldType>
		<fieldtype name="ignored" stored="false" indexed="false"
class="solr.StrField" />
	</types>
	<fields>
		<field name="comments" type="text" indexed="true" stored="true" />
		<field name="content" type="text" indexed="true" stored="true" />
		<field name="description" type="text" indexed="true" stored="true" />
		<field name="name" type="string" indexed="true" stored="true" />
		<field name="properties" type="text" indexed="true" stored="true" />
		<field name="title" type="text" indexed="true" stored="true" />
		<field name="uid" type="string" indexed="true" stored="true" />
		<field name="url" type="text" indexed="true" stored="true" />
		<field name="userName" type="text" indexed="true" stored="true" />
		<field name="version" type="text" indexed="true" stored="true" />
		<dynamicField name="*" type="string" indexed="true" multiValued="true"
stored="true" />
		<dynamicField name="*TagNames" type="text" indexed="true"
multiValued="true" stored="true" />
	</fields>
	<uniqueKey>uid</uniqueKey>
	<defaultSearchField>content</defaultSearchField>
	<solrQueryParser defaultOperator="OR" />
</schema>

Any suggestion for do case-insensitive querys???

Thank you in advance

-- 
View this message in context: http://lucene.472066.n3.nabble.com/Solr-insensitive-query-tp2308640p2308640.html
Sent from the Lucene - General mailing list archive at Nabble.com.

Mime
View raw message