On 08/29/2013 05:15 AM, Peter Karman wrote:
> On 8/28/13 11:32 PM, Philip Southam wrote:
> 
>>
>> I tried looking at the highlighter source thinking that has to implement
>> similar logic, but my knowledge of C is next to nil and I didn't see any
>> thing like that in the Perl bindings that I could use.
>>
>>
> 
> it is not native to the library, but I have one similar implementation
> here as an example:
> 
> https://metacpan.org/module/SWISH::Prog::Lucy::Results#find_relevant_fields-1-0
> 
> 
> see http://markmail.org/message/xoqwxofwphlowqxf
> 

Thanks Peter. I've gotten as far as getting a value out of
LUCY_Compiler_Highlight_Spans. Now the part I'm struggling with is
unmarshalling the data out of the returned spans cfish_VArray* object.
In lines 141-148 of this gist[1] I've done my best to port the perl
example referenced in the markmail link. It compiles and runs, but
instead of printing (line 148) what I would expect to be a matching
term, I get something like:

        Lucy::Search::Span@0x00000000026fec90

indicating I'm not interacting with the spans object returned on line
143 properly. Anyone have any suggestions?


[1]: https://gist.github.com/philipsoutham/6386741

-- 
Philip Southam
Chief Architect / Яeverse Эngineer
http://zefr.com

Reply via email to