Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.171
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
perl5 /
Plucene /
Search /
[ HOME SHELL ]
Name
Size
Permission
Action
PhraseScorer
[ DIR ]
drwxr-xr-x
BooleanClause.pm
385
B
-rw-r--r--
BooleanQuery.pm
4.24
KB
-rw-r--r--
BooleanScorer.pm
3.93
KB
-rw-r--r--
DateFilter.pm
2.08
KB
-rw-r--r--
Filter.pm
1.13
KB
-rw-r--r--
HitCollector.pm
1.19
KB
-rw-r--r--
Hits.pm
2.39
KB
-rw-r--r--
IndexSearcher.pm
3.35
KB
-rw-r--r--
PhrasePositions.pm
1.37
KB
-rw-r--r--
PhraseQuery.pm
3.21
KB
-rw-r--r--
PhraseScorer.pm
2
KB
-rw-r--r--
PrefixQuery.pm
1.81
KB
-rw-r--r--
Query.pm
2.12
KB
-rw-r--r--
Scorer.pm
663
B
-rw-r--r--
Searcher.pm
1.94
KB
-rw-r--r--
Similarity.pm
1.06
KB
-rw-r--r--
TermQuery.pm
2.46
KB
-rw-r--r--
TermScorer.pm
1.67
KB
-rw-r--r--
TopDocs.pm
701
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : Hits.pm
package Plucene::Search::Hits; =head1 NAME Plucene::Search::Hits - A list of ranked documents =head1 SYNOPSIS my $hits = Plucene::Search::Hits->new; my $doc = $hits->doc($n); my $score = $hits->score($n); my $hit_doc = $hits->hit_doc($n); =head1 DESCRIPTION This is a list of ranked documents, used to hold search results. =head1 METHODS =cut use strict; use warnings; use Carp qw/croak/; use Plucene::Search::TopDocs; use base 'Class::Accessor::Fast'; __PACKAGE__->mk_accessors( qw/ query searcher filter length hit_docs first last num_docs max_docs / ); =head2 new my $hits = Plucene::Search::Hits->new; =head2 query / searcher / filter / length / hit_docs / first / last / num_docs / max_docs Get / set these attributes. =cut sub new { my $self = shift->SUPER::new(@_); $self->num_docs(0); $self->max_docs(200); $self->hit_docs([]); $self->_get_more_hits(50); return $self; } sub _get_more_hits { my ($self, $min) = @_; if (@{ $self->{hit_docs} } > $min) { $min = @{ $self->{hit_docs} }; } my $n = $min * 2; my $top_docs = $self->searcher->search_top($self->query, $self->filter, $n); $self->length($top_docs->total_hits); my @score_docs = $top_docs->score_docs; my $score_norm = 1.0; $score_norm = 1 / $score_docs[0]->{score} if $self->length > 0 and $score_docs[0]->{score} > 1.0; my $end = $#score_docs < $self->length ? $#score_docs : $self->length; for my $score_doc (@score_docs[ @{ $self->{hit_docs} } .. $end ]) { push @{ $self->{hit_docs} }, Plucene::Search::HitDoc->new({ score => $score_doc->{score} * $score_norm, id => $score_doc->{doc}, }); } } =head2 doc my $doc = $hits->doc($n); Returns the nth document. =cut sub doc { my ($self, $n) = @_; my $hit = $self->hit_doc($n); # Not sure we need the LRU for now return $hit->doc || $hit->doc($self->searcher->doc($hit->id)); } =head2 score my $score = $hits->score($n); The score of the nth document. =cut sub score { my ($self, $n) = @_; return $self->hit_doc($n)->score; } =head2 hit_doc my $hit_doc = $hits->hit_doc($n); Returns the nth hit document. =cut sub hit_doc { my ($self, $n) = @_; if ($n >= $self->length) { croak("Not a valid hit number: $n"); } $self->_get_more_hits($n) if $n >= @{ $self->{hit_docs} }; return $self->{hit_docs}[$n]; } package Plucene::Search::HitDoc; use base 'Class::Accessor::Fast'; __PACKAGE__->mk_accessors(qw/score id doc/); 1;
Close