Hi Avlesh,

I can't seem to get the scores right.

I now have these types for the fields I'm targeting,

<fieldType name="autoComplete" class="solr.TextField"
positionIncrementGap="1">
      <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory" />
        <filter class="solr.NGramFilterFactory" minGramSize="1"
maxGramSize="20"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory" />
      </analyzer>
    </fieldType>
    <fieldType name="autoComplete2" class="solr.TextField"
positionIncrementGap="1">
      <analyzer type="index">
        <tokenizer class="solr.KeywordTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory" />
        <filter class="solr.NGramFilterFactory" minGramSize="1"
maxGramSize="20"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.KeywordTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory" />
      </analyzer>
    </fieldType>

My query is this,
q=*:*&fq=autoCompleteHelper:cha+autoCompleteHelper2:cha&qf=autoCompleteHelper^10.0+autoCompleteHelper2^1.0

What should I tweak from the above config and query?

Thanks,
Rih


On Thu, Oct 8, 2009 at 4:38 PM, R. Tan <tanrihae...@gmail.com> wrote:

> I will have to pass on this and try your suggestion first. So, how does
> your suggestion (1 and 2) boost the my startswith query? Is it because of
> the n-gram filter?
>
>
>
> On Thu, Oct 8, 2009 at 2:27 PM, Sandeep Tagore 
> <sandeep.tag...@gmail.com>wrote:
>
>>
>> Yes it can be done but it needs some customization. Search for custom sort
>> implementations/discussions.
>> You can check...
>>
>> http://lucene.apache.org/solr/api/org/apache/solr/schema/RandomSortField.html
>> .
>> Let us know if you have any issues.
>>
>> Sandeep
>>
>>
>> R. Tan wrote:
>> >
>> > This might work and I also have a single value field which makes it
>> > cleaner.
>> > Can sort be customized (with indexOf()) from the solr parameters alone?
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Scoring-for-specific-field-queries-tp25798390p25799055.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
>

Reply via email to