4 |
use strict; |
use strict; |
5 |
use warnings; |
use warnings; |
6 |
|
|
7 |
our $VERSION = '0.07_1'; |
our $VERSION = '0.07_2'; |
8 |
|
|
9 |
=head1 NAME |
=head1 NAME |
10 |
|
|
120 |
|
|
121 |
=head1 Search::Estraier::Document |
=head1 Search::Estraier::Document |
122 |
|
|
123 |
This class implements Document which is collection of attributes |
This class implements Document which is single item in Hyper Estraier. |
|
(key=value), vectors (also key value) display text and hidden text. |
|
124 |
|
|
125 |
|
It's is collection of: |
126 |
|
|
127 |
|
=over 4 |
128 |
|
|
129 |
|
=item attributes |
130 |
|
|
131 |
|
C<< 'key' => 'value' >> pairs which can later be used for filtering of results |
132 |
|
|
133 |
|
You can add common filters to C<attrindex> in estmaster's C<_conf> |
134 |
|
file for better performance. See C<attrindex> in |
135 |
|
L<Hyper Estraier P2P Guide|http://hyperestraier.sourceforge.net/nguide-en.html>. |
136 |
|
|
137 |
|
=item vectors |
138 |
|
|
139 |
|
also C<< 'key' => 'value' >> pairs |
140 |
|
|
141 |
|
=item display text |
142 |
|
|
143 |
|
Text which will be used to create searchable corpus of your index and |
144 |
|
included in snippet output. |
145 |
|
|
146 |
|
=item hidden text |
147 |
|
|
148 |
|
Text which will be searchable, but will not be included in snippet. |
149 |
|
|
150 |
|
=back |
151 |
|
|
152 |
=head2 new |
=head2 new |
153 |
|
|
1768 |
return $self->{inform}->{links}; |
return $self->{inform}->{links}; |
1769 |
} |
} |
1770 |
|
|
1771 |
|
=head2 cacheusage |
1772 |
|
|
1773 |
|
Return cache usage for a node |
1774 |
|
|
1775 |
|
my $cache = $node->cacheusage; |
1776 |
|
|
1777 |
|
=cut |
1778 |
|
|
1779 |
|
sub cacheusage { |
1780 |
|
my $self = shift; |
1781 |
|
|
1782 |
|
return unless ($self->{url}); |
1783 |
|
|
1784 |
|
my $resbody; |
1785 |
|
my $rv = $self->shuttle_url( $self->{url} . '/cacheusage', |
1786 |
|
'text/plain', |
1787 |
|
undef, |
1788 |
|
\$resbody, |
1789 |
|
); |
1790 |
|
|
1791 |
|
return if ($rv != 200 || !$resbody); |
1792 |
|
|
1793 |
|
return $resbody; |
1794 |
|
} |
1795 |
|
|
1796 |
=head2 master |
=head2 master |
1797 |
|
|
1798 |
Set actions on Hyper Estraier node master (C<estmaster> process) |
Set actions on Hyper Estraier node master (C<estmaster> process) |
2012 |
|
|
2013 |
Hyper Estraier Ruby interface on which this module is based. |
Hyper Estraier Ruby interface on which this module is based. |
2014 |
|
|
2015 |
|
Hyper Estraier now also has pure-perl binding included in distribution. It's |
2016 |
|
a faster way to access databases directly if you are not running |
2017 |
|
C<estmaster> P2P server. |
2018 |
|
|
2019 |
=head1 AUTHOR |
=head1 AUTHOR |
2020 |
|
|
2021 |
Dobrica Pavlinusic, E<lt>dpavlin@rot13.orgE<gt> |
Dobrica Pavlinusic, E<lt>dpavlin@rot13.orgE<gt> |