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: &bf=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 evening of 16 April. Official reports say there are at least 230 dead and severe damages to the northwest region of the country.", "unixdate": 1460934660, "title": "Oxfam responds to Ecuador earthquake" }, { "link": "http://www.oxfamamerica.org/explore/research-publications/viv-tankou-moun/", "description": "", "unixdate": 1355133570, "title": "Viv Tankou Moun" }, ] }, "debug": { "rawquerystring": "mexico earthquake\n", "querystring": "mexico earthquake\n", "parsedquery": "(+(DisjunctionMaxQuery((all_text:mexico)) DisjunctionMaxQuery((all_text:earthquak))))/no_coord", "parsedquery_toString": "+((all_text:mexico) (all_text:earthquak))", "explain": { "http://www.oxfamamerica.org/press/mexico-earthquake-oxfam-sends-in-assessment-teams-to-two-worst-hit-areas/": "\n0.99859846 = (MATCH) sum of:\n 0.597414 = (MATCH) weight(all_text:mexico in 5860) [DefaultSimilarity], result of:\n 0.597414 = score(doc=5860,freq=11.0 = termFreq=11.0\n), product of:\n 0.7368467 = queryWeight, product of:\n 3.9113069 = idf(docFreq=322, maxDocs=5937)\n 0.18838887 = queryNorm\n 0.8107711 = fieldWeight in 5860, product of:\n 3.3166249 = tf(freq=11.0), with freq of:\n 11.0 = termFreq=11.0\n 3.9113069 = idf(docFreq=322, maxDocs=5937)\n 0.0625 = fieldNorm(doc=5860)\n 0.40118444 = (MATCH) weight(all_text:earthquak in 5860) [DefaultSimilarity], result of:\n 0.40118444 = score(doc=5860,freq=7.0 = termFreq=7.0\n), product of:\n 0.67605984 = queryWeight, product of:\n 3.5886402 = idf(docFreq=445, maxDocs=5937)\n 0.18838887 = queryNorm\n 0.59341556 = fieldWeight in 5860, product of:\n 2.6457512 = tf(freq=7.0), with freq of:\n 7.0 = termFreq=7.0\n 3.5886402 = idf(docFreq=445, maxDocs=5937)\n 0.0625 = fieldNorm(doc=5860)\n", "http://www.oxfamamerica.org/explore/stories/deadly-earthquake-hits-mexico/": "\n0.84810734 = (MATCH) sum of:\n 0.47283366 = (MATCH) weight(all_text:mexico in 5873) [DefaultSimilarity], result of:\n 0.47283366 = score(doc=5873,freq=9.0 = termFreq=9.0\n), product of:\n 0.7368467 = queryWeight, product of:\n 3.9113069 = idf(docFreq=322, maxDocs=5937)\n 0.18838887 = queryNorm\n 0.64169884 = fieldWeight in 5873, product of:\n 3.0 = tf(freq=9.0), with freq of:\n 9.0 = termFreq=9.0\n 3.9113069 = idf(docFreq=322, maxDocs=5937)\n 0.0546875 = fieldNorm(doc=5873)\n 0.3752737 = (MATCH) weight(all_text:earthquak in 5873) [DefaultSimilarity], result of:\n 0.3752737 = score(doc=5873,freq=8.0 = termFreq=8.0\n), product of:\n 0.67605984 = queryWeight, product of:\n 3.5886402 = idf(docFreq=445, maxDocs=5937)\n 0.18838887 = queryNorm\n 0.5550895 = fieldWeight in 5873, product of:\n 2.828427 = tf(freq=8.0), with freq of:\n 8.0 = termFreq=8.0\n 3.5886402 = idf(docFreq=445, maxDocs=5937)\n 0.0546875 = fieldNorm(doc=5873)\n", "https://firstperson.oxfamamerica.org/2017/09/an-eyewitness-account-as-the-earthquake-hit-mexico-and-the-urgent-hours-that-followed/": "\n0.77732605 = (MATCH) sum of:\n 0.47763407 = (MATCH) weight(all_text:mexico in 5857) [DefaultSimilarity], result of:\n 0.47763407 = score(doc=5857,freq=18.0 = termFreq=18.0\n), product of:\n 0.7368467 = queryWeight, product of:\n 3.9113069 = idf(docFreq=322, maxDocs=5937)\n 0.18838887 = queryNorm\n 0.6482136 = fieldWeight in 5857, product of:\n 4.2426405 = tf(freq=18.0), with freq of:\n 18.0 = termFreq=18.0\n 3.9113069 = idf(docFreq=322, maxDocs=5937)\n 0.0390625 = fieldNorm(doc=5857)\n 0.29969198 = (MATCH) weight(all_text:earthquak in 5857) [DefaultSimilarity], result of:\n 0.29969198 = score(doc=5857,freq=10.0 = termFreq=10.0\n), product of:\n 0.67605984 = queryWeight, product of:\n 3.5886402 = idf(docFreq=445, maxDocs=5937)\n 0.18838887 = queryNorm\n 0.44329208 = fieldWeight in 5857, product of:\n 3.1622777 = tf(freq=10.0), with freq of:\n 10.0 = termFreq=10.0\n 3.5886402 = idf(docFreq=445, maxDocs=5937)\n 0.0390625 = fieldNorm(doc=5857)\n", "http://www.oxfamamerica.org/explore/research-publications/in-need-of-a-better-wash-water-sanitation-and-hygiene-policy-issues-in-post-earthquake-haiti/": "\n0.77483696 = (MATCH) sum of:\n 0.3152224 = (MATCH) weight(all_text:mexico in 1648) [DefaultSimilarity], result of:\n 0.3152224 = score(doc=1648,freq=1.0 = termFreq=1.0\n), product of:\n 0.7368467 = queryWeight, product of:\n 3.9113069 = idf(docFreq=322, maxDocs=5937)\n 0.18838887 = queryNorm\n 0.4277992 = fieldWeight in 1648, product of:\n 1.0 = tf(freq=1.0), with freq of:\n 1.0 = termFreq=1.0\n 3.9113069 = idf(docFreq=322, maxDocs=5937)\n 0.109375 = fieldNorm(doc=1648)\n 0.45961455 = (MATCH) weight(all_text:earthquak in 1648) [DefaultSimilarity], result of:\n 0.45961455 = score(doc=1648,freq=3.0 = termFreq=3.0\n), product of:\n 0.67605984 = queryWeight, product of:\n 3.5886402 = idf(docFreq=445, maxDocs=5937)\n 0.18838887 = queryNorm\n 0.679843 = fieldWeight in 1648, product of:\n 1.7320508 = tf(freq=3.0), with freq of:\n 3.0 = termFreq=3.0\n 3.5886402 = idf(docFreq=445, maxDocs=5937)\n 0.109375 = fieldNorm(doc=1648)\n", "http://www.oxfamamerica.org/explore/stories/oxfam-teams-focus-on-rural-areas-in-mexico-earthquake-response/": "\n0.65958303 = (MATCH) sum of:\n 0.40528598 = (MATCH) weight(all_text:mexico in 5871) [DefaultSimilarity], result of:\n 0.40528598 = score(doc=5871,freq=9.0 = termFreq=9.0\n), product of:\n 0.7368467 = queryWeight, product of:\n 3.9113069 = idf(docFreq=322, maxDocs=5937)\n 0.18838887 = queryNorm\n 0.55002755 = fieldWeight in 5871, product of:\n 3.0 = tf(freq=9.0), with freq of:\n 9.0 = termFreq=9.0\n 3.9113069 = idf(docFreq=322, maxDocs=5937)\n 0.046875 = fieldNorm(doc=5871)\n 0.25429705 = (MATCH) weight(all_text:earthquak in 5871) [DefaultSimilarity], result of:\n 0.25429705 = score(doc=5871,freq=5.0 = termFreq=5.0\n), product of:\n 0.67605984 = queryWeight, product of:\n 3.5886402 = idf(docFreq=445, maxDocs=5937)\n 0.18838887 = queryNorm\n 0.37614578 = fieldWeight in 5871, product of:\n 2.236068 = tf(freq=5.0), with freq of:\n 5.0 = termFreq=5.0\n 3.5886402 = idf(docFreq=445, maxDocs=5937)\n 0.046875 = fieldNorm(doc=5871)\n", "http://www.oxfamamerica.org/explore/stories/inside-the-rescue-efforts-following-mexicos-massive-earthquake/": "\n0.62212694 = (MATCH) sum of:\n 0.38998657 = (MATCH) weight(all_text:mexico in 5870) [DefaultSimilarity], result of:\n 0.38998657 = score(doc=5870,freq=12.0 = termFreq=12.0\n), product of:\n 0.7368467 = queryWeight, product of:\n 3.9113069 = idf(docFreq=322, maxDocs=5937)\n 0.18838887 = queryNorm\n 0.5292642 = fieldWeight in 5870, product of:\n 3.4641016 = tf(freq=12.0), with freq of:\n 12.0 = termFreq=12.0\n 3.9113069 = idf(docFreq=322, maxDocs=5937)\n 0.0390625 = fieldNorm(doc=5870)\n 0.23214039 = (MATCH) weight(all_text:earthquak in 5870) [DefaultSimilarity], result of:\n 0.23214039 = score(doc=5870,freq=6.0 = termFreq=6.0\n), product of:\n 0.67605984 = queryWeight, product of:\n 3.5886402 = idf(docFreq=445, maxDocs=5937)\n 0.18838887 = queryNorm\n 0.34337255 = fieldWeight in 5870, product of:\n 2.4494898 = tf(freq=6.0), with freq of:\n 6.0 = termFreq=6.0\n 3.5886402 = idf(docFreq=445, maxDocs=5937)\n 0.0390625 = fieldNorm(doc=5870)\n", "http://www.oxfamamerica.org/explore/research-publications/housing-delivery-and-housing-finance-in-haiti/": "\n0.59185386 = (MATCH) sum of:\n 0.27019066 = (MATCH) weight(all_text:mexico in 1334) [DefaultSimilarity], result of:\n 0.27019066 = score(doc=1334,freq=1.0 = termFreq=1.0\n), product of:\n 0.7368467 = queryWeight, product of:\n 3.9113069 = idf(docFreq=322, maxDocs=5937)\n 0.18838887 = queryNorm\n 0.36668503 = fieldWeight in 1334, product of:\n 1.0 = tf(freq=1.0), with freq of:\n 1.0 = termFreq=1.0\n 3.9113069 = idf(docFreq=322, maxDocs=5937)\n 0.09375 = fieldNorm(doc=1334)\n 0.32166317 = (MATCH) weight(all_text:earthquak in 1334) [DefaultSimilarity], result of:\n 0.32166317 = score(doc=1334,freq=2.0 = termFreq=2.0\n), product of:\n 0.67605984 = queryWeight, product of:\n 3.5886402 = idf(docFreq=445, maxDocs=5937)\n 0.18838887 = queryNorm\n 0.47579098 = fieldWeight in 1334, product of:\n 1.4142135 = tf(freq=2.0), with freq of:\n 2.0 = termFreq=2.0\n 3.5886402 = idf(docFreq=445, maxDocs=5937)\n 0.09375 = fieldNorm(doc=1334)\n", "http://www.oxfamamerica.org/explore/research-publications/haiti-land-rights-land-tenure-and-urban-recovery/": "\n0.59185386 = (MATCH) sum of:\n 0.27019066 = (MATCH) weight(all_text:mexico in 1505) [DefaultSimilarity], result of:\n 0.27019066 = score(doc=1505,freq=1.0 = termFreq=1.0\n), product of:\n 0.7368467 = queryWeight, product of:\n 3.9113069 = idf(docFreq=322, maxDocs=5937)\n 0.18838887 = queryNorm\n 0.36668503 = fieldWeight in 1505, product of:\n 1.0 = tf(freq=1.0), with freq of:\n 1.0 = termFreq=1.0\n 3.9113069 = idf(docFreq=322, maxDocs=5937)\n 0.09375 = fieldNorm(doc=1505)\n 0.32166317 = (MATCH) weight(all_text:earthquak in 1505) [DefaultSimilarity], result of:\n 0.32166317 = score(doc=1505,freq=2.0 = termFreq=2.0\n), product of:\n 0.67605984 = queryWeight, product of:\n 3.5886402 = idf(docFreq=445, maxDocs=5937)\n 0.18838887 = queryNorm\n 0.47579098 = fieldWeight in 1505, product of:\n 1.4142135 = tf(freq=2.0), with freq of:\n 2.0 = termFreq=2.0\n 3.5886402 = idf(docFreq=445, maxDocs=5937)\n 0.09375 = fieldNorm(doc=1505)\n", "http://www.oxfamamerica.org/press/oxfam-responds-to-ecuador-earthquake/": "\n0.51918983 = (MATCH) sum of:\n 0.1801271 = (MATCH) weight(all_text:mexico in 147) [DefaultSimilarity], result of:\n 0.1801271 = score(doc=147,freq=1.0 = termFreq=1.0\n), product of:\n 0.7368467 = queryWeight, product of:\n 3.9113069 = idf(docFreq=322, maxDocs=5937)\n 0.18838887 = queryNorm\n 0.24445668 = fieldWeight in 147, product of:\n 1.0 = tf(freq=1.0), with freq of:\n 1.0 = termFreq=1.0\n 3.9113069 = idf(docFreq=322, maxDocs=5937)\n 0.0625 = fieldNorm(doc=147)\n 0.33906275 = (MATCH) weight(all_text:earthquak in 147) [DefaultSimilarity], result of:\n 0.33906275 = score(doc=147,freq=5.0 = termFreq=5.0\n), product of:\n 0.67605984 = queryWeight, product of:\n 3.5886402 = idf(docFreq=445, maxDocs=5937)\n 0.18838887 = queryNorm\n 0.5015277 = fieldWeight in 147, product of:\n 2.236068 = tf(freq=5.0), with freq of:\n 5.0 = termFreq=5.0\n 3.5886402 = idf(docFreq=445, maxDocs=5937)\n 0.0625 = fieldNorm(doc=147)\n", "http://www.oxfamamerica.org/explore/research-publications/viv-tankou-moun/": "\n0.4932115 = (MATCH) sum of:\n 0.22515886 = (MATCH) weight(all_text:mexico in 1445) [DefaultSimilarity], result of:\n 0.22515886 = score(doc=1445,freq=1.0 = termFreq=1.0\n), product of:\n 0.7368467 = queryWeight, product of:\n 3.9113069 = idf(docFreq=322, maxDocs=5937)\n 0.18838887 = queryNorm\n 0.30557084 = fieldWeight in 1445, product of:\n 1.0 = tf(freq=1.0), with freq of:\n 1.0 = termFreq=1.0\n 3.9113069 = idf(docFreq=322, maxDocs=5937)\n 0.078125 = fieldNorm(doc=1445)\n 0.26805264 = (MATCH) weight(all_text:earthquak in 1445) [DefaultSimilarity], result of:\n 0.26805264 = score(doc=1445,freq=2.0 = termFreq=2.0\n), product of:\n 0.67605984 = queryWeight, product of:\n 3.5886402 = idf(docFreq=445, maxDocs=5937)\n 0.18838887 = queryNorm\n 0.39649248 = fieldWeight in 1445, product of:\n 1.4142135 = tf(freq=2.0), with freq of:\n 2.0 = termFreq=2.0\n 3.5886402 = idf(docFreq=445, maxDocs=5937)\n 0.078125 = fieldNorm(doc=1445)\n", }, "QParser": "ExtendedDismaxQParser", "altquerystring": null, "boost_queries": null, "parsed_boost_queries": [], "boostfuncs": null, "timing": { "time": 28, "prepare": { "time": 0, "query": { "time": 0 }, "facet": { "time": 0 }, "mlt": { "time": 0 }, "highlight": { "time": 0 }, "stats": { "time": 0 }, "debug": { "time": 0 } }, "process": { "time": 28, "query": { "time": 2 }, "facet": { "time": 0 }, "mlt": { "time": 0 }, "highlight": { "time": 0 }, "stats": { "time": 0 }, "debug": { "time": 26 } } } } } This is the order of the 'unixdate' values in reverse chronological sequence. Epoch date Human readable date (GMT) 1506455170 2017-09-26 19:46:10 1506042370 2017-09-22 01:06:10 1506029570 2017-09-21 21:32:50 1506029180 2017-09-21 21:26:20 1505939200 2017-09-20 20:26:40 1460934660 2016-04-17 23:11:00 1367459710 2013-05-02 01:55:10 1355133570 2012-12-10 09:59:30 1343861760 2012-08-01 22:56:00 1325325570 2011-12-31 09:59:30 This is the order of the 'unixdate' values in the actual query results. "unixdate": 1506029180 "unixdate": 1506029570 "unixdate": 1505939200 "unixdate": 1325325570 "unixdate": 1506455170 # I want this one first "unixdate": 1506042370 "unixdate": 1367459710 "unixdate": 1343861760 "unixdate": 1460934660 "unixdate": 1355133570 -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html