# What version to get?

For most new projects we recommend using the code in our git master HEAD. This version conforms with Java Lucene 2.3.2, and is considerably faster than any previous version of CLucene. It also uses cmake as it's build system, and continuesly evolves to be stronger and faster.

There is also the 0.9.21b version we release quite a while ago. It is proven to be stable, but we provide almost no support for it nowadays. Use it only if you have a compelling reason not to use the one in the git master HEAD.

For more info on this, please read this thread. You are welcome to ask any follow-up questions in our mailing list. Also, don't forget to check on how you can contribute.

# The 2_3_2 branch from the git master HEAD

Being continuesly updated

The recommended branch to use. Easier to build and maintain.

Use a git client to keep in sync with our working copy:

    git clone git://clucene.git.sourceforge.net/gitroot/clucene/clucene

Alternatively, you can download a tarball through our WebGUI (click "snapshot").

Build instructions (more info in the INSTALLATION and README files):

    Building from source:
    --------------------

    Dependencies:
    * CMake version 2.4.2 or later (2.6 or later recommended due to an improved FindBoost module)
    * Boost libs (http://www.boost.org/), latest version recommended
    * A functioning and fairly new C++ compiler. We test mostly on GCC and Visual Studio 6+.
    Anything other than that may not work.
    * Something to unzip/untar the source code.

    Build instructions:
    1.) Download the latest sourcecode of the HEAD of the master branch in our git repository
    2.) Unpack the tarball/zip/bzip/whatever if downloaded as such
    3.) Open a command prompt, terminal window, or cygwin session.
    4.) Change directory into the root of the sourcecode (from now on referred to as <clucene>)
    # cd <clucene>
    5.) Create and change directory into an 'out-of-source' directory for your build.
        [This is by far the easiest way to build,  it has the benefit of being able to
        create different types of builds in the same source-tree.]
    # mkdir <clucene>/build-name
    # cd <clucene>/build-name
    5*.) Windows users: make sure Boost environment variables are defined at least for the current
       command prompt session. You can check this by typing "set" (no quotes). If you have any doubts,
       just type the following 3 commands to set those variables, as follows (boost_1_40_0 being the
       current Boost version):
    	set BOOST_BUILD_PATH=C:\{parent directory for boost}\boost_1_40_0\tools\build\v2
    	set BOOST_PATH=C:\{parent directory for boost}
    	set BOOST_ROOT=C:\{parent directory for boost}\boost_1_40_0
    6.) Configure using cmake. This can be done many different ways, but the basic syntax is
    # cmake [-G "Script name"] ..
        [Where "Script name" is the name of the scripts to build (e.g. Visual Studio 8 2005).
        A list of supported build scripts can be found by]
    # cmake --help
    7.) You can configure several options such as the build type, debugging information,
        mmap support, etc, by using the CMake GUI or by calling
    # ccmake ..
        Make sure you call configure again if you make any changes.
    8.) Start the build. This depends on which build script you specified, but it would be something like
    # make
    or
    # nmake
        Or open the solution files with your IDE.

        [You can also specify to just build a certain target (such as cl_test, cl_demo,
        clucene-core (shared library), clucene-core-static (static library).]
    9.) The binary files will be available in <clucene>build-name/bin
    10.)Test the code. (After building the tests - this is done by default, or by calling make cl_test)
    # ctest -V
    11.)At this point you can install the library:
    # make install
        [There are options to do this from the IDE, but I find it easier to create a
        distribution (see instructions below) and install that instead.]
    or
    # make cl_demo
        [This creates the demo application, which demonstrates a simple text indexing and searching].
    or
    	Adjust build values using ccmake or the Cmake GUI and rebuild.

    12.)Now you can develop your own code. This is beyond the scope of this document.
        Read the README for information about documentation or to get help on the mailinglist.

# Release 0.9.21b

October 23rd, 2008

This is the latest stable official release.

Installation notes

    Rebuilding the autobuild scripts
    --------------------------------
    If you made changes to the configure.ac or any of the Makefile.am
    files you will also need to run through this process.

    Requirements:
    GNU autotools is required. I have the following versions installed:
    Autoconf 2.57
    Automake 1.72
    Libtool 1.5a

    If you use significantly older versions, I can almost guarantee
    issues.  This is because each of the autotools is constantly changing
    with little regard to backward compatability or even compatiability
    with the other autotools.

    Run the autogen.sh file in the root directory of clucene to run the necessary commands.

    Building
    --------
    The following will get you building assuming that you have suffciently
    recent buld tools installed.
    1.) unpack tarball
    2.) cd into clucene
    3.) if you downloaded a tar version skip to 5
    4.) run ./autogen.sh
    5.) run ./configure
    6.) run make
    7.) things will churn for a very long time, the clucene library will
    be built as well as the examples.
    8.) check the src/demo, test and src directory

    In src/demo you should see:
    cl_demo

    In test you should see
    cl_test

    In src you should see:
    libclucene.so.0.0.0 libclucene.la libclucene.a
    and symbolic links to these files.

    9.) If you want to run make install to copy the clucene files into the system
        include and lib directories
    10.) You may have to run
    export LD_LIBRARY_PATH=/path/to/clucene/lib

    11.) run ./cl_test in the test directory and check that the tests all run

    Alternative (faster) way of building:
    -------------------------------------
    This method does not create library files, so depending on your needs you may not
    find this method useful.

    * Do steps 1-5 of the previous build process.
    * Change directory into src/
    * run make monolithic
    * Change directory into test/ (cd ../test/)
    * run make monolithic
    * You should see cl_test_monolithic in this directory
    * run ./cl_test_monolithic and check that the tests all run