[Rt-commit] rt branch, 4.0/fulltext-search, updated. rt-4.0.0-239-g2a4329d
Kevin Falcone
falcone at bestpractical.com
Tue May 17 21:15:04 EDT 2011
The branch, 4.0/fulltext-search has been updated
via 2a4329de93c95ed09c361fc3b5c5ec7c5800a2ee (commit)
via 5669f76dd873d7d64f9e6d34772dbc91ea056250 (commit)
via d789bd3986a4ad63a71bd2450c9aad0c7763a7de (commit)
from d99fb385b2b46191d749b48be83f21c7cbf2fd7f (commit)
Summary of changes:
docs/full_text_indexing.pod | 12 +++++-------
etc/RT_Config.pm.in | 11 -----------
sbin/rt-setup-fulltext-index.in | 13 ++++++++-----
3 files changed, 13 insertions(+), 23 deletions(-)
- Log -----------------------------------------------------------------
commit d789bd3986a4ad63a71bd2450c9aad0c7763a7de
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Tue May 17 17:09:23 2011 -0400
Remove DontSearchFileAttachments which is oracle only and create time
This instead makes a command line boolean attachments flag for the
rt-setup-fulltext-index command. As a config option, it implied that it
would change the index when you changed RT_Config.pm. As a flag, it
applies only at creation and is documented as an Oracle only feature.
diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 5fb562e..0564852 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -1189,17 +1189,6 @@ Set(%FullTextSearch,
);
-=item C<$DontSearchFileAttachments>
-
-This refers to F<sbin/rt-setup-fulltext-index>.
-
-If C<$DontSearchFileAttachments> is set to 1, then uploaded files
-(attachments with file names) are not indexed.
-
-=cut
-
-Set($DontSearchFileAttachments, undef);
-
=item C<$OnlySearchActiveTicketsInSimpleSearch>
When query in simple search doesn't have status info, use this to only
diff --git a/sbin/rt-setup-fulltext-index.in b/sbin/rt-setup-fulltext-index.in
index 48df079..187476e 100644
--- a/sbin/rt-setup-fulltext-index.in
+++ b/sbin/rt-setup-fulltext-index.in
@@ -92,6 +92,7 @@ my %OPT = (
help => 0,
ask => 1,
dryrun => 0,
+ attachments => 1,
);
my %DEFAULT;
@@ -118,6 +119,7 @@ GetOptions(
'ask!' => \$OPT{'ask'},
'dry-run!' => \$OPT{'dryrun'},
'binary!' => \$OPT{'binary'},
+ 'attachments!' => \$OPT{'attachments'},
'table=s' => \$OPT{'table'},
'column=s' => \$OPT{'column'},
@@ -133,7 +135,6 @@ if ( $OPT{'help'} || (!$DB{'admin'} && $DB{'type'} eq 'Oracle' ) ) {
show_help( !$OPT{'help'} );
}
-
my $dbh = $RT::Handle->dbh;
$dbh->{'RaiseError'} = 1;
$dbh->{'PrintError'} = 1;
@@ -495,7 +496,7 @@ sub ora_create_format_column {
BEGIN
format := CASE
};
- if ( $RT::DontSearchFileAttachments ) {
+ unless ( $OPT{'attachments'} ) {
$detect_format .= qq{
WHEN fname IS NOT NULL THEN 'ignore'
};
@@ -711,7 +712,9 @@ flag.
The Oracle index determines which content-types it will index, at
creation time. By default, unknown content-types are ignored; to
instead index unknown content-types as binary data, pass the C<--binary>
-flag when the index is created.
+flag when the index is created. By default, uploaded attachments
+(attachments with filenames) are indexed; to ignore these instead, pass
+the C<--no-attachments> flag when the index is create.
=head1 AUTHOR
commit 5669f76dd873d7d64f9e6d34772dbc91ea056250
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Tue May 17 21:14:08 2011 -0400
Clear a warning about undef in lc on 5.12
diff --git a/sbin/rt-setup-fulltext-index.in b/sbin/rt-setup-fulltext-index.in
index 187476e..fb161ea 100644
--- a/sbin/rt-setup-fulltext-index.in
+++ b/sbin/rt-setup-fulltext-index.in
@@ -271,7 +271,7 @@ elsif ( $DB{'type'} eq 'Pg' ) {
."$column tsvector )";
}
- my $index_type = lc $OPT{'index-type'} || '';
+ my $index_type = lc($OPT{'index-type'} || '');
while ( $index_type ne 'gist' and $index_type ne 'gin' ) {
$index_type = lc prompt(
message => "You may choose between GiST or GIN indexes; the former is several times\n"
commit 2a4329de93c95ed09c361fc3b5c5ec7c5800a2ee
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Tue May 17 21:14:50 2011 -0400
Minor doc tweaks
diff --git a/docs/full_text_indexing.pod b/docs/full_text_indexing.pod
index 9fad5a5..af1cdea 100644
--- a/docs/full_text_indexing.pod
+++ b/docs/full_text_indexing.pod
@@ -18,7 +18,7 @@ Japanese and Chinese content is extremely limited.
=head2 Creating and configuring the index
Postgres 8.3 and above support full-text searching natively; to set up
-an the C<ts_vector> column, and creates either a C<GiN> or C<GiST> index
+on the C<ts_vector> column, and creates either a C<GiN> or C<GiST> index
on it, run:
sbin/rt-setup-fulltext-index
@@ -46,12 +46,10 @@ To keep the index up-to-date, you will need to run:
sbin/rt-fulltext-indexer
...at regular intervals. By default, this will only tokenize up to 100
-tickets at a time; you can adjust this batch upwards by passing
-C<--limit 500>, for instance. Larger batch sizes will take longer and
+tickets at a time; you can adjust this upwards by passing
+C<--limit 500>. Larger batch sizes will take longer and
consume more memory. Care should be taken to ensure that multiple
-instances of C<rt-fulltext-indexer> are not run at the same time, should
-it be run at too close intervals for the given batch size.
-
+instances of C<rt-fulltext-indexer> are not run at the same time.
=head1 MYSQL
@@ -96,7 +94,7 @@ provided by Sphinx:
indexer rt
-This command should also be run at regular intervals in order to pick
+This command should also be run at regular intervals in order to pick up
new and updated attachments from RT's database. Failure to do so will
result in stale data.
diff --git a/sbin/rt-setup-fulltext-index.in b/sbin/rt-setup-fulltext-index.in
index fb161ea..02d3e68 100644
--- a/sbin/rt-setup-fulltext-index.in
+++ b/sbin/rt-setup-fulltext-index.in
@@ -709,7 +709,7 @@ explicitly:
To test what will happen without running any DDL, pass the C<--dryrun>
flag.
-The Oracle index determines which content-types it will index, at
+The Oracle index determines which content-types it will index at
creation time. By default, unknown content-types are ignored; to
instead index unknown content-types as binary data, pass the C<--binary>
flag when the index is created. By default, uploaded attachments
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list