[Rt-commit] rt branch, 4.2/mysql-native-fts, repushed
Alex Vandiver
alexmv at bestpractical.com
Mon Dec 22 18:34:25 EST 2014
The branch 4.2/mysql-native-fts was deleted and repushed:
was 77641fc397e6abe83bc3935bad44c55591a3d2ca
now 8e36778bbe2c67b1f3fe3cc35e8b26804de78701
1: a7968ec = 1: 4660cf6 Add full path to one rt-fulltext-indexer that lacks it
2: 84747c7 ! 2: 9655340 Add additional clarification points about Sphinx on MySQL
@@ -12,15 +12,21 @@
-SphinxSE requires MySQL 5.0 or 5.1; later versions of MySQL have not
-been tested at this time. Sphinx version 2.0.1 has been tested to work,
-but version 0.9.9 may work as well. Compilation and installation
--instructions for MySQL with SphinxSE can be found at
-+SphinxSE requires MySQL 5.0, 5.1, or 5.5; on the latter two, Sphinx can
-+be compiled as a loadable module, for easer of deployment in production.
-+Sphinx version 2.0.1 has been tested to work, but version 0.9.9 may work
-+as well. Compilation and installation instructions for MySQL with
-+SphinxSE can be found at
- L<http://sphinxsearch.com/docs/current.html#sphinxse-installing>.
++MySQL 5.1 supports adding pluggable storage engines; after compiling
++against the appropriate version of MySQL, the F<ha_sphinx.so> file is
++the only that needs to be installed in production, generally into
++C</usr/lib/mysql/plugin/>. It can then be enabled via:
++
++ INSTALL PLUGIN Sphinx SONAME "ha_sphinx.so"
++
++Sphinx versions 0.9.x and 2.0.x are known-working versions, but later
++versions may work as well. Complete compilation and installation
+ instructions for MySQL with SphinxSE can be found at
+-L<http://sphinxsearch.com/docs/current.html#sphinxse-installing>.
++L<http://sphinxsearch.com/docs/current.html#sphinxse-mysql51>.
=head2 Creating and configuring the index
+
@@
=head2 Caveats
@@ -38,4 +44,12 @@
C<%FullTextSearch>'s C<MaxMatches> in C<RT_SiteConfig.pm>, which must be
kept in sync. The default, set during C<rt-setup-fulltext-index>, is
10000. This limit may lead to false negatives in search results if the
+ maximum number of matches is reached but the results returned do not
+-match RT's other criteria.
++match RT's other criteria. However, a too-large value will notably
++degrade performance, as it adds memory allocation overhead to every
++query.
+
+ Take, for example, the instance where Sphinx is configured to return a
+ maximum of three results, and tickets 1, 2, 3, 4, and 5 contain the
3: ac688e2 = 3: e390dc6 Drop sphinx xmlpipe2 output, which was unusable and undocumented
4: d5f256f = 4: 6ba220e Drop finalize and clean functions, which are now unused
5: 02a8588 = 5: 8da4115 Rename Sphinx FTS search tests to "sphinx", not "mysql"
6: 84066c4 ! 6: 982ca07 Support native FTS on MySQL 5.6 and above
@@ -72,11 +72,11 @@
-=head2 Compiling MySQL and SphinxSE
+=head3 Compiling MySQL and SphinxSE
- SphinxSE requires MySQL 5.0, 5.1, or 5.5; on the latter two, Sphinx can
- be compiled as a loadable module, for easer of deployment in production.
-@@
- SphinxSE can be found at
- L<http://sphinxsearch.com/docs/current.html#sphinxse-installing>.
+ MySQL 5.1 supports adding pluggable storage engines; after compiling
+ against the appropriate version of MySQL, the F<ha_sphinx.so> file is
+@@
+ instructions for MySQL with SphinxSE can be found at
+ L<http://sphinxsearch.com/docs/current.html#sphinxse-mysql51>.
-=head2 Creating and configuring the index
+=head3 Creating and configuring the index
@@ -167,6 +167,18 @@
+ VALUE => '("'. $dbh->quote($value) .'" IN BOOLEAN MODE)',
+ QUOTEVALUE => 0,
+ );
++ # As with Oracle, above, this forces the LEFT JOINs into
++ # JOINS, which allows the FULLTEXT index to be used.
++ # Orthogonally, the IS NOT NULL clause also helps the
++ # optimizer decide to use the index.
++ $self->Limit(
++ ENTRYAGGREGATOR => 'AND',
++ ALIAS => $alias,
++ FIELD => "Content",
++ OPERATOR => 'IS NOT',
++ VALUE => 'NULL',
++ QUOTEVALUE => 0,
++ );
+ }
elsif ( $db_type eq 'mysql' ) {
# XXX: We could theoretically skip the join to Attachments,
7: 77641fc = 7: 8e36778 Using a separate MyISAM table, we can also support FTS on MySQL < 5.6
More information about the rt-commit
mailing list