Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: kinosearch: discuss

With heed_colons=1, search term 'url:foo.bar' causes crash

 

 

kinosearch discuss RSS feed   Index | Next | Previous | View Threaded


henka at cityweb

Jun 6, 2007, 9:08 AM

Post #1 of 3 (651 views)
Permalink
With heed_colons=1, search term 'url:foo.bar' causes crash

Hello Marvin,


Changing the default field search behavior to ON (ie, heed_colons => 1),
and searching the USCons/sample for 'url:foo.bar' causes a crash:

Can't call method "get_doc_freq" on an undefined value at
/usr/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/KinoSearch/Search/PhraseQuery.pm
line 151.

It seems to happen with most [[:punct:]] chars (ie, url:foo;bar
url:foo,bar url:foo:bar url:foo-bar etc all fail).

Non- punctuation delimited strings are OK (eg, url:amendment).

Regards
Henry


marvin at rectangular

Jun 6, 2007, 12:43 PM

Post #2 of 3 (604 views)
Permalink
With heed_colons=1, search term 'url:foo.bar' causes crash [In reply to]

On Jun 6, 2007, at 9:08 AM, Henka wrote:

> Changing the default field search behavior to ON (ie, heed_colons
> => 1),
> and searching the USCons/sample for 'url:foo.bar' causes a crash:
>
> Can't call method "get_doc_freq" on an undefined value at
> /usr/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/KinoSearch/
> Search/PhraseQuery.pm
> line 151.
>
> It seems to happen with most [[:punct:]] chars (ie, url:foo;bar
> url:foo,bar url:foo:bar url:foo-bar etc all fail).
>
> Non- punctuation delimited strings are OK (eg, url:amendment).

Thank you for the report. This should be fixed as of repository
revision 2462.

For those that hadn't seen the change going past, the
'field:term_text' syntax is now off by default. Also,
KinoSearch::QueryParser::QueryParser has moved to
KinoSearch::QueryParser. The old class structure was parallel to
Lucene, but we veered off that path a looooong time ago.

By the way, Henry, this happens to behave correctly...

my $qparser = KinoSearch::QueryParser->new(
heed_colons => 1,
schema => MySchema->new,
);

... but the official documentation says you must do this:

my $qparser = KinoSearch::QueryParser->new(
schema => MySchema->new,
);
$qparser->set_heed_colons(1);

I'm trying to avoid piling everything into a single constructor
method. Also, if the class ever gets ported to C (admittedly
unlikely for QueryParser, but has happened with a lot of other
classes), those extra params will start triggering exceptions.

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/


henka at cityweb

Jun 6, 2007, 1:03 PM

Post #3 of 3 (604 views)
Permalink
With heed_colons=1, search term 'url:foo.bar' causes crash [In reply to]

>
> Thank you for the report. This should be fixed as of repository
> revision 2462.

Great work, Marvin. Thank you very much for the fast fix! Revision 2462
works great.

Regards
Henry

kinosearch discuss RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.