Skip Menu |

This queue is for tickets about the Search-Query-Dialect-Lucy CPAN distribution.

Report information
The Basics
Id: 93287
Status: resolved
Priority: 0/
Queue: Search-Query-Dialect-Lucy

People
Owner: karman [...] cpan.org
Requestors: CRZEDPSYC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Specifying default_field (from Dezi conf) as an arrayref is not properly handled
When I specify qp_config => {default_field => [qw(one two)]} in Dezi's config, Dialect::Lucy stringifies that arrayref rather than dereferencing it. One way to fix this is checking ref($clause->{field}) in stringify_clause, but I am not at all sure if that is the right place. ::init looks like it should be able to handle default_field correctly, but that is not where the default_field in qp_config ends up.
Thanks for the bug report. I was actually bitten by this recently as well. I found a workaround, by defining the default_field on the query_class rather than the query parser. E.g.: query_class_opts => { default_field => [qw( one two )], } Still, it's a bug in Search::Query, and I have committed a failing test to illustrate: https://github.com/karpet/search-query-perl/commit/21a015a492b09dd59cd6cde65f28de32b042366d
should be fixed in 0.24 just uploaded to CPAN.