You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by ke...@apache.org on 2004/05/17 15:29:24 UTC

cvs commit: jakarta-lucene-sandbox/contributions/javascript/queryConstructor luceneQueryConstructor.html

kelvint     2004/05/17 06:29:24

  Modified:    contributions/javascript/queryConstructor
                        luceneQueryConstructor.html
  Log:
  Incorporates Erik's idea of displaying query inline, not as pop-up, and also the query validation feature.
  
  Revision  Changes    Path
  1.4       +12 -3     jakarta-lucene-sandbox/contributions/javascript/queryConstructor/luceneQueryConstructor.html
  
  Index: luceneQueryConstructor.html
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene-sandbox/contributions/javascript/queryConstructor/luceneQueryConstructor.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- luceneQueryConstructor.html	17 May 2004 13:04:42 -0000	1.3
  +++ luceneQueryConstructor.html	17 May 2004 13:29:24 -0000	1.4
  @@ -3,14 +3,16 @@
       <meta name="Author" content="Kelvin Tan">
       <title>Lucene Query Constructor Demo and Introduction</title>
       <script type="text/javascript" src="luceneQueryConstructor.js"></script>
  +    <script type="text/javascript" src="../queryValidator/luceneQueryValidator.js"></script>
       <script>
  -      function submitForm(frm)
  +      submitForm = false // necessary for luceneQueryConstructor not to submit the form upon query construction
  +      function doSubmitForm(frm)
         {
           if(frm["noField-phrase-input"].value.length > 0)
             frm["noField-phrase"].value = quote(frm["noField-phrase-input"].value)
           else if(frm["noField-phrase"].value.length > 0)
             frm["noField-phrase"].value = ''
  -        doMakeQuery(frm.query,true);
  +        doMakeQuery(frm.query);
         }
       </script>
     </head>
  @@ -94,8 +96,15 @@
             <input type="hidden" name="dateRangeField" value="lastModifiedDate">    
           </td>
         </tr>
  +      <tr>      
  +      
         <input type="hidden" name="query">
  -      <tr><th></th><td></td><td><input type="button" value="Search" onClick="submitForm(this.form)"></td>      
  +      <tr><td>&nbsp;</tr>
  +      <tr><th><p>Current Query:</th><td><pre id="curQuery"></pre><pre id="curQueryValid"></pre></td><td>
  +            
  +      <input type="button" name="Update" value="Update Query" onClick="doSubmitForm(this.form); curQuery.innerText = this.form.query.value" />
  +      <input type="button" name="Validate" value="Validate" onClick="doCheckLuceneQuery(this.form.query); curQueryValid.innerText = 'Query is valid'" />      
  +      </td>      
       </table>
       </form>
       <p>luceneQueryConstructor works by assuming a certain naming convention of form fields to obtain the necessary information to construct the query.<br>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-lucene-sandbox/contributions/javascript/queryConstructor luceneQueryConstructor.html

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Kelvin,

I've just gotten back into looking at your JavaScript changes.  Seems  
fine to me.  One issue though.  Shouldn't the  
luceneQueryConstructor.html have this instead:

-        <select name="fileNameModifier"><option value="And"  
selected>Only</option><option value="Not">Don't</option></select>
+        <select name="fileNameModifier"><option value="+"  
selected>Only</option><option value="-">Don't</option></select>

The And/Not should be +/-, no?

	Erik

On May 17, 2004, at 9:31 AM, Kelvin Tan wrote:

> Erik,
>
> I used the Google Advanced Search feature for the demo/introduction,  
> but in so
> doing removed the enhancements you made for drop-downs, multi-select  
> and radio
> fields.
>
> Do you still think they're necessary?
>
> Cheers,
> Kelvin
>
> On 17 May 2004 13:29:24 -0000, kelvint@apache.org said:
>> kelvint     2004/05/17 06:29:24
>>
>> Modified:    contributions/javascript/queryConstructor
>> luceneQueryConstructor.html
>> Log:
>> Incorporates Erik's idea of displaying query inline, not as pop-up,  
>> and also
> the query validation
>> feature.
>>
>> Revision  Changes    Path
>> 1.4       +12 -3     jakarta-lucene-
>> sandbox/contributions/javascript/queryConstructor/ 
>> luceneQueryConstructor.html
>>
>> Index: luceneQueryConstructor.html
>> ===================================================================
>> RCS file: /home/cvs/jakarta-lucene-
>> sandbox/contributions/javascript/queryConstructor/ 
>> luceneQueryConstructor.html,
> v
>> retrieving revision 1.3
>> retrieving revision 1.4
>> diff -u -r1.3 -r1.4
>> --- luceneQueryConstructor.html        17 May 2004 13:04:42 -0000      
>>    1.3
>> +++ luceneQueryConstructor.html        17 May 2004 13:29:24 -0000      
>>    1.4
>> @@ -3,14 +3,16 @@
>> <meta name="Author" content="Kelvin Tan">
>> <title>Lucene Query Constructor Demo and Introduction</title>
>> <script type="text/javascript"  
>> src="luceneQueryConstructor.js"></script>
>> +    <script type="text/javascript"
> src="../queryValidator/luceneQueryValidator.js"></script>
>> <script>
>> -      function submitForm(frm)
>> +      submitForm = false // necessary for luceneQueryConstructor not  
>> to
> submit the form upon
>> query construction
>> +      function doSubmitForm(frm)
>> {
>> if(frm["noField-phrase-input"].value.length > 0)
>> frm["noField-phrase"].value = quote(frm["noField-phrase-input"].value)
>> else if(frm["noField-phrase"].value.length > 0)
>> frm["noField-phrase"].value = ''
>> -        doMakeQuery(frm.query,true);
>> +        doMakeQuery(frm.query);
>> }
>> </script>
>> </head>
>> @@ -94,8 +96,15 @@
>> <input type="hidden" name="dateRangeField" value="lastModifiedDate">
>> </td>
>> </tr>
>> +      <tr>
>> +
>> <input type="hidden" name="query">
>> -      <tr><th></th><td></td><td><input type="button" value="Search"
>> onClick="submitForm(this.form)"></td>
>> +      <tr><td>&nbsp;</tr>
>> +      <tr><th><p>Current Query:</th><td><pre id="curQuery"></pre><pre
>> id="curQueryValid"></pre></td><td>
>> +
>> +      <input type="button" name="Update" value="Update Query"
> onClick="doSubmitForm(this.form);
>> curQuery.innerText = this.form.query.value" />
>> +      <input type="button" name="Validate" value="Validate"
>> onClick="doCheckLuceneQuery(this.form.query); curQueryValid.innerText  
>> = 'Query
> is valid'" />
>> +      </td>
>> </table>
>> </form>
>> <p>luceneQueryConstructor works by assuming a certain naming  
>> convention of
> form fields to obtain
>> the necessary information to construct the query.<br>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-lucene-sandbox/contributions/javascript/queryConstructor luceneQueryConstructor.html

Posted by Kelvin Tan <li...@relevanz.com>.
Erik,

I used the Google Advanced Search feature for the demo/introduction, but in so 
doing removed the enhancements you made for drop-downs, multi-select and radio 
fields. 

Do you still think they're necessary?

Cheers,
Kelvin

On 17 May 2004 13:29:24 -0000, kelvint@apache.org said:
> kelvint     2004/05/17 06:29:24
> 
> Modified:    contributions/javascript/queryConstructor
> luceneQueryConstructor.html
> Log:
> Incorporates Erik's idea of displaying query inline, not as pop-up, and also 
the query validation
> feature.
> 
> Revision  Changes    Path
> 1.4       +12 -3     jakarta-lucene-
> sandbox/contributions/javascript/queryConstructor/luceneQueryConstructor.html
> 
> Index: luceneQueryConstructor.html
> ===================================================================
> RCS file: /home/cvs/jakarta-lucene-
> sandbox/contributions/javascript/queryConstructor/luceneQueryConstructor.html,
v
> retrieving revision 1.3
> retrieving revision 1.4
> diff -u -r1.3 -r1.4
> --- luceneQueryConstructor.html        17 May 2004 13:04:42 -0000        1.3
> +++ luceneQueryConstructor.html        17 May 2004 13:29:24 -0000        1.4
> @@ -3,14 +3,16 @@
> <meta name="Author" content="Kelvin Tan">
> <title>Lucene Query Constructor Demo and Introduction</title>
> <script type="text/javascript" src="luceneQueryConstructor.js"></script>
> +    <script type="text/javascript" 
src="../queryValidator/luceneQueryValidator.js"></script>
> <script>
> -      function submitForm(frm)
> +      submitForm = false // necessary for luceneQueryConstructor not to 
submit the form upon
> query construction
> +      function doSubmitForm(frm)
> {
> if(frm["noField-phrase-input"].value.length > 0)
> frm["noField-phrase"].value = quote(frm["noField-phrase-input"].value)
> else if(frm["noField-phrase"].value.length > 0)
> frm["noField-phrase"].value = ''
> -        doMakeQuery(frm.query,true);
> +        doMakeQuery(frm.query);
> }
> </script>
> </head>
> @@ -94,8 +96,15 @@
> <input type="hidden" name="dateRangeField" value="lastModifiedDate">
> </td>
> </tr>
> +      <tr>
> +
> <input type="hidden" name="query">
> -      <tr><th></th><td></td><td><input type="button" value="Search"
> onClick="submitForm(this.form)"></td>
> +      <tr><td>&nbsp;</tr>
> +      <tr><th><p>Current Query:</th><td><pre id="curQuery"></pre><pre
> id="curQueryValid"></pre></td><td>
> +
> +      <input type="button" name="Update" value="Update Query" 
onClick="doSubmitForm(this.form);
> curQuery.innerText = this.form.query.value" />
> +      <input type="button" name="Validate" value="Validate"
> onClick="doCheckLuceneQuery(this.form.query); curQueryValid.innerText = 'Query 
is valid'" />
> +      </td>
> </table>
> </form>
> <p>luceneQueryConstructor works by assuming a certain naming convention of 
form fields to obtain
> the necessary information to construct the query.<br>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org