To do exactly what you want, you might have to do a custom analyzer. To Solr, even with the WDF filter in the example text_en_splitting field type, which tokenizes "A0001487" as "a 0001487", the "0001487" is simply text characters, not a number. You could develop your own "number simplifier" filter which analyzed "0001487" as "0001487" and "1487" at the same position.

As far as "kev", you could define synonyms for such terms. Or, use a wildcard, such as "kev*". Or, use the "edge N-gram filter".

See:
http://lucene.apache.org/solr/api/org/apache/solr/analysis/EdgeNGramFilterFactory.html
http://lucene.apache.org/core/3_6_0/api/all/org/apache/lucene/analysis/ngram/EdgeNGramTokenFilter.html

You may also want to consider storing part numbers as both a text (analyzed) field and a "string" field so you can do precise wildcard matching (on string fields).

-- Jack Krupansky

-----Original Message----- From: prasenjit
Sent: Friday, June 22, 2012 7:49 AM
To: solr-user@lucene.apache.org
Subject: Unable to search with the number contains in Product Part number and the string sontains the name of the product

Hi,
I am using Solr search in Websphere Commerce 7.While searching with the
product partnumber and the first part of the name string I am able to search
the particular product along with it's details.But when I am searching with
part of a partnumber say for example '1487' instead of full part number
'A0001487',the search result is  giving me empty.
Similarly If I search with 'Kelver' for product 'Kevlar Brake Pads',the
search result is coming.But If I search with 'Kev',the search result is
empty from the Solr itself.
I tried to see the loggs in details and I founf after connecting to Solr
from WCS end,it is fetching the
search tearms as

[6/22/12 17:13:26:405 IST] 000000a0 queryservice  >
com.ibm.commerce.foundation.internal.server.services.dataaccess.queryservice.SubstitutionHelper
getControlValues ENTRY LANGUAGES {SearchTerms.1=SearchTerms=[Kev],,
_wcf.dataLanguageIds.0=_wcf.dataLanguageIds=[-1],,
AssociationType.1=AssociationType=[2,3,1],

So,my query  is where do I need to make the changes  to fetch the actual
result for this.
Please suggest me.Any help is highly appriciated.
Thanks
Prasenjit

--
View this message in context: http://lucene.472066.n3.nabble.com/Unable-to-search-with-the-number-contains-in-Product-Part-number-and-the-string-sontains-the-name-oft-tp3990959.html Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to