[KinoSearch] Two things

webmasters at ctosonline.org webmasters at ctosonline.org
Wed May 6 21:59:48 PDT 2009


On May 6, 2009, at 5:17 PM, Marvin Humphrey wrote:

> On Wed, May 06, 2009 at 04:32:15PM -0700, webmasters at ctosonline.org  
> wrote:
>> KinoSearch::Indexer’s man page says that ‘create’ is 0 by default.  
>> 303-
>> highlighter.t does not specify this. Does this option apply only to
>> actual files and not RAMFolders?
>
> The way I think of it is, the RAMFolder already exists, so it's not  
> necessary
> to specify "create => 1" -- just as it's not necessary to specify
> "create => 1" when the index directory already exists on the file  
> system.
>
>> I believe there is something wrong with the binding of
>> Compiler_Highlight_Spans. In Perl it always returns an empty  
>> unblessed
>> array ref.
>
> A quick look didn't reveal anything obviously wrong with the binding  
> code, and
> that's the behavior we should expect if there's nothing to highlight.

(Except that it is documented as returning a list, rather than an  
array ref. :-)
>
> Is it possible that the field was not marked as "highlightable"?   
> Highlighting
> is no longer enabled by default -- it has to be turned on for each  
> field.
>
>    my $schema = KinoSearch::Schema->new;
>    my $type   = KinoSearch::FieldType::FullTextType->new(
>        analyzer      => $analyzer,
>        highlightable => 1,
>    );
>    $schema->spec_field( name => 'title',   type => $type );
>    $schema->spec_field( name => 'content', type => $type );
>
> If that's not it, what's the context?

I’ve reduced it as much as I can and attached it. (I know, I’ve  
probably done something stupid and it will be obvious to you.) If you  
don’t have DDS (Data::Dump::Streamer), just change that line to ‘use  
Data::Dumper; print Dumper’ (or install DDS; I highly recommend it).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2
Type: application/octet-stream
Size: 1176 bytes
Desc: not available
Url : http://rectangular.com/pipermail/kinosearch/attachments/20090506/e536520a/attachment.obj 


More information about the kinosearch mailing list