> > I guess we don't need to depend on scores all the times. > You can use custom sort to sort the results. Take a dynamicField, fill it > with indexOf(keyword) value, sort the results by the field in ascending > order. Then the records which contain the keyword at the earlier position > will come first. > Warning: This is a bad idea for multiple reasons:
1. If the word "computer" occurs in multiple times in a document what would you do in that case? Is this dynamic field supposed to be multivalued? I can't even imagine what would you do if the word "computer" occurs in multiple documents multiple times? 2. Multivalued fields cannot be sorted upon. 3. One needs to know the unique number of such keywords before implementing because you'll potentially end up creating those many fields. Cheers Avlesh On Thu, Oct 8, 2009 at 11:10 AM, Sandeep Tagore <sandeep.tag...@gmail.com>wrote: > > Hi Rihaed, > I guess we don't need to depend on scores all the times. > You can use custom sort to sort the results. Take a dynamicField, fill it > with indexOf(keyword) value, sort the results by the field in ascending > order. Then the records which contain the keyword at the earlier position > will come first. > > Regards, > Sandeep > > > R. Tan wrote: > > > > Hi, > > How can I get wildcard search (e.g. cha*) to score documents based on the > > position of the keyword in a field? Closer (to the start) means higher > > score. > > > > -- > View this message in context: > http://www.nabble.com/Scoring-for-specific-field-queries-tp25798390p25798657.html > Sent from the Solr - User mailing list archive at Nabble.com. > >