Skip to content

Commit 7036014

Browse files
authored
Merge pull request #402 from duncdrum/GH-392
feat(lucene): add min attribute for boolean query
2 parents 71e8f32 + 69e06c7 commit 7036014

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
let $query := <query><bool min="3"><term>witch</term></bool></query>
2+
3+
return
4+
//SPEECH[ft:query(LINE, $query)]

src/main/xar-resources/data/lucene/lucene.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@
33
schematypens="http://purl.oclc.org/dsdl/schematron"?><article xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
44
<info>
55
<title>Full Text Index</title>
6-
<date>2Q19</date>
6+
<date>4Q19</date>
77
<keywordset>
88
<keyword>indexing</keyword>
99
</keywordset>
1010
</info>
1111

1212
<!-- ================================================================== -->
1313

14-
<para>This article provides information on configuring and using eXist-db's full text
15-
index.</para>
14+
<para>This article provides information on configuring and using eXist-db's full text index.</para>
1615

1716
<!-- ================================================================== -->
1817

@@ -621,6 +620,8 @@
621620
</variablelist>
622621
<para>For instance:</para>
623622
<programlisting language="xquery" xlink:href="listings/listing-41.txt"/>
623+
<para>To optimize performance you can specify a minimum number of matches to prevent needless disjunctive searches, using the <literal>min</literal> attribute. If no occurence indicator is provided the query will default to <literal>should</literal>, as this is the only indicator that supports <literal>min</literal>:</para>
624+
<programlisting language="xquery" xlink:href="listings/listing-1.txt"/>
624625
</listitem>
625626
</varlistentry>
626627
<varlistentry>

0 commit comments

Comments
 (0)