Skip Menu |

This queue is for tickets about the Search-QueryParser CPAN distribution.

Report information
The Basics
Id: 129981
Status: new
Priority: 0/
Queue: Search-QueryParser

People
Owner: Nobody in particular
Requestors: rt.cpan.org [...] chyc.co.uk
Cc:
AdminCc:

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



Subject: Unable to put field into parentheses when default defField is given at instantiation
Date: Thu, 04 Jul 2019 11:27:32 +0100
To: bug-Search-QueryParser [...] rt.cpan.org
From: "Christopher Causer" <rt.cpan.org [...] chyc.co.uk>
Hi there! Hopefully the subject says it all. The steps to reproduce are as follows: Search::QueryParser->new(defField => "hostname")->parse("(domain:example.org OR domain:example.com)") Gives err "[(domain:example.org OR domain:example.com)] : [domain:example.org OR domain:example.com)] : field 'domain' inside 'hostname'" The following gives an answer, but I would like to be able to define a default defField at instantiation. Search::QueryParser->new()->parse("(domain:example.org OR domain:example.com)") Looking at the source code, it looks to be line 383 of Search::QueryParser.pm $err = "field '$1' inside '$parentField'", last LOOP if $parentField; Is there a way to check if the $parentField is the same as $self->{defField}, and continuing if so? Many thanks for the module! Christopher