That's not what I get. This is for Solr 3.3, but there's no
reason that I know of that other versions should give
different results.
Here's the field def form the 3.3 example, this is just
the standard implementation.
<fieldType name="text_en_splitting" class="solr.TextField"
positionIncrementGap="100" autoGeneratePhraseQueries="true">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<!-- in this example, we will only use synonyms at query time
<filter class="solr.SynonymFilterFactory"
synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
-->
<!-- Case insensitive stop word removal.
add enablePositionIncrements=true in both the index and query
analyzers to leave a 'gap' for more accurate phrase queries.
-->
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="stopwords_en.txt"
enablePositionIncrements="true"
/>
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="1"
catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.KeywordMarkerFilterFactory"
protected="protwords.txt"/>
<filter class="solr.PorterStemFilterFactory"/>
</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_en.txt"
enablePositionIncrements="true"
/>
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="0"
catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.KeywordMarkerFilterFactory"
protected="protwords.txt"/>
<filter class="solr.PorterStemFilterFactory"/>
</analyzer>
</fieldType>
At index time, it produces the tokens for manchester-united
pos 1 pos 2
manchester united
manchesterunited
at query time, manchesterunited matches, it isn't transformed and
matches on the second row
manchester united and manchester-united
both parse to
manchester united
and match the first row.
So somehow we're not doing the same thing. Try
attaching &debugQuery=on to your query and post the results.
Also try looking at the admin/analysis page and see what
that tells you.
Best
Erick
P.S. Did you re-index after your schema changes?
On Tue, Aug 9, 2011 at 11:03 AM, roySolr <[email protected]> wrote:
> Ok, i there are three query possibilities:
>
> Manchester-united
> Manchester united
> Manchesterunited
>
> The original name of the club is "manchester-united".
>
>
> generateWordParts will fixes two of these possibilities:
>
> "Manchester-united" => "manchester","united"
>
> I can search for "Manchester-united" and "manchester" "united". When i
> search for "manchesterunited" i get no results.
>
> To fix this i could use catenateWords:
>
> "Manchester-united" => "manchesterunited"
>
> In this situation i can search for "Manchester-united" and
> "manchesterunited". When i search for "manchester united" i get no results.
> The catenateWords option will also fixes only 2 situations.
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Strip-special-chars-like-tp3238942p3239256.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>