Use the field analysis tool to see how the data is being analyzed in both the fields.
Cheers Avlesh On Fri, Oct 9, 2009 at 12:56 AM, R. Tan <[email protected]> wrote: > Hmm... I don't quite get the desired results. Those starting with "cha" are > now randomly ordered. Is there something wrong with the filters I applied? > > > On Thu, Oct 8, 2009 at 7:38 PM, Avlesh Singh <[email protected]> wrote: > > > Filters? I did not mean filters at all. > > I am in a mad rush right now, but on the face of it your field > definitions > > look right. > > > > This is what I asked for - > > q=(autoComplete2:cha^10 autoComplete:cha) > > > > Lemme know if this does not work for you. > > > > Cheers > > Avlesh > > > > On Thu, Oct 8, 2009 at 4:58 PM, R. Tan <[email protected]> wrote: > > > > > 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 <[email protected]> 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 < > > [email protected] > > > >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. > > > >> > > > >> > > > > > > > > > >
