You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucy.apache.org by Arjan Widlak - United Knowledge <ar...@unitedknowledge.nl> on 2017/05/20 09:48:31 UTC
[lucy-user] trailing double quote
Dear all,
It seems that if a double quote is the last character of a query,
followed by nothing or nothing other than space characters, an error is
thrown:
StrIter_crop: top is behind tail
cfish_StrIter_crop at cfcore/Clownfish/String.c line 704
As can be seen in code like this:
my $query_parser = Lucy::Search::QueryParser->new(
schema => $env->get_schema,
fields => [ 'normalized' ],
);
my $user_query = 'aap noot mies" ';
$user_query = $query_parser->parse(
$user_query
);
The single occurence of a double quote anywhere else in a string is no
problem, nor is the single occurence of a single quote anywhere in the
string. Also if it's at the end.
Is this a bug in Apache::Lucy? (Lucy-v0.6.1 latest version on cpan)
Kind regards,
Arjan.
On 05/16/2017 07:53 PM, Serkan Mulayim wrote:
> Thank you very much Nick, I tried your suggestion and it worked. And this
> is a much simpler way of getting the LexiconReader. I suppose it does the
> lexicon run over all segments in the index, right?
>
> On Tue, May 16, 2017 at 7:56 AM, Nick Wellnhofer <we...@aevum.de>
> wrote:
>
>> On 15/05/2017 23:13, Serkan Mulayim wrote:
>>
>>> I tried to make the library work for Lexicons, but I am receiving a
>>> Segfault. I believe I am not able to initialize the LexiconReader
>>> correctly.
>>>
>> You can get the LexiconReader for an index with IndexReader's Obtain
>> method:
>>
>> http://lucy.apache.org/docs/c/Lucy/Index/IndexReader.html#func_Obtain
>>
>> Example code:
>>
>> LexiconReader *lex_reader = (LexiconReader*)IxReader_Obtain(
>> index_reader, Class_Get_Name(LEXICONREADER));
>>
>> Nick
>>
Re: [lucy-user] trailing double quote
Posted by Nick Wellnhofer <we...@aevum.de>.
On 20/05/2017 11:48, Arjan Widlak - United Knowledge wrote:
> It seems that if a double quote is the last character of a query, followed by
> nothing or nothing other than space characters, an error is thrown:
> Is this a bug in Apache::Lucy? (Lucy-v0.6.1 latest version on cpan)
Yes, this is a bug. It should be fixed in the next release:
https://issues.apache.org/jira/browse/LUCY-325
Nick