<commit_before>#+SETUPFILE: "basho-search-doc-style.iorg"
#+TITLE: Riak Search Manual - DRAFT

* Introduction

  Basho Riak Search is a distributed index and full-text search engine
  built on top of (and complementary to) Basho Riak. Just like Riak,
  Search allows you to store your data in a distributed fashion
  designed for easy operations. You can add physical servers to gain
  capacity and performance, and if a node fails the cluster continues
  to function.

** Requirements

   The following components are required:

   + Erlang R13B04 (or later)
   + Java 1.6.x
   + Ant
   + gcc toolchain
   + BDB 5.0.21 - (Installation instructions below.)

** Installation
   
*** Install BerkeleyDB
   
    Download the source code for v. 5.0.21:
    http://download.oracle.com/berkeley-db/db-5.0.21.NC.tar.gz

    If you are running on a Mac, set build flags and copy header
    files to necessary locations:

    : export CC=gcc
    : export CFLAGS="-arch x86_64 -m64"
    : export CXXFLAGS="-arch x86_64 -m64"
    : export LDFLAGS="-arch x86_64 -m64"
    : sudo cp /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Headers/*.h /usr/include/.

    Finally, extract, build, and install BerkeleyDB:

    : tar -zxvf db-5.0.21.NC.tar.gz
    : cd db-5.0.21.NC
    : cd build_unix
    : ../dist/configure --enable-java
    : make
    : sudo make install

*** Unzip and install Riak Search*

    Enter the riak\_search directory and run:

    : make
    : make rel
    
    Change to the rel/riaksearch directory

    : cd rel/riaksearch

*** Start Riak

    If you are running on a Mac, set JAVA\_HOME and increase your
    filehandle limit:
    
    : export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
    : ulimit -n 1024
    
    From within the rel/riaksearch directory, start Riak:
    
    : bin/riaksearch console
    
    Or, use =bin/riaksearch start= to start riak\_search in the background.

<commit_msg>Updating instructions for installing BDB-JE<commit_after>#+SETUPFILE: "basho-search-doc-style.iorg"
#+TITLE: Riak Search Manual - DRAFT

* Introduction

  Basho Riak Search is a distributed index and full-text search engine
  built on top of (and complementary to) Basho Riak. Just like Riak,
  Search allows you to store your data in a distributed fashion
  designed for easy operations. You can add physical servers to gain
  capacity and performance, and if a node fails the cluster continues
  to function.

** Requirements

   The following components are required:

   + Erlang R13B04 (or later)
   + Java 1.6.x
   + Ant
   + gcc toolchain
   + BDB Java Edition 4.0.103 - (Installation instructions below.)

** Installation
   
*** Install BerkeleyDB
   
    Download the distribution file from:
    http://download.oracle.com/berkeley-db/je-4.0.103.tar.gz

    Copy the lib/je-4.0.103.jar into
    rel/riaksearch/lib/raptor/priv/raptor_server

*** Unzip and install Riak Search*

    Enter the riak\_search directory and run:

    : make
    : make rel
    
    Change to the rel/riaksearch directory

    : cd rel/riaksearch

*** Start Riak

    If you are running on a Mac, set JAVA\_HOME and increase your
    filehandle limit:
    
    : export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
    : ulimit -n 1024
    
    From within the rel/riaksearch directory, start Riak:
    
    : bin/riaksearch console
    
    Or, use =bin/riaksearch start= to start riak\_search in the background.


{'fraction_non_alphanumeric': 0.08304597701149426, 'fraction_numerical': 0.022988505747126436, 'mean_word_length': 2.8294829482948294, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6773524', 'n_tokens_mistral': 1183, 'n_tokens_neox': 1084, 'n_words': 379}