// Lucene Search Query Constructor // Author: Kelvin Tan (kelvin@relevanz.com) // Change this according to what you use to name the field modifiers in your form. // e.g. with the field "name", the modifier will be called "nameModifier" var modifierSuffix = 'Modifier'; // Do you wish the query to be displayed as an alert box? var debug = true; // Do you wish the function to submit the form upon query construction? var submitOnConstruction = true; // prefix modifier for boolean AND queries var AND_MODIFIER = '+'; // prefix modifier for boolean NOT queries var NOT_MODIFIER = '-'; // prefix modifier for boolean OR queries var OR_MODIFIER = ''; // default prefix modifier for boolean queries var DEFAULT_MODIFIER = OR_MODIFIER; // Constructs the query // @param query Form field to represent the constructed query to be submitted function doMakeQuery( query ) { var frm = query.form; var formElements = frm.elements; query.value = ''; for(var i=0; i 0) { for(var j=0; j