lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Löfquist <daniel.lofqu...@it.cdon.com>
Subject Searching "inside of words"
Date Thu, 17 Apr 2008 09:46:15 GMT
Hi,

I'm still pretty new to Solr. We're using it for searching on our site 
right now though.

The configuration is however pretty much based on the example-files that 
come with Solr and there's one type of search that I can't get to work.

Each item has fields called "title" and "description", both of which are 
of type "text".

The type "text" is defined like this in our schema.xml :

<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>

My problem is that if I have an item with "title"="Termobyxa", a search 
for "Termo" gives me a hit but if I search for "ermo" or "byxa" I get no 
hit. How do I make it so that this kind of search "inside a word" 
returns a hit?

Sincerely,

Daniel Löfquist


Mime
View raw message