Installation (Advanced)

The basic steps are:

1) clone the repository.
   $ git clone

   Prerequisites you need:
   - libdl    This is used for dynamic loading. It should be part of your core OS
   - libz     In package zlib. It should be part of your core OS 

   Some prerequisites you may want/need:
   - libmagic (in Package: libmagic-dev )
   - Berkeley DB (in Package: libdb-dev)

  Use of libdb is currently limied to some caching code that is NOT required by the engine kernel. 

  If you do not have libmagic (and don't want to install or build it). Turn it off. It is controlled by
  See doctype/autodetect.hxx.

2) Go into the build/ directory
   $ cd re-Isearch/build/

   if you have g++/gcc-10 installed and are running Ubuntu x86 64-bit you could just type Make and it should just build. 

But generally:
3) Edit the Makefile to confirm that the correct version of GCC is specified as well as the desired paths and command line args.
   The standard we used to build was g++/gcc-10. You may also use whatever gcc/g++ is installed (we don't use any of the newer language features much less C++20) but since we all have typically multiple g++/gcc versions (due to some software requirements) you set it here.

   In the file you will see there are also provisions for other compilers such as the typical CC and cc.

   It should work on any of the BSD variants, Solaris, AIX etc. with any of a number of processors from ARM to x86.

   One sets here a number of compile options and flags for producing debug or production among other things.

   See the Makefile up until
   After the ############### End Differences ###################################### 
   there are a few options that may need tweaking on different platforms.

   $make -j4
   (or any -j option depending upon hardware)

4) To build the optional plugins
   $ make plugins

    WARNING: The default install directory for plugins in the Makefile is: 
    this directory needs to be writable by the user doing the make plugins
    if you want to have the plugins installed elsewhere please redefine the path
    and consult the handbook about configuration details.

    NOTES about ODT2: plugin
    The ODT2 plugin is currently experimental. It will eventually replace the ODT doctype (wwhich uses Pandoc).
    for it to work on needs to 
    a) install the odf-search shell script in some directory findable by the ODT2 plugin.
    b) modify the odf-search shell script so that it uses the odf-search.jar (e.g. fully specified path where it is installed)

5) Test to see everything went well.
   $ ../bin/Iindex

it should produce a long list of command line options-- as well as options to get the embdeded help.
If it returns a message on of the order of "  error while loading shared libraries: " you need to either define the library load path:
   or ldconfig
   or define an appropriate user account for the installation (see the handbook Admin section).

   Now that the libraries resolve let's index something.

   In the test/data directory are a number of files for testing. We'll index the XMLified collected works of Shakespeare.

  $ ../bin/Iindex -d /tmp/BART ../test/data/shakespeare.xml
  Here we read the sample XML collection of the collected works of Shakespeare and write an index to /tmp/BART
  We let the AUTODETECT handler do its magic and recognize the document both as a kind of XML and a play.
  Notice that in the conf/ directory we have a "play.ini" configuration file.  We read it and do what it suggests-- namely to ignore P and FM tags.

   We might want to know what fields/paths have been parsed:

    $ ../bin/Iutil -d /tmp/BART -vf
Iutil [Info]: Iutil 4.0a (x86_64 GNU/Linux)

   Now search
   Search has a lot of options. We'll use -show to have the tool show us the hit.
  $../bin/Isearch -d /tmp/BART -show to be or not to be

Process time: 19 ms. (1) Search: 17 ms.
Query: "to be or not to be"

1 record of 37 matched your query, 1 record displayed.

       Score  File
   1.   100  /home/edz/ib/ib2/build/data/shakespeare.xml
`The Tragedy of Hamlet, Prince of Denmark'
Hit: To be, or not to be: that is the question:

   There are a bunch of options and many tools. Please consult the handbook.

   $ ../bin/Isearch -d /tmp/BART -show -P speech/speaker to be or not to be

Process time: 18 ms. (2) Search: 16 ms.
Query: "to be or not to be"

1 record of 37 matched your query, 1 record displayed.

       Score  File
   1.   100  /home/edz/ib/ib2/build/data/shakespeare.xml
`The Tragedy of Hamlet, Prince of Denmark'
** 'speech/speaker' Fragment: 
Hit: To be, or not to be: that is the question:

   $ ../bin/Isearch -d /tmp/BART -P SPEECH/SPEAKER -rpn out spot PEER

Process time: 4 ms. (1) Search: 3 ms. (1.3 ms/term)
Query: "out" "spot" PEER

1 record of 37 matched your query, 1 record displayed.

       Score  File
   1.   100  /home/edz/ib/ib2/build/data/shakespeare.xml
`The Tragedy of Macbeth'
** 'SPEECH/SPEAKER' Fragment: 
Hit: Out, damned spot! out, I say!--One: two: why,

The above search is looking for the words "out" and "spot" in the same node. It found them in the same line. We also asked for the value of the child SPEAKER of the parent SPEECH of the hit, e.g. who expressed the line.  It was, of course, Lady Macbeth

For a short usage summary:

   $ ../bin/Isearch

6) To make language bindings:
   $ cd ../swig

Windows Platform note:
   We don't officilly support the Windows platform at this time.
   That said, everything is there for Windows but have not maintained any testing so may have broken something at one point-- fortunately it should be releative easy to patch is needed and would welcome the contribution.

Last updated