Yes, you can do all of that... but it would be a non-trivial amount of effort - the kind of thing consultants get paid real money to do. You should also consider doing it in a middleware application layer, using possibly multiple queries of separate Solr collections. Otherwise, your index might become too large and unwieldy (and risk giving bad or misleading results), unless the number of products is rather small.

-- Jack Krupansky

-----Original Message----- From: hassancrowdc
Sent: Friday, April 19, 2013 11:48 AM
To: solr-user@lucene.apache.org
Subject: Searching

I want to search so that:

- if i write an alphabet it returns all the items that start with that
alphabet(a returns apple, aspire etc).

- if i ask for a whole string, it returns me just the results with exact
string. (like search for Samsung S3 then only result is samsung s3)

-if i ask for something it returns me anything that is similar to what i m
asking.(like if i only write 'sam' it should return 'samsung')

right now i m using text_en_splitting for my field type, it looks like this:

<fieldType name="text_en_splitting" class="solr.TextField"
positionIncrementGap="100" autoGeneratePhraseQueries="true">
     <analyzer type="index">
       <tokenizer class="solr.WhitespaceTokenizerFactory"/>


       <filter class="solr.StopFilterFactory" ignoreCase="true"
words="lang/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="lang/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"/>
<filter class="solr.PositionFilterFactory" />
     </analyzer>
   </fieldType>



--
View this message in context: http://lucene.472066.n3.nabble.com/Searching-tp4057328.html Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to