Hi, Thank you for the references. I used edismax and it works. Thanks a lot. David
On Tue, Feb 26, 2013 at 7:33 PM, Jan Høydahl <jan....@cominvent.com> wrote: > Check out dismax (http://wiki.apache.org/solr/ExtendedDisMax) > > q="John Hopkins"&defType=edismax&qf=Author^1000 Editors^500 Raw_text^1 > > It's not strictly layered, but by playing with the numbers you can achieve > that effect > > -- > Jan Høydahl, search solution architect > Cominvent AS - www.cominvent.com > Solr Training - www.solrtraining.com > > 26. feb. 2013 kl. 14:55 skrev David Philip <davidphilipshe...@gmail.com>: > > > Hi Team, > > > > Is it possible to get search results in the order of fields names set? > > > > Ex: say, > > > > - I have 3 fields : Author, Editors, Raw_text, > > - User searched for keyword: "John Hopkins", > > - Search query is : q= (Author: "John Hopkins" OR Editors:"John > Hopkins" > > OR Raw_Text:"John Hopkins") > > > > Expected result: > > Result should be returned such that it should first get all the documents > > which had "John hopkins" in field author and then the documents which had > > "John Hopkins" in Editors and then in documents which had John Hopkins in > > Raw_text. So if keyword is there in the main field author, it should get > > that document first followed by editor and raw text. > > > > > > <result name="response" numFound="3" start="0"> > > <doc> > > <str name="Author">John Hopkins</str> > > <str name="Editors">test test test</str> > > <str name="Raw_text">Mr. John Hopkins book</str> > > </doc> > > <doc> > > <str name="Author">Micheal Ranold</str> > > <str name="Editors">John Hopkins, Micheal, Martin</str> > > <str name="Raw_text">Micheal is the main author, John Hopkins is > co-author > > </str> > > </doc> > > <doc> > > <str name="Author">Feymenn</str> > > <str name="Editors">Micheal, Martin</str> > > <str name="Raw_text">John Hopkins</str> > > </doc> > > </result> > >