hi, thanks for your answer......... I had tried using TopFieldDocCollector but i got error saying "value is too small or too large" when i passed 5000 as numHits argument value...please suggest a valid value to pass...
Thanks. Anshum wrote: > > Hi Mitu, > > Could we have usage/implementation based questions at the user forum. > Would help keep things segregated :). > About your problem though, I wouldn't know about the .net port. You > could (in Java Lucene) use: > public TopFieldDocCollector(IndexReader reader, Sort sort, int > numHits) > i.e.: > mySearcher.search(query, TopFieldDocCollector(IndexReader reader, Sort > sort, int > numHits), true); > > Perhaps you could try doing something of this sort. Should work as I > had tried something of this sort successfully a long time ago! > > > On Sat, Jan 31, 2009 at 07:47:28AM +0530, mitu2009 wrote: >> >> Hi, >> >> I'm using following code to get execute search query in Lucene.Net >> >> var collector = new >> GroupingHitCollector(searcher.GetIndexReader());searcher.Search(myQuery, >> collector);resultsCount = collector.Hits.Count;How do i sort these search >> results based on a field? >> >> I need to use collector object(instead of using hits) and I dont see any >> overloaded Searcher.search method which returns a collector object as >> well >> as sort it on a field. >> >> >> Thanks. >> >> >> -- >> View this message in context: >> http://www.nabble.com/Sorting-lucene-search-results-tp21759077p21759077.html >> Sent from the Lucene - Java Developer mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org >> For additional commands, e-mail: java-dev-h...@lucene.apache.org > > -- > Anshum > -- > Tuesday After Lunch is the cosmic time of the week. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-dev-h...@lucene.apache.org > > > -- View this message in context: http://www.nabble.com/Sorting-lucene-search-results-tp21759077p21766377.html Sent from the Lucene - Java Developer mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org