[
https://issues.apache.org/jira/browse/LUCY-209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13188249#comment-13188249
]
Marvin Humphrey commented on LUCY-209:
--------------------------------------
Hi, Mark...
The problem arises from this line in the test case:
{noformat}
my $query_parser = Lucy::Search::QueryParser->new(
schema => $searcher->get_schema,
analyzer => $polyanalyzer, # <-------------- DO NOT WANT
);
{noformat}
Here's the documentation for the "analyzer" parameter to QueryParser#new
which explains the behavior you're seeing:
{quote}
analyzer - An Analyzer. Ordinarily, the analyzers specified by each field's
definition will be used, but if analyzer is supplied, it will override and be
used for all fields. This can lead to mismatches between what is in the index
and what is being searched for, so use caution.
{quote}
If you remove the "analyzer" parameter, all tests pass.
> Lucy::Search::QueryParser set_heed_colons doesn't work as expected with
> Lucy::Plan::StringType
> ----------------------------------------------------------------------------------------------
>
> Key: LUCY-209
> URL: https://issues.apache.org/jira/browse/LUCY-209
> Project: Lucy
> Issue Type: Bug
> Reporter: mark ellis
> Attachments: lucy.pl
>
>
> basically, if you have a StringType field and wish to use set_heed_colons on
> it, it doesn't work as expected as the input into the QueryParser is stemming
> it.
> e.g. search "type:cats" will stem to "type:cat" and either find no results,
> or find a different type than the one requested.
> I have a test case I have written for this, as soon as I remember how to use
> JIRA i'll upload it...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira