You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by Apache Wiki <wi...@apache.org> on 2017/03/03 14:48:39 UTC

[Tika Wiki] Update of "TikaEvalJdbc" by TimothyAllison

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tika Wiki" for change notification.

The "TikaEvalJdbc" page has been changed by TimothyAllison:
https://wiki.apache.org/tika/TikaEvalJdbc

New page:
= Connecting tika-eval to your own db via JDBC =

As default, tika-eval uses an in-memory H2 database, specified by `-db` on the commandline.

However, you can also specify a jdbc connection string with `-jdbc`.

'''NOTE: We will try to keep the SQL used in `Profile` and `Compare` simple enough to apply generally through jdbc.  However, we cannot support all the flavors of SQL in our default `Report` tool.  If you choose to use `-jdbc`, you are on your own for translating the report SQL to your dialect.'''

= Examples =
First, make sure to put the appropriate db driver jar on your classpath.  In the following, we assume that you have the driver jar and the `tika-eval.jar` in `bin/`.

== Basic Profile ==

{{{
    java -cp "bin/*" org.apache.tika.eval.TikaEvalCLI Profile -jdbc "jdbc:postgresql:tika_eval?user=user&password=superSecret" -extracts extracts
}}}

== Basic Profile with Custom Table Prefixes ==

Now, let's say you want to profile 3 separate runs of OCR with different settings, say `quality=1.0`, `quality=0.5` and `quality=0.1`.
You'll need to prefix your tables with a different prefix for each run.

{{{
    java -cp "bin/*" org.apache.tika.eval.TikaEvalCLI Profile -jdbc "jdbc:postgresql:tika_eval?user=user&password=superSecret" -extracts extracts10 -tablePrefix q10
}}}

{{{
    java -cp "bin/*" org.apache.tika.eval.TikaEvalCLI Profile -jdbc "jdbc:postgresql:tika_eval?user=user&password=superSecret" -extracts extracts05 -tablePrefix q05
}}}

{{{
    java -cp "bin/*" org.apache.tika.eval.TikaEvalCLI Profile -jdbc "jdbc:postgresql:tika_eval?user=user&password=superSecret" -extracts extracts01 -tablePrefix q01
}}}

This will leave you with 24 tables, 7 for each run and then 3 reference tables.