Hi Dennis, thanks for reply. Please explain me what filter do you mean. I'm searching only on one field with names: query.setQuery(suchstring);
then I'm adding two sortings on another fields: query.addSortField("type", SolrQuery.ORDER.asc); query.addSortField("sortName", SolrQuery.ORDER.asc); the results should be sorted in first queue by 'type' (only one letter 'A' or 'B') and then they should be sorted by names how I can define hier 'OR' or 'AND' relations? Best regards, Stanislaw 2010/9/13 Dennis Gearon <gear...@sbcglobal.net> > My guess is two things are happening: > 1/ Your combination of filters is in parallel,or an OR expression. This I > think for sure .... maybe, seen next. > 2/ To get 3 duplicate results, your custom filter AND the OR expression > above have to be working togther, or it's possible that your customer filter > is the WHOLE problem, supplying the duplicates and the triplicates. > > A first guess .... nothing more :-) > Dennis Gearon > > Signature Warning > ---------------- > EARTH has a Right To Life, > otherwise we all die. > > Read 'Hot, Flat, and Crowded' > Laugh at http://www.yert.com/film.php > > > --- On Mon, 9/13/10, Stanislaw <solrgeschic...@googlemail.com> wrote: > > > From: Stanislaw <solrgeschic...@googlemail.com> > > Subject: Multiple sorting on text fields > > To: solr-user@lucene.apache.org > > Date: Monday, September 13, 2010, 12:12 AM > > Hi all! > > > > i found some strange behavior of solr. If I do sorting by 2 > > text fields in > > chain, I do receive some results doubled. > > The both text fields are not multivalued, one of them is > > string, the other > > custom type based on text field and keyword analyzer. > > > > I do this: > > > > * CommonsHttpSolrServer server > > = > > SolrServer.getInstance().getServer(); > > SolrQuery query = new > > SolrQuery(); > > query.setQuery(suchstring); > > query.addSortField("type", > > SolrQuery.ORDER.asc); > > //String field- it's only one letter > > query.addSortField("sortName", > > SolrQuery.ORDER.asc); //text > > field, not tokenized > > > > QueryResponse rsp = new > > QueryResponse(); > > rsp = server.query(query);* > > > > after that I extract results as a list Entity objects, the > > most of them are > > unique, but some of them are doubled and even tripled in > > this list. > > (Each object has a unique id and there is only one time in > > index) > > If I'm sorting only by one text field, I'm receiving > > "normal" results w/o > > problems. > > Where could I do a mistake, or is it a bug? > > > > Best regards, > > Stanislaw > > >