Inspired by an example of using Solr's JSON output for AJAX, I have incorporated a drop-down menu into my project form and introduced faceting to the parameters.
Parameters:
function getstandardargs() {
var params = [
'wt=json'
,'facet=true'
,'facet.field=brand1'
,'facet.field=brand2'
,'facet.field=brand3'
,'facet.field=brand4'
,'facet.limit=2'
];
Drop-down Menu:
<form name="f1" onsubmit='xmlhttpPost("/solr/select"); return false;'>
<p>query: <input name="query" type="text">
<select id="Entity">
<option value="brand1">Universal</option>
<option value="brand2">Paramount</option>
<option value="brand3">Fox</option>
<option value="brand4">Sony</option>
</select>
<input value="Go" type="submit"></p>
Attempting to integrate the selected drop-down value into the facet query response:
var rsp = eval("("+str+")");
var c=document.getElementById("Entity");
cat=c.options[c.selectedIndex].value;
var output=rsp.facet_counts.facet_fields;
html += "Entity: " + output+'.'+cat;
After executing, the facet response displays: Entity: [object Object].Universal. How can I properly append the drop-down value to the query response so that Solr accurately returns the correct facet values? Appreciate any assistance in advance.