Using the Query Elevation Component in solr 4.8 and the elevateIds parameter to 
force 3 documents to the top of the query results. Query and results included 
below. In the results, you will see only one document of the three is in the 
query results. It is the first document and it is marked as elevated. The other 
two are not in the results. 

I've read the documentation here: 
https://archive.apache.org/dist/lucene/solr/ref-guide/apache-solr-ref-guide-4.8.pdf
 

and here: 
https://cwiki.apache.org/confluence/display/solr/The+Query+Elevation+Component 

Based on the documentation, I think I have done this correctly, but the results 
are not as expected. Any thoughts? 

-Charles 


******** Query ************** 
$HOST/solr/collection1/select?enableElevation=true&fl=uri,allTitle&fl=%5Belevated%5D&start=0&q=oracle&qf=allTitle&qf=allText&elevateIds=https%3A%2F%2Fapi.access.devgssci.devlab.phx1.redhat.com%2Frs%2Farticles%2F216093&elevateIds=https%3A%2F%2Fapi.access.devgssci.devlab.phx1.redhat.com%2Frs%2Farticles%2F395013&elevateIds=https%3A%2F%2Fapi.access.devgssci.devlab.phx1.redhat.com%2Frs%2Farticles%2F725843&wt=json&defType=edismax&rows=10&indent=true&forceElevation=true
 

****** Query - decode so its easier to read ***************** 
$HOST/solr/collection1/select?enableElevation=true&fl=uri,allTitle&fl=[elevated]&start=0&q=oracle&qf=allTitle&qf=allText&elevateIds=https://api.access.devgssci.devlab.phx1.redhat.com/rs/articles/216093&elevateIds=https://api.access.devgssci.devlab.phx1.redhat.com/rs/articles/395013&elevateIds=https://api.access.devgssci.devlab.phx1.redhat.com/rs/articles/725843&wt=json&defType=edismax&rows=10&indent=true&forceElevation=true
 

****** Results ************** 
{ 
"responseHeader":{ 
"status":0, 
"QTime":274, 
"params":{ 
"enableElevation":"true", 
"fl":["uri,allTitle", 
"[elevated]"], 
"indent":"true", 
"start":"0", 
"q":"oracle", 
"forceElevation":"true", 
"qf":["allTitle", 
"allText"], 
"wt":"json", 
"elevateIds":["https://api.access.devgssci.devlab.phx1.redhat.com/rs/articles/216093";,
 
"https://api.access.devgssci.devlab.phx1.redhat.com/rs/articles/395013";, 
"https://api.access.devgssci.devlab.phx1.redhat.com/rs/articles/725843";], 
"rows":"10", 
"defType":"edismax"}}, 
"response":{"numFound":95055,"start":0,"maxScore":5.220278,"docs":[ 
{ 
"uri":"https://api.access.devgssci.devlab.phx1.redhat.com/rs/articles/216093";, 
"allTitle":"Storage Management for the Oracle Database on Red Hat Enterprise 
Linux 6: Using ASM With or Without ASMLib", 
"[elevated]":true}, 
{ 
"uri":"https://api.access.devgssci.devlab.phx1.redhat.com/rs/ecosystem/software/838843";,
 
"allTitle":"Oracle Salt", 
"[elevated]":false}, 
{ 
"uri":"https://api.access.devgssci.devlab.phx1.redhat.com/rs/ecosystem/software/838413";,
 
"allTitle":"Oracle iProcurement", 
"[elevated]":false}, 
{ 
"uri":"https://api.access.devgssci.devlab.phx1.redhat.com/rs/ecosystem/software/839063";,
 
"allTitle":"Oracle TSAM", 
"[elevated]":false}, 
{ 
"uri":"https://api.access.devgssci.devlab.phx1.redhat.com/rs/ecosystem/software/839073";,
 
"allTitle":"Oracle Tuxedo", 
"[elevated]":false}, 
{ 
"uri":"https://api.access.devgssci.devlab.phx1.redhat.com/rs/ecosystem/software/838953";,
 
"allTitle":"Oracle Sourcing", 
"[elevated]":false}, 
{ 
"uri":"https://api.access.devgssci.devlab.phx1.redhat.com/rs/ecosystem/software/837383";,
 
"allTitle":"Oracle Coherence", 
"[elevated]":false}, 
{ 
"uri":"https://api.access.devgssci.devlab.phx1.redhat.com/rs/ecosystem/software/837363";,
 
"allTitle":"Oracle Clinical", 
"[elevated]":false}, 
{ 
"uri":"https://api.access.devgssci.devlab.phx1.redhat.com/rs/ecosystem/software/837443";,
 
"allTitle":"Oracle Database", 
"[elevated]":false}, 
{ 
"uri":"https://api.access.devgssci.devlab.phx1.redhat.com/rs/ecosystem/software/820373";,
 
"allTitle":"Oracle RAC", 
"[elevated]":false}] 
}, 
"spellcheck":{ 
"suggestions":[]}} 

Reply via email to