lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "SolJSON" by DanielEinspanjer
Date Tue, 13 Mar 2007 17:08:17 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The following page has been changed by DanielEinspanjer:
http://wiki.apache.org/solr/SolJSON

The comment on the change is:
Further cleanup. The original example used a mixture of GET params & POST data.

------------------------------------------------------------------------------
              updatepage(self.xmlHttpReq.responseText);
          }
      }
+ 
+     var params = getstandardargs().concat(getquerystring());
+     var strData = params.join('&');
-     self.xmlHttpReq.send(getquerystring());
+     self.xmlHttpReq.send(strData);
  }
  
+ function getstandardargs() {
+     var params = [
+         'wt=json'
+         , 'indent=on'
+         , 'hl=true'
+         , 'hl.fl=name,features'
+         ];
+ 
+     return params;
+ }
  function getquerystring() {
    var form = document.forms['f1'];
    var query = form.query.value;
@@ -169, +182 @@

  </script>
  </head>
  
- <form name="f1">
+ <form name="f1" onsubmit='xmlhttpPost("/solr/select"); return false;'>
    <p>query: <input name="query" type="text">  
-   <input value="Go" type="button" onclick='xmlhttpPost("/solr/select?wt=json&hl=true&hl.fl=name,features&indent=on")'></p>
+   <input value="Go" type="submit"></p>
    
  <div id="result"></div>
  <p/><pre>Raw JSON String: <div id="raw"></div></pre>

Mime
View raw message