Hallo,
I am testing the new version 0.40 of Lucy and found that all fields with an
undersore or number in the name can not be searched on with the queryparser:
if in version 0.33 I did:
my $query_parser = Lucy::Search::QueryParser->new(
schema => $searcher->get_schema,
fields => ['body'],
);
$query_parser->set_heed_colons(1);
my $query = $query_parser->parse( 'object_name:test' );
and the schema wascreated like:
# Create a Schema to defines index fields.
my $schema = Lucy::Plan::Schema->new();
my $normalizer = Lucy::Analysis::Normalizer->new ( strip_accents => 1 );
my $tokenizer = Lucy::Analysis::RegexTokenizer->new( pattern =>
q|\w+(?:[\x{2019}&']\w+)*|);
# caseinsensitive string
my $quickpoly = Lucy::Plan::FullTextType->new(
analyzer => Lucy::Analysis::PolyAnalyzer->new( analyzers => [
$normalizer, $tokenizer] )
);$schema->spec_field( name => 'body', type => $quickpoly );
$schema->spec_field( name => 'object_name', type => $quickpoly );
I get results if the field object_name contains 'test'
In version 0.40 this does not work anymore no hits are returned. Only if I
change 'object_name' to 'objectname' it will.
Is this a bug ?
--
Thomas den Braber