I am capturing all the user entered search terms in to the database and the number of times the search term is entered.Let us say
"laptop" has entered 100 times. "laptop bag" has entered 80 times. "laptop battery" has entered 90 times. I am using terms component for auto suggest feature.If the user types for "lap" , i am getting response as "laptop bag" "laptop" "laptop battery" But i should get "laptop" "laptop battery" "laptop bag" As "laptop" is entered by more number of times it should come first in the result.In this case i need to utilize the WEIGHTAGE(the number times searched) for sorting. Regards, Siva -----Original Message----- From: "Erick Erickson [via Lucene]" <ml-node+1910694-73953797-225...@n3.nabble.com> Sent: Tuesday, November 16, 2010 7:52am To: "sivaprasad" <sivaprasa...@echidnainc.com> Subject: Re: Term component sort is not working You haven't defined what you want to see, so it's hard to help. What does "top" mean? The order you put it into the index? Lexical sort? Frequency count? Numerical ordering? Why do you want to do this? Perhaps if you explained your use case we'd be able to offer some alternatives. Best Erick On Tue, Nov 16, 2010 at 1:22 AM, sivaprasad <sivaprasa...@echidnainc.com>wrote: > > > Hi, > > I have given the terms component configuration. > > <searchComponent name="termsComponent" > class="org.apache.solr.handler.component.TermsComponent"/> > > <requestHandler name="/autoSuggest" > class="org.apache.solr.handler.component.SearchHandler"> > <lst name="defaults"> > <bool name="terms">true</bool> > <str name="terms.fl">autoSuggestTerm</str> > <str name="terms.sort">index</str> > </lst> > <arr name="components"> > <str>termsComponent</str> > </arr> > </requestHandler> > > And i have two fileds in schema file > > <field name="autoSuggestTerm" type="string" indexed="true" stored="true"/> > <field name="WEIGHTAGE" type="integer" stored="true"/> > > Now iam trying to sort the terms which are returned by terms component > based > on WEIGHTAGE field. > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Term-component-sort-is-not-working-tp1905059p1909386.html > Sent from the Solr - User mailing list archive at Nabble.com. > ______________________________________ View message @ http://lucene.472066.n3.nabble.com/Term-component-sort-is-not-working-tp1905059p1910694.html To start a new topic under Solr - User, email ml-node+472068-1030716887-225...@n3.nabble.com To unsubscribe from Solr - User, click http://lucene.472066.n3.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=472068&code=c2l2YXByYXNhZC5qQGVjaGlkbmFpbmMuY29tfDQ3MjA2OHwtMjAyODMzMTY4OQ== -- View this message in context: http://lucene.472066.n3.nabble.com/Term-component-sort-is-not-working-tp1905059p1910874.html Sent from the Solr - User mailing list archive at Nabble.com.