You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by bu...@apache.org on 2015/02/25 10:35:30 UTC

svn commit: r941439 - in /websites/staging/jena/trunk/content: ./ documentation/query/text-query.html

Author: buildbot
Date: Wed Feb 25 09:35:29 2015
New Revision: 941439

Log:
Staging update by buildbot for jena

Modified:
    websites/staging/jena/trunk/content/   (props changed)
    websites/staging/jena/trunk/content/documentation/query/text-query.html

Propchange: websites/staging/jena/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Feb 25 09:35:29 2015
@@ -1 +1 @@
-1661469
+1662191

Modified: websites/staging/jena/trunk/content/documentation/query/text-query.html
==============================================================================
--- websites/staging/jena/trunk/content/documentation/query/text-query.html (original)
+++ websites/staging/jena/trunk/content/documentation/query/text-query.html Wed Feb 25 09:35:29 2015
@@ -195,11 +195,11 @@ or
 properties work with.  When data is added, any properties matching the
 description cause an entry to be added from analysed text from the triple
 object and mapping to the subject.</p>
-<h3 id="pattern-a-wzxhzdk18-rdf-data">Pattern A &ndash; RDF data</h3>
+<h3 id="pattern-a-wzxhzdk19-rdf-data">Pattern A &ndash; RDF data</h3>
 <p>In this pattern, the data in the text index is indexing literals in the RDF data.<br />
 Additions to the RDF data are reflected in additions to the index.</p>
 <p>(Deletes do not remove text index entries - <a href="#deletion-of-indexed-entities">see below</a>)</p>
-<h3 id="pattern-b-wzxhzdk19-external-content">Pattern B &ndash; External content</h3>
+<h3 id="pattern-b-wzxhzdk20-external-content">Pattern B &ndash; External content</h3>
 <p>There is no requirement that the text data indexed is present in the RDF
 data.  As long as the index contains the index text documents to match the
 index description, then text search can be performed.</p>
@@ -262,7 +262,7 @@ surrounding <code>( )</code> can be omit
 <h3 id="good-practice">Good practice</h3>
 <p>The query execution does not know the selectivity of the text index.  It is
 better to use one of two styles.</p>
-<h4 id="query-pattern-1-wzxhzdk20-find-in-the-text-index-and-enhance-results">Query pattern 1 &ndash; Find in the text index and enhance results</h4>
+<h4 id="query-pattern-1-wzxhzdk21-find-in-the-text-index-and-enhance-results">Query pattern 1 &ndash; Find in the text index and enhance results</h4>
 <p>Access to the index is first in the query and used to find a number of
 items of interest; further information is obtained about these items from
 the RDF data.</p>
@@ -276,7 +276,7 @@ the RDF data.</p>
 
 <p>Limit is useful here when working with large indexes to limit results to the
 more higher scoring results.</p>
-<h4 id="query-pattern-2-wzxhzdk21-filter">Query pattern 2 &ndash; Filter</h4>
+<h4 id="query-pattern-2-wzxhzdk22-filter">Query pattern 2 &ndash; Filter</h4>
 <p>By finding items of interest first in the RDF data, the text search can be
 used to restrict the items found still further.</p>
 <div class="codehilite"><pre><span class="n">SELECT</span> ?<span class="n">s</span>
@@ -399,6 +399,20 @@ neither of which has any configuration p
 for details of what these analyzers do. 
 In addition, Jena provides <code>LowerCaseKeywordAnalyzer</code>,
 which is a case-insensitive version of <code>KeywordAnalyzer</code>.</p>
+<p>New in Jena 2.13.0 is the optional ability to specify an analyzer to be used for the
+query string itself.  It will find terms in the query text.  If not set, then the
+analyzer used for the document will be used.  The query analyzer is specified on
+the <code>TextIndexLucene</code> resource:</p>
+<div class="codehilite"><pre><span class="o">&lt;</span>#<span class="n">indexLucene</span><span class="o">&gt;</span> <span class="n">a</span> <span class="n">text</span><span class="p">:</span><span class="n">TextIndexLucene</span> <span class="p">;</span>
+    <span class="n">text</span><span class="p">:</span><span class="n">directory</span> <span class="o">&lt;</span><span class="n">file</span><span class="p">:</span><span class="n">Lucene</span><span class="o">&gt;</span> <span class="p">;</span>
+    <span class="n">text</span><span class="p">:</span><span class="n">entityMap</span> <span class="o">&lt;</span>#<span class="n">entMap</span><span class="o">&gt;</span> <span class="p">;</span>
+    <span class="n">text</span><span class="p">:</span><span class="n">queryAnalyzer</span> <span class="p">[</span>
+        <span class="n">a</span> <span class="n">text</span><span class="p">:</span><span class="n">KeywordAnalyzer</span>
+    <span class="p">]</span>
+    <span class="p">.</span>
+</pre></div>
+
+
 <h3 id="configuration-by-code">Configuration by Code</h3>
 <p>A text dataset can also be constructed in code as might be done for a
 purely in-memory setup:</p>