Hello and thanks in advance,
I have inherited a working Solr installation, and I want to tune the order
of display (score) of search results. I've read a fair amount of
documentation, and not found a solution. I have debug output to paste in
here, below.
On aspect of my site is sort of a current-news report. When a user puts in
"mexico" and "earthquake", The results that I get are all relevant. But as
I inspect the results, I want more-recent items to appear before less recent
ones. (I have this already:
=recip(ms(NOW/DAY,unixdate),3.16e-11,5,0.1)) and that is not enough.
I have two specific questions:
--- Is there a different value for 'bf' or 'boost' that will strongly
boost the most recent docs?
--- It seems to me that 'idf' works against my goal. I don't want a doc
about an earthquake in Turkey to score highly in a search for mexico
earthquake. This is using edismax.
Does that make sense? If so, how could I achieve that?
Here is my JSON output, with debug information, from the Solr admin query
panel. I included the first ten results only.
'unixdate' is a floating point value that holds milliseconds from the Unix
epoch, 1970-01-01-00:00:00UTC. The document that I want on top has
"unixdate": 1506455170, and appears in the 5th position in the list of
results.
I also included a display of the Unix epoch values and the calendar dates
the represent, below the JSON output.
{
"responseHeader": {
"status": 0,
"QTime": 28,
"params": {
"lowercaseOperators": "true",
"debugQuery": "true",
"fl": "link, title, description,unixdate",
"indent": "true",
"q": "mexico earthquake\n",
"_": "1508340944042",
"stopwords": "true",
"wt": "json",
"defType": "edismax",
"rows": "10"
}
},
"response": {
"numFound": 698,
"start": 0,
"docs": [
{
"link":
"http://www.oxfamamerica.org/press/mexico-earthquake-oxfam-sends-in-assessment-teams-to-two-worst-hit-areas/;,
"description": "Oxfam is sending in two teams of humanitarian
experts to Morelos and Puebla, with more on the way, following the 7.1
earthquake that struck central Mexico on September 19th. This is the second
earthquake to strike Mexico in less than two weeks.",
"unixdate": 1506029180,
"title": "Mexico earthquake: Oxfam sends in assessment teams to two
worst hit areas"
},
{
"link":
"http://www.oxfamamerica.org/explore/stories/deadly-earthquake-hits-mexico/;,
"description": "Oxfam prepares response to Mexico earthquake",
"unixdate": 1506029570,
"title": "Deadly earthquake hits MexicoâOxfam is there"
},
{
"link":
"https://firstperson.oxfamamerica.org/2017/09/an-eyewitness-account-as-the-earthquake-hit-mexico-and-the-urgent-hours-that-followed/;,
"description": "Oxfamâs director in Mexico describes the
earthquake, and the initial response in Mexico City.",
"title": "An eyewitness account as the earthquake hit Mexico, and
the urgent hours that followed",
"unixdate": 1505939200
},
{
"link":
"http://www.oxfamamerica.org/explore/research-publications/in-need-of-a-better-wash-water-sanitation-and-hygiene-policy-issues-in-post-earthquake-haiti/;,
"description": "",
"unixdate": 1325325570,
"title": "In need of a better WASH: Water, sanitation, and hygiene
policy issues in post-earthquake Haiti"
},
{
"link":
"http://www.oxfamamerica.org/explore/stories/oxfam-teams-focus-on-rural-areas-in-mexico-earthquake-response/;,
"description": "Evaluation of impact is concentrated in poor areas
outside Mexico City",
"unixdate": 1506455170,
"title": "Oxfam teams focus on rural areas in Mexico earthquake
response"
},
{
"link":
"http://www.oxfamamerica.org/explore/stories/inside-the-rescue-efforts-following-mexicos-massive-earthquake/;,
"description": "Oxfam is working with local partners to determine
needs and map out our response.",
"unixdate": 1506042370,
"title": "Inside the rescue efforts following Mexicoâs massive
earthquake"
},
{
"link":
"http://www.oxfamamerica.org/explore/research-publications/housing-delivery-and-housing-finance-in-haiti/;,
"description": "",
"unixdate": 1367459710,
"title": "Housing Delivery and Housing Finance in Haiti"
},
{
"link":
"http://www.oxfamamerica.org/explore/research-publications/haiti-land-rights-land-tenure-and-urban-recovery/;,
"description": "",
"unixdate": 1343861760,
"title": "Haiti land rights, land tenure, and urban recovery"
},
{
"link":
"http://www.oxfamamerica.org/press/oxfam-responds-to-ecuador-earthquake/;,
"description": "Oxfam has deployed an evaluation team to Ecuador to
determine its humanitarian response to the 7.8 earthquake that struck on the