lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raymond Wiker <rwi...@gmail.com>
Subject Re: is phrase search possible in solr
Date Fri, 19 Apr 2013 15:08:28 GMT
On Apr 19, 2013, at 16:59 , vicky desai <vicky.desai@germinait.com> wrote:
> I want to do a phrase search in solr without analyzers being applied to it 
> eg - If I search for *"DelhiDareDevil"* (i.e - with inverted commas)it
> should search the exact text and not apply any analyzers or tokenizers on
> this field
> However if i search for *DelhiDareDevil* it should use tokenizers and
> analyzers and split it to something like this *delhi dare devil*
> 
> My schema definition for this is as follows
> 
>    <fieldType name="text" class="solr.TextField"
>    			positionIncrementGap="100" autoGeneratePhraseQueries="false">
>    			<analyzer type="index">
>    				<tokenizer class="solr.WhitespaceTokenizerFactory" />
>    				<filter class="solr.WordDelimiterFilterFactory"
>    					generateWordParts="1" generateNumberParts="1" catenateWords="1"
>    					catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"
> preserveOriginal="1"/>
>    				<filter class="solr.LowerCaseFilterFactory" />
>    			</analyzer>
>    			<analyzer type="query">
>    				<tokenizer class="solr.WhitespaceTokenizerFactory" />
>    				<filter class="solr.WordDelimiterFilterFactory"
>    					generateWordParts="1" generateNumberParts="1" catenateWords="1"
>    					catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"
> preserveOriginal="1"/>
>    				<filter class="solr.LowerCaseFilter``Factory" />
>    			</analyzer>
>    		</fieldType>
> 
>    <field name="cContent" type="text" indexed="true" stored="true"
> multiValued="false"/>
> 
> any help would be appreciated


First of all, it appears that you have a typo in the definition for the LowerCaseFilter for
the query analyzer.

Secondly, as the two analyzers appear to be identical (except forn the probable typo), I think
you could just specify it once, without specifying the type.



Mime
View raw message