You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2014/10/23 09:47:33 UTC
svn commit: r1633761 - in /manifoldcf/branches/dev_1x: ./ CHANGES.txt
site/src/documentation/content/xdocs/en_US/end-user-documentation.xml
Author: kwright
Date: Thu Oct 23 07:47:32 2014
New Revision: 1633761
URL: http://svn.apache.org/r1633761
Log:
Pull up fix for CONNECTORS-1078 from trunk
Modified:
manifoldcf/branches/dev_1x/ (props changed)
manifoldcf/branches/dev_1x/CHANGES.txt
manifoldcf/branches/dev_1x/site/src/documentation/content/xdocs/en_US/end-user-documentation.xml
Propchange: manifoldcf/branches/dev_1x/
------------------------------------------------------------------------------
Merged /manifoldcf/trunk:r1633760
Modified: manifoldcf/branches/dev_1x/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/CHANGES.txt?rev=1633761&r1=1633760&r2=1633761&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/CHANGES.txt (original)
+++ manifoldcf/branches/dev_1x/CHANGES.txt Thu Oct 23 07:47:32 2014
@@ -3,6 +3,10 @@ $Id$
======================= 1.8-dev =====================
+CONNECTORS-1078: Improve end-user documentation for the JDBC
+connection type.
+(Jens Jahnke, Karl Wright)
+
CONNECTORS-1074: Use Tika to map extensions to mime types.
(Shinichiro Abe, Karl Wright)
Modified: manifoldcf/branches/dev_1x/site/src/documentation/content/xdocs/en_US/end-user-documentation.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/dev_1x/site/src/documentation/content/xdocs/en_US/end-user-documentation.xml?rev=1633761&r1=1633760&r2=1633761&view=diff
==============================================================================
--- manifoldcf/branches/dev_1x/site/src/documentation/content/xdocs/en_US/end-user-documentation.xml (original)
+++ manifoldcf/branches/dev_1x/site/src/documentation/content/xdocs/en_US/end-user-documentation.xml Thu Oct 23 07:47:32 2014
@@ -1938,13 +1938,29 @@ curl -XGET http://localhost:9200/index/_
<tr><td>IDLIST</td><td>A query string value containing a parenthesized list of document identifier values</td></tr>
</table>
<br/>
- <p>Use caution when constructing queries that include time-based
+ <p>It is often necessary to construct composite values using SQL query operators in order to create the version strings, URLs,
+ and data which the JDBC connection type needs. Each database has its own caveats in this regard. Consult your database
+ manual to be sure you are constructing your queries in a manner consistent with best practices for that database. For example,
+ for MySQL databases, NULL column values will prevent straightforward concatenation of results. You might expect the following
+ to work:</p>
+ <br/>
+ <p><code>SELECT id AS $(IDCOLUMN), CONCAT("http://my.base.url/show.html?record=", id) AS $(URLCOLUMN),
+ CONCAT(name, " ", description, " ", what_ever) AS $(DATACOLUMN)
+ FROM accounts WHERE id IN $(IDLIST)</code></p>
+ <br/>
+ <p>But, any NULL column values will disrupt the concatenation in MySQL, so you must instead write your query like this:</p>
+ <br/>
+ <p><code>SELECT id AS $(IDCOLUMN), CONCAT("http://my.base.url/show.html?record=", id) AS $(URLCOLUMN),
+ CONCAT(name, " ", IFNULL(description, ""), " ", IFNULL(what_ever, "")) AS $(DATACOLUMN)
+ FROM accounts WHERE id IN $(IDLIST)</code></p>
+ <br/>
+ <p>Also, use caution when constructing queries that include time-based
components. "$(STARTTIME)" and "$(ENDTIME)" provide
times in milliseconds since epoch. If the modified date field is not
in this unit, the seeding query may not select the desired document
identifiers. You should convert "$(STARTTIME)" and
- "$(ENDTIME)" to the appropriate timestamp unit for your system within your query.</p>
- <p>The following table gives several sample query fragments that can be
+ "$(ENDTIME)" to the appropriate timestamp unit for your system within your query.
+ The following table gives several sample query fragments that can be
used to convert the helper strings "$(STARTTIME)" and
"$(ENDTIME)" into other date and time types. The first column names
the SQL database type that the following query phrase corresponds to,