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 MatthiasEpheser:
http://wiki.apache.org/solr/SolrJS

------------------------------------------------------------------------------
  == About ==
  
- SolrJs is a javascript client library that is topic of a 2008 google summer 
of code project. It is currently work in progress, this page is intended to 
show the project's status, some technical documentation and a collection of 
thoughts about future features. The current trunk is accessible at 
[http://solrstuff.org/svn/solrjs/trunk]
+ SolrJs is a javascript client library that is topic of a 2008 google summer 
of code project. It is currently work in progress, this page is intended to 
show the project's status, some technical documentation and a collection of 
thoughts about future features.  
  
  == Online example and docs ==
  
- Refer to [http://solrjs.solrstuff.org/] to view an online example and online 
jsdocs.
+ Refer to [http://solrjs.solrstuff.org/] to view an online example and online 
jsdocs. Note that both example and docs can easily be created locally in trunk 
using ant. 
+ 
+ == Source code ==
+ 
+ In the current trunk (Solr 1.4. SNAPSHOT) solrjs found its home in solr's svn 
under client/javascript. Source code can be located at 
[http://svn.apache.org/repos/asf/lucene/solr/trunk/client/javascript/]
+ 
+ == Creating the docs ==
+ 
+ We use jsdoc ([http://jsdoc.sourceforge.net/]) to create JavaDoc like 
documentation. Just go to client/javascript, execute "ant docs" and point to 
"client/javascript/dist/doc/index.html".
+ 
+ == Creating the distribution ==
+ 
+ After execution of "ant dist", a "dist" directory will be created containing 
2 files:
+ 
+  * solrjs-1.4-dev.js -> an aggregated file composed of all *.js files in the 
src tree in correct order.
+  * solrjs-1.4-dev-templates.jar -> solrjs-1.4-dev-templates.jar velocity 
files used by server side widgets. This jar can be put into solr/lib when 
needed.
+ 
+ 
+ == Creating the reuters example ==
+ 
+ To explore the code, it's best to investigate and debug the reuters single 
page example locally. To achieve this, the following steps are needed:
+ 
+  * ant reuters-start -> starts a testsolr instance under port 8983 including 
the schema for reuters business articles.
+  * go to "client/javascript/example/reuters/testdata" and execute 
"./download-dataset.sh". This script will download the dataset from 
[http://kdd.ics.uci.edu/databases/reuters21578/reuters21578.html] and extracts 
the *.sgm files.
+  * ant reuters-import -> imports the sgm files into the running testsolr
+  * point the browser to "client/javascript/example/reuters/index.html" and 
enjoy.
+ 
+ 
  
  == Architectural Overview ==
  
- The library is written using the javascript toolkit jQuery 
[http://jquery.com/] (Version 1.2.5). After distribution, SolrJS is included in 
one additional javascript file "solrjs.js". The idea is to create several 
(reusable and extensible) "widgets" that represent solr queries. A widget is a 
javascript object that is responsible for creating the according solr query as 
well as render the result from the server to html. One manager object acts as a 
container that holds these widgets, performs the actual query using jQueries 
getJSON [http://docs.jquery.com/Ajax/jQuery.getJSON#urldatacallback] method. 
This method creates a dynamic script tag, making cross-domain solr requests 
possible. 
+ The library is written using the javascript toolkit jQuery 
[http://jquery.com/] (minmal version 1.2.5). After distribution, SolrJS is 
included in one additional javascript file "solrjs.js". The idea is to create 
several (reusable and extensible) "widgets" that represent solr queries. A 
widget is a javascript object that is responsible for creating the according 
solr query as well as render the result from the server to html. One manager 
object acts as a container that holds these widgets, performs the actual query 
using jQueries getJSON 
[http://docs.jquery.com/Ajax/jQuery.getJSON#urldatacallback] method. This 
method creates a dynamic script tag, making cross-domain solr requests 
possible. 
  
  There are two base types of widgets:
  

Reply via email to