KinoSearch::Search::Searchable - base class for searching an invindex


sub search { shift->abstract_death }

sub explain { shift->todo_death }

sub max_doc { shift->abstract_death }

sub fetch_doc { shift->abstract_death }

sub doc_freq { shift->abstract_death }

sub set_similarity { if ( @_ == 3 ) { my ( $self, $field_name, $sim ) = @_; $self->{field_sims}{$field_name} = $sim; } else { $_[0]->{similarity} = $_[1]; } }

sub get_similarity { my ( $self, $field_name ) = @_; if ( defined $field_name and exists $self->{field_sims}{$field_name} ) { return $self->{field_sims}{$field_name}; } else { return $self->{similarity}; } }

# not sure these are needed (call $query->create_weight($searcher) instead) sub create_weight { shift->unimplemented_death } sub rewrite_query { shift->unimplemented_death }

sub doc_freqs { my ( $self, $terms ) = @_; my @doc_freqs = map { $self->doc_freq($_) } @$terms; return \@doc_freqs; }

sub close { }

1;

__END__

Back to Top

 KinoSearch::Search::Searchable - base class for searching an invindex