Question

I have read many forums and followed a couple of suggestions but I cannot get this to work. I get the results in the reverse order, i.e., the oldest first despite boosting by a non-multivalued date field.

The field specified in schema

<field name="last_modified" type="tdate" indexed="true" stored="true" multiValued="false"/>

and

<fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>

I have tried with and without omitNorms and with varying values for precisionStep in case that plays any role in boosting a field.

I have tried all the queries specified here. For instance,

http://localhost:8983/solr/select?q={!boost b=$dateboost v=$qq}&dateboost=recip(ms(NOW,last_modified),3.16e-11,1,1)&qq=1234

Additionally, I have tried

defType=dismax&bf=recip(rord(last_modified),1,1000,1000)^2.5&q=1234

I also do a sorting, just plain sorting that discards any relevance scores.

q=1234; last_modified asc;

Actually, I try both asc and desc. Quite strange. Why do I still see the latest modified document last and the oldest document first? What is that I am doing wrong? Any help appreciated!

No correct solution

OTHER TIPS

Unlikely this gives you the sorting order on last_modified

q=1234; last_modified asc;

Perhaps you meant

q=1234&sort=last_modified desc
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top