Hi,

 

i'm using solr 3.5 with the following configuration:

 

<fieldType name="text_auto" class="solr.TextField">

<analyzer type="index">

<!--<tokenizer class="solr.KeywordTokenizerFactory"/>-->

<tokenizer class="solr.StandardTokenizerFactory"/>

<filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="25"
/>

 

<filter class="solr.LowerCaseFilterFactory"/>

<!--<filter class="solr.EdgeNGramFilterFactory" minGramSize="1"
maxGramSize="25" />-->

</analyzer>

<analyzer type="query">

<!--<tokenizer class="solr.KeywordTokenizerFactory" />-->

<tokenizer class="solr.StandardTokenizerFactory"/>

<filter class="solr.LowerCaseFilterFactory"/>

<filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="25"
/>

</analyzer>

</fieldType>

 

 

<fieldType name="text" class="solr.TextField" positionIncrementGap="100">

<analyzer>

  <tokenizer class="solr.WhitespaceTokenizerFactory"/>

  <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1"
generateNumberParts="1" catenateWords="1" catenateNumbers="1"
catenateAll="0" splitOnCaseChange="1"/>

  <filter class="solr.LowerCaseFilterFactory"/>

</analyzer>

</fieldType>

 

<field name="id" type="string" indexed="true" stored="true" required="true"
/>

<field  name="title" type="text_auto" indexed="true" stored="true"
multiValued="false"/>

<field name="description" type="text" indexed="true" stored="true"
multiValued="false"/>

<field name="title_autocomplete" type="text_auto" indexed="true"
stored="true" multiValued="false"/>

<field name="pic_thumb" type="text" indexed="true" stored="true"
multiValued="false"/>

<field name="category" type="text" indexed="true" stored="true"
multiValued="false"/>

<field name="category_id" type="int"  indexed="true" stored="true"
multiValued="false"/>

<field name="top_id" type="int" intdexed="true" stored="true"
multiValued="false"/>

 

 

I'm using it that way, because I want to have an autocompletion list. Now
I'm wondering if I can influence some of the results I'm getting. I have a
lot of categories in my database. If I for example search for "iphone 3" I
would expect to get all iphone 3 from the category electronic. If I'm
searching for "iphone 3" I get the following results  "iPhone - the book" ,
"Apple iphone 4", "My iphone & I" , etc.

 

If I instead write "iphone 3g", then I get the proper results. a lot of
iphones .

 

Why did my first search didn't give me the results that I'm getting with the
second search term? I would expect that the behavior should be the same. Is
it possible to configure solr in such a way, that he returns with the first
searchterm the results of the second operation?

 

Thanks,

Rk

Reply via email to