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 Vic
Date Wed, 26 Mar 2008 10:12:36 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 Vic:
http://wiki.apache.org/solr/SolJSON

The comment on the change is:
Provide solution in newer Javascript version and highlight installation path

------------------------------------------------------------------------------
  
  {{{ var rsp = eval("("+jsonResponseString+")"); }}}
  
- Here is a simple functional example.  To install it, place in somewhere accessible in the
same server running Solr. For example save the text below to webapps/ajax/ajax.html and browse
to http://localhost:8983/ajax/ajax.html
+ Here is a simple functional example.  
+ 
+ To install it, place in somewhere accessible in the same server running Solr. 
+ 
+ For example jetty server, save the text below to ''webapps/ajax/ajax.html'' and browse to
http://localhost:8983/ajax/ajax.html
  
  {{{
  <html>
@@ -196, +200 @@

  
  <!> '''Potential UTF-8 encoding issue'''
  
- This is a small note: In some environment, the default javascript  escape() may fail to
encoded non-ASCII character into the utf-8 encoded string, which will make the search failed.

+ This is a small note: In some environment, the default javascript ''escape()''  may fail
to encoded non-ASCII character into the utf-8 encoded string, which will make the search failed.

  
- To solve the problem, please refer the utf-8 encoding package by webtoolkit.info to write
your own encoding function:
+ To solve the problem universally, please refer the utf-8 encoding package by webtoolkit.info
to write your own encoding function:
- 
  http://www.webtoolkit.info/javascript-url-decode-encode.html
  
+ *For Javascript 1.5, you can use ''encodeURIComponent()'' insteads of ''escape()'':
+ http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/
+ 
- To apply the correct encode function, just replace the escape(query)  in function getquerystring()
+ To apply the correct encode function, just replace the ''escape(query)''  in function ''getquerystring()''
  {{{
  qstr = 'q=' + escape(query);
  }}}

Mime
View raw message