91 |
Data => { "path" => { |
Data => { "path" => { |
92 |
"t" => "title of document", |
"t" => "title of document", |
93 |
"f" => 99, |
"f" => 99, |
94 |
|
}, |
95 |
}, |
}, |
96 |
Insert => 1, |
Insert => 1, |
97 |
Append => 1, |
Append => 1, |
313 |
my $path = shift || confess "to_jsfind need path to your index!"; |
my $path = shift || confess "to_jsfind need path to your index!"; |
314 |
|
|
315 |
$path .= "/" if ($path =~ /\/$/); |
$path .= "/" if ($path =~ /\/$/); |
316 |
carp "can't create index in '$path': $!" if (! -w $path); |
carp "create directory for index '$path': $!" if (! -w $path); |
317 |
|
|
318 |
return $self->root->to_jsfind($path,"0"); |
return $self->root->to_jsfind($path,"0"); |
319 |
} |
} |
695 |
|
|
696 |
Create jsFind xml files |
Create jsFind xml files |
697 |
|
|
698 |
my $nr=$tree->to_dot('/path/to/index','0'); |
my $nr=$tree->to_jsfind('/path/to/index','0'); |
699 |
|
|
700 |
Returns number of elements created |
Returns number of elements created |
701 |
|
|
707 |
|
|
708 |
return 0 if $self->is_empty; |
return 0 if $self->is_empty; |
709 |
|
|
710 |
|
confess("path is undefined.") unless ($path); |
711 |
|
confess("file is undefined. Did you call \$t->root->to_jsfind(..) instead of \$t->to_jsfind(..) ?") unless (defined($file)); |
712 |
|
|
713 |
my $nr_keys = 0; |
my $nr_keys = 0; |
714 |
|
|
715 |
my ($k, $d, $s) = @$self; |
my ($k, $d, $s) = @$self; |