I don't see a good way to fix this without some heuristic you'd have to
implement to munge your query. There's no good for SOLR to intuit that
what you want is a partial match in this case. If you can create some
rules like "remove any single letters after numbers in the query"
that would be "good enough", you might get something satisfactory.
But I don't know of a way for SOLR to do this for you....

And if you *can't* write a "good enough" rule, this sounds like an
intractable problem.

Not much help I know....

On Sat, Feb 13, 2010 at 1:13 AM, Kevin Osborn <osbo...@yahoo.com> wrote:

> Right now if I have the query model:(Nokia BH-212V), the parser turns this
> into +(model:nokia model:"bh 212 v"). The problem is that I might have a
> model called Nokia BH-212, so this is completely missed. In my case, I would
> like my query to be +(model:nokia model:bh model:212 model:v).
>
> This is my schema for the field:
>
>    <fieldType name="text" class="solr.TextField" positionIncrementGap="100"
> >
>      <analyzer type="index">
>        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>    <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt"
> ignoreCase="true" expand="true" />
>        <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt" enablePositionIncrements="true" />
>        <filter class="solr.WordDelimiterFilterFactory"
> splitOnCaseChange="1" generateWordParts="1" generateNumberParts="1"
> catenateWords="1" catenateNumbers="1" catenateAll="1" />
>        <filter class="solr.LowerCaseFilterFactory" />
>    <filter
> class="com.lucidimagination.solrworks.analysis.LucidKStemFilterFactory"
> protected="protwords.txt" />
>        <filter class="solr.RemoveDuplicatesTokenFilterFactory" />
>      </analyzer>
>      <analyzer type="query">
>        <tokenizer class="solr.WhitespaceTokenizerFactory" />
>    <filter class="solr.SynonymFilterFactory" synonyms="query_synonyms.txt"
> ignoreCase="true" expand="true" />
>        <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt" />
>        <filter class="solr.WordDelimiterFilterFactory"
> splitOnCaseChange="1" generateWordParts="1" generateNumberParts="1"
> catenateWords="0" catenateNumbers="0" catenateAll="0" />
>        <filter class="solr.LowerCaseFilterFactory" />
>    <filter
> class="com.lucidimagination.solrworks.analysis.LucidKStemFilterFactory"
> protected="protwords.txt" />
>        <filter class="solr.RemoveDuplicatesTokenFilterFactory" />
>      </analyzer>
>    </fieldType>
>
>
>
>

Reply via email to