javascript/lib/amigo/api.js
function _abstract_solr_filter_template(filters){
	
	var allbuf = new Array();
	for( var filter_key in filters ){

	    var filter_val = filters[filter_key];

	    // If the value looks like an array, iterate over it and
	    // collect.
	    if( filter_val &&
		filter_val != null &&
		typeof filter_val == 'object' &&
		filter_val.length ){

		    for( var i = 0; i < filter_val.length; i++ ){
			var minibuffer = new Array();
			var try_val = filter_val[i];
			if( typeof(try_val) != 'undefined' &&
			try_val != '' ){
			    minibuffer.push('fq=');
			    minibuffer.push(filter_key);
			    minibuffer.push(':');
			    minibuffer.push('"');
			    minibuffer.push(filter_val[i]);
			    minibuffer.push('"');
			    allbuf.push(minibuffer.join(''));
			}
		    }		    
		}else{
		    var minibuf = new Array();
		    if( typeof(filter_val) != 'undefined' &&
			filter_val != '' ){
			    minibuf.push('fq=');
			    minibuf.push(filter_key);
			    minibuf.push(':');
			    minibuf.push('"');
			    minibuf.push(filter_val);
			    minibuf.push('"');
			    allbuf.push(minibuf.join(''));
			}
		}
	}
	return allbuf.join('&');
    }
function _abstract_solr_filter_template(filters){
	
	var allbuf = new Array();
	for( var filter_key in filters ){

	    var filter_val = filters[filter_key];

	    // If the value looks like an array, iterate over it and
	    // collect.
	    if( filter_val &&
		filter_val != null &&
		typeof filter_val == 'object' &&
		filter_val.length ){

		    for( var i = 0; i < filter_val.length; i++ ){
			var minibuffer = new Array();
			var try_val = filter_val[i];
			if( typeof(try_val) != 'undefined' &&
			try_val != '' ){
			    minibuffer.push('fq=');
			    minibuffer.push(filter_key);
			    minibuffer.push(':');
			    minibuffer.push('"');
			    minibuffer.push(filter_val[i]);
			    minibuffer.push('"');
			    allbuf.push(minibuffer.join(''));
			}
		    }		    
		}else{
		    var minibuf = new Array();
		    if( typeof(filter_val) != 'undefined' &&
			filter_val != '' ){
			    minibuf.push('fq=');
			    minibuf.push(filter_key);
			    minibuf.push(':');
			    minibuf.push('"');
			    minibuf.push(filter_val);
			    minibuf.push('"');
			    allbuf.push(minibuf.join(''));
			}
		}
	}
	return allbuf.join('&');
    }
function _abstract_solr_filter_template ( filters ) { var allbuf = new Array ( ) ; for ( var filter_key in filters ) { var filter_val = filters [ filter_key ] ; // If the value looks like an array, iterate over it and // collect. if ( filter_val && filter_val != null && typeof filter_val == 'object' && filter_val . length ) { for ( var i = 0 ; i < filter_val . length ; i ++ ) { var minibuffer = new Array ( ) ; var try_val = filter_val [ i ] ; if ( typeof ( try_val ) != 'undefined' && try_val != '' ) { minibuffer . push ( 'fq=' ) ; minibuffer . push ( filter_key ) ; minibuffer . push ( ':' ) ; minibuffer . push ( '"' ) ; minibuffer . push ( filter_val [ i ] ) ; minibuffer . push ( '"' ) ; allbuf . push ( minibuffer . join ( '' ) ) ; } } } else { var minibuf = new Array ( ) ; if ( typeof ( filter_val ) != 'undefined' && filter_val != '' ) { minibuf . push ( 'fq=' ) ; minibuf . push ( filter_key ) ; minibuf . push ( ':' ) ; minibuf . push ( '"' ) ; minibuf . push ( filter_val ) ; minibuf . push ( '"' ) ; allbuf . push ( minibuf . join ( '' ) ) ; } } } return allbuf . join ( '&' ) ; }
Similar to the above, but creating a solr filter set.
Similar to the above but creating a solr filter set .