lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From suren <gutti_re...@yahoo.com>
Subject Re: sorting using org.apache.solr.client.solrj.SolrQuery not working
Date Mon, 16 Sep 2013 14:56:47 GMT
Shawn,
          I am doing exactly same. Data output is not sorting on "LAST_NAME"
column , but it is always sorting on different column "CLAIM_NUM", and I am
not adding this sorting condition( sort on CLAIM_NUM).

solrQuery.setQuery("*:*");
solrQuery.setSort("LAST_NAM",SolrQuery.ORDER.asc);
solrQuery.setFilterQueries("String Query");
In the log i see the sorting column as "LAST_NAM". 
Is there a difference between "LAST_NAM asc" and "LAST_NAM+asc"...I see only
this diff?

"params={sort=LAST_NAM+asc&start=0&q=*:*&wt=javabin&fq=(LAST_NAM:*D*)+AND++-CLAI_RISK_MNGT_FLG+:+Y+&version=2&rows=30}
hits=196 status=0 QTime=2 "


<field name="CLAI_IDN" type="int" indexed="true" stored="true"
multiValued="false"/>
<field name="CLAI_CLM_NUM" type="string" indexed="true" stored="false" 
multiValued="false"/>
<field name="FIRST_NAM" type="string" indexed="true" stored="false" 
multiValued="false"/>
<field name="MIDDLE_NAM" type="string" indexed="true" stored="false" />
<field name="LAST_NAM" type="string" indexed="true" stored="false" 
multiValued="false"/>


 <uniqueKey>CLAI_IDN</uniqueKey>

I also tried addOrUpdateSort and  addSort, But it is always sorting on
CLAI_CLM_NUM, not sure why?





--
View this message in context: http://lucene.472066.n3.nabble.com/sorting-using-org-apache-solr-client-solrj-SolrQuery-not-working-tp4089985p4090364.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message