<commit_before># solrsan

http://github.com/tc/solrsan

This gem is a lightweight wrapper for the Apache Solr API.

Before you start, read the documentation for solr at http://wiki.apache.org/solr

It'll be invaluable for knowing parameters and error messages. 
I made a few test cases for further examples at http://github.com/tc/solrsan/tree/master/test/unit

## HOWTO
Install Jetty

```
  wget http://download.eclipse.org/jetty/7.5.4.v20111024/dist/jetty-distribution-7.5.4.v20111024.tar.gz"
  tar -zxvf jetty-distribution-*.tar.gz
  rm jetty-distribution-*.tar.gz
  sudo mv jetty-distribution-* /usr/local
  cd /usr/local
  sudo ln -s jetty-distribution-* jetty
```

Install solr

```
  wget http://www.ecoficial.com/apachemirror/lucene/solr/3.4.0/apache-solr-3.5.0.tgz
  tar -zxvf apache-solr-*.tgz
  cd apache-solr-*
  sudo cp dist/apache-solr-*.war /usr/local/jetty/webapps/solr.war
```

Add solrsan to your Ruby application's Gemfile:

```
  gem "solrsan"
```<commit_msg>readme notes<commit_after># solrsan

http://github.com/tc/solrsan

This gem is a lightweight wrapper for the Apache Solr API.

Before you start, read the documentation for solr at http://wiki.apache.org/solr

It'll be invaluable for knowing parameters and error messages. 
I made a few test cases for further examples at http://github.com/tc/solrsan/tree/master/test/unit

## HOWTO
Install Jetty/solr

```
rake solr:setup
```
See lib/tasks/solr.rake

Add solrsan to your Ruby application's Gemfile:

```
  gem "solrsan"
```
{'fraction_non_alphanumeric': 0.12316910785619174, 'fraction_numerical': 0.018641810918774968, 'mean_word_length': 3.7413249211356465, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3153957', 'n_tokens_mistral': 579, 'n_tokens_neox': 527, 'n_words': 148}