diff --git a/sandbox/contributions/javascript/queryConstructor/luceneQueryConstructor.html b/sandbox/contributions/javascript/queryConstructor/luceneQueryConstructor.html new file mode 100644 index 00000000000..573aa559948 --- /dev/null +++ b/sandbox/contributions/javascript/queryConstructor/luceneQueryConstructor.html @@ -0,0 +1,28 @@ + + + Demo Lucene Query Constructor + + + + +
+ + Name: + + +

+ Description: + + + +

+ + \ No newline at end of file diff --git a/sandbox/contributions/javascript/queryConstructor/luceneQueryConstructor.js b/sandbox/contributions/javascript/queryConstructor/luceneQueryConstructor.js new file mode 100644 index 00000000000..229eb84baae --- /dev/null +++ b/sandbox/contributions/javascript/queryConstructor/luceneQueryConstructor.js @@ -0,0 +1,98 @@ +// Lucene Search Query Constructor +// Author: Kelvin Tan (kelvin@relevanz.com) +// Date: 14/02/2002 +// Version: 1.1 + +// 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; + +// 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