<commit_before>= DataMapper Sphinx Adapter

* http://dm-sphinx.rubyforge.org
* http://rubyforge.org/projects/dm-sphinx
* http://github.com/shanna/dm-sphinx-adapter/tree/master

== Description

A DataMapper Sphinx adapter.

== Dependencies

* dm-core           ~> 0.9.7
* dm-is-searchable  ~> 0.9.7 (optional)

I'd recommend using the dm-more plugin dm-is-searchable instead of fetching the document id's yourself.

== Install

* Via git: git clone git://github.com/shanna/dm-sphinx-adapter.git
* Via gem: gem install shanna-dm-sphinx-adapter -s http://gems.github.com

== Synopsis

DataMapper uses URIs or a connection has to connect to your data-stores. In this case the sphinx search daemon
<tt>searchd</tt>.

On its own this adapter will only return an array of document hashes when queried. The DataMapper library
<tt>dm-is-searchable</tt> however provides a common interface to search one adapter and load documents from another. My
preference is to use this adapter in tandem with <tt>dm-is-searchable</tt>. See further examples in the synopsis for
usage with <tt>dm-is-searchable</tt>.

Like all DataMapper adapters you can connect with a Hash or URI.

A URI:
  DataMapper.setup(:search, 'sphinx://localhost')

The breakdown is:
  "#{adapter}://#{host}:#{port}/#{config}"
  - adapter Must be :sphinx
  - host    Hostname (default: localhost)
  - port    Optional port number (default: 3312)
<commit_msg>Document known working Sphinx versions. Anecdotal evidence suggests the 0.9.x series has issues surrounding attribute filtering in Riddle.<commit_after>= DataMapper Sphinx Adapter

* http://dm-sphinx.rubyforge.org
* http://rubyforge.org/projects/dm-sphinx
* http://github.com/shanna/dm-sphinx-adapter/tree/master

== Description

A DataMapper Sphinx adapter.

== Dependencies

Ruby::
* dm-core           ~> 0.9.10
* dm-is-searchable  ~> 0.9.10 (optional)

I'd recommend using the dm-more plugin dm-is-searchable instead of fetching the document id's yourself.

Sphinx::
* 0.9.8-r871
* 0.9.8-r909
* 0.9.8-r985
* 0.9.8-r1065
* 0.9.8-r1112
* 0.9.8-rc1 (gem version: 0.9.8.1198)
* 0.9.8-rc2 (gem version: 0.9.8.1231)
* 0.9.8 (gem version: 0.9.8.1371)

Internally the Riddle client library is used.

== Install

* Via git: git clone git://github.com/shanna/dm-sphinx-adapter.git
* Via gem: gem install shanna-dm-sphinx-adapter -s http://gems.github.com

== Synopsis

DataMapper uses URIs or a connection has to connect to your data-stores. In this case the sphinx search daemon
<tt>searchd</tt>.

On its own this adapter will only return an array of document hashes when queried. The DataMapper library
<tt>dm-is-searchable</tt> however provides a common interface to search one adapter and load documents from another. My
preference is to use this adapter in tandem with <tt>dm-is-searchable</tt>. See further examples in the synopsis for
usage with <tt>dm-is-searchable</tt>.

Like all DataMapper adapters you can connect with a Hash or URI.

A URI:
  DataMapper.setup(:search, 'sphinx://localhost')

The breakdown is:
  "#{adapter}://#{host}:#{port}/#{config}"
  - adapter Must be :sphinx
  - host    Hostname (default: localhost)
  - port    Optional port number (default: 3312)

{'fraction_non_alphanumeric': 0.11668757841907151, 'fraction_numerical': 0.027603513174404015, 'mean_word_length': 3.8099547511312215, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1810881', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1059, 'n_words': 351}