projects
/
BackupPC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix tokenization for _file_path_split
[BackupPC.git]
/
lib
/
BackupPC
/
Search
/
KinoSearch.pm
diff --git
a/lib/BackupPC/Search/KinoSearch.pm
b/lib/BackupPC/Search/KinoSearch.pm
index
dcbb749
..
67eff7e
100644
(file)
--- a/
lib/BackupPC/Search/KinoSearch.pm
+++ b/
lib/BackupPC/Search/KinoSearch.pm
@@
-45,6
+45,7
@@
sub indexer {
my $string_type = KinoSearch::Plan::StringType->new; # non-tokenized
my $num_type = KinoSearch::Plan::Int64Type->new;
my $string_type = KinoSearch::Plan::StringType->new; # non-tokenized
my $num_type = KinoSearch::Plan::Int64Type->new;
+ # numeric
$schema->spec_field( name => $_, type => $string_type ) foreach ( qw/
backup_date
backupnum
$schema->spec_field( name => $_, type => $string_type ) foreach ( qw/
backup_date
backupnum
@@
-55,10
+56,14
@@
sub indexer {
type
/ );
type
/ );
+ # non-tokenized strings
$schema->spec_field( name => $_, type => $string_type ) foreach ( qw/
$schema->spec_field( name => $_, type => $string_type ) foreach ( qw/
- _uri
_file_path_split
filepath hname sname
+ _uri filepath hname sname
/);
/);
+ # tokenized magic columns for infix search
+ $schema->spec_field( name => '_file_path_split', type => $ft_type );
+
# $schema->spec_field( name => '_doc', type => $blob_type );
my $indexer = KinoSearch::Index::Indexer->new(
# $schema->spec_field( name => '_doc', type => $blob_type );
my $indexer = KinoSearch::Index::Indexer->new(