The whole idea behind Solr is to solve the problem that you just explain, in 
particular what you need is to define the title field as a solr.TextField and 
then define a tokenizer. The tokenizer essentially will transform the initial 
text into tokens. Solr has several tokenizers, each which its special 
characteristics, nevertheless one of the must commons is the StandardTokenizer, 
but again your choice will be influenced by how do you want to “divide” your 
initial text into “parts” or tokens. Basically when you fire a query against 
Solr (put it in simple words) will match the tokens of your query to the tokens 
stored in each of your documents, and the will output a list of matching 
documents.

One simple example of a fieldType you could use is:

        <fieldType name="text" class="solr.TextField" sortMissingLast="true">
            <analyzer>
                <tokenizer class="solr.StandardTokenizerFactory"/>
                <filter class="solr.LowerCaseFilterFactory"/>
            </analyzer>
        </fieldType>

In this case the tokenizer will split the initial text into the tokens, and 
then each token will be lowercased so when you query you wouldn’t have to worry 
about the capitalization of the terms.

Hope it helps

On Nov 9, 2014, at 3:26 PM, PeriS <peri.subrahma...@htcinc.com> wrote:

> I was wondering if there is a way to search on partial names? Ex; Field is a 
> string and stores values like titles of a book; When searching part of the 
> title may be supplied; How do I resolve this? Please let me know
> 
> 
> Thanks
> -PeriS
> 
> 
> 
> 
> 
> 
> *** DISCLAIMER *** This is a PRIVATE message. If you are not the intended 
> recipient, please delete without copying and kindly advise us by e-mail of 
> the mistake in delivery.
> NOTE: Regardless of content, this e-mail shall not operate to bind HTC Global 
> Services to any order or other contract unless pursuant to explicit written 
> agreement or government initiative expressly permitting the use of e-mail for 
> such purpose.
> 
> 

Reply via email to