lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sahil Agarwal <sahil.agarwa...@gmail.com>
Subject SortingMergePolicy in solr 6.4.2
Date Tue, 14 Mar 2017 10:56:34 GMT
The SortingMergePolicy does not seem to get implemeted.

The csv file gets indexed without errors. But when I search for a term, the
results returned are not sorted by Marks.

Following is a toy project in Solr 6.4.2 on which I tried to use
SortingMergePolicyFactory.

Just showing the changes that I did in the core's config files. Please tell
me if any other info is needed.
I used the basic_configs when creating core:
create_core -c corename -d basic_configs


managed-schema

<schema name="example-basic" version="1.6">
.
.
.
<field name="Marks" type="long" sortMissingLast="true" docValues="true"
indexed="true" stored="true"/> <field name="Name" type="strings" indexed=
"true" stored="true"/> <field name="Subject" type="strings" indexed="true"
stored="true"/> <field name="_root_" type="string" docValues="false" indexed
="true" stored="false"/> <field name="_text_" type="text_general"
multiValued="true" indexed="true" stored="false"/> <field name="_version_"
type="long" indexed="false" stored="false"/> <field name="id" type="string"
multiValued="false" indexed="true" required="true" stored="true"/></schema>


solrconfig.xml

<indexConfig>
<mergePolicyFactory class="org.apache.solr.index.SortingMergePolicyFactory">
<str name="sort">Marks desc</str>    <str name="wrapped.prefix">inner</str>
  <str name="inner.class">org.apache.solr.index.TieredMergePolicyFactory</
str> </mergePolicyFactory>
​
</indexConfig>
​

1.csv

id,Name,Subject,Marks 1,Sahil Agarwal,Computers,1108 2,Ian
Roberts,Maths,7077 3,Karan Vatsa,English,6092 4,Amit Williams,Maths,3924
5,Vani Agarwal,Computers,4263 6,Brenda Gupta,Computers,2309
.
.
​300000 rows​

What can be the problem??

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message