
# Auto-generated file -- DO NOT EDIT!!!!!

=head1 NAME

KinoSearch::Search::LeafQuery - Leaf node in a tree created by QueryParser.

=head1 DEPRECATED

The KinoSearch code base has been assimilated by the Apache L<Lucy> project.
The "KinoSearch" namespace has been deprecated, but development continues
under our new name at our new home: L<http://lucy.apache.org/>

=head1 SYNOPSIS

    package MyQueryParser;
    use base qw( KinoSearch::Search::QueryParser );

    sub expand_leaf {
        my ( $self, $leaf_query ) = @_;
        if ( $leaf_query->get_text =~ /.\*\s*$/ ) {
            return PrefixQuery->new(
                query_string => $leaf_query->get_text,
                field        => $leaf_query->get_field,
            );
        }
        else {
            return $self->SUPER::expand_leaf($leaf_query);
        }
    }



=head1 DESCRIPTION

LeafQuery objects serve as leaf nodes in the tree structure generated by
L<QueryParser|KinoSearch::Search::QueryParser>'s tree() method.
Ultimately, they must be transformed, typically into either
L<TermQuery|KinoSearch::Search::TermQuery> or
L<PhraseQuery|KinoSearch::Search::PhraseQuery> objects, as attempting to
search a LeafQuery causes an error.

=head1 CONSTRUCTORS

=head2 new( I<[labeled params]> )

    my $leaf_query = KinoSearch::Search::LeafQuery->new(
        text  => '"three blind mice"',    # required
        field => 'content',               # default: undef
    );

=over

=item *

B<field> - Optional field name.

=item *

B<text> - Raw query text.

=back





=head1 METHODS

=head2 get_field()

Accessor for object's C<< field >> attribute.

=head2 get_text()

Accessor for object's C<< text >> attribute.



=head1 INHERITANCE

KinoSearch::Search::LeafQuery isa L<KinoSearch::Search::Query> isa L<KinoSearch::Object::Obj>.


=head1 COPYRIGHT AND LICENSE

Copyright 2005-2011 Marvin Humphrey

This program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.

=cut

