
marvin at rectangular
Sep 7, 2008, 4:35 PM
Post #2 of 2
(3267 views)
Permalink
|
On Sep 7, 2008, at 3:49 PM, Dan wrote: > what's the best way to see what a query is getting analyzed to.. Use $query->to_string(). > Seems like I used to be able to call Dumper on a $query object and it > would show the terms/values and how it was analyzed. Yes, that's right. In trunk, all KS classes are now implemented as C structs. (There are only about 500 lines of Perl left in the KS module code, all of it in KinoSearch.pm.) For classes that need to be serialized (Query and its subclasses, Doc, etc...) I've gotten them working with Storable using Storable's hooks. Unfortunately, Data::Dumper provides no such hooks. For the future, I've thought about implementing a dump() method on KinoSearch::Obj (the base class for all KinoSearch objects) which defaults to calling to_string(), but might be overridden to provide more detail. Then we could set up Data::Dump::Streamer hooks which call dump() and suggest DDS as an alternative to Data::Dumper. Setting up DDS hooks would be pretty easy. What would be a little more work is setting things up so that we get polished output with proper indenting and all that. Let me know if to_string() doesn't give you enough detail. Marvin Humphrey Rectangular Research http://www.rectangular.com/ _______________________________________________ KinoSearch mailing list KinoSearch [at] rectangular http://www.rectangular.com/mailman/listinfo/kinosearch
|