Hi Nick.

Thanks again.

I will try the example you gave but it does appear no have a lot more
boiler plate than the original example and I just want to make sure that is
really needed (the least code I have to add for this, the better, as I will
do a complete rewrite yo use the latest Lucy anyway). Here was the original
sample code that worked for me:

    typedef struct MyAnalyzer MyAnalyzer;

    // Transform() is the central Analyzer method.  Check out the
    // documentation in Analyzer.cfh and various implementations; that
    // should give you enough to cargo cult your own version.
    static Inversion*
    S_MyAnalyzer_Transform_IMP(MyAnalyzer *self, Inversion *inversion) {
        return (Inversion*)INCREF(inversion);

    // Create a subclass at runtime.
    static Class*
    S_class_var(void) {
        StackString *class_name = SSTR_WRAP_UTF8("MyAnalyzer", 10);
        Class *klass = Class_fetch_class((String*)class_name);
        if (!klass) {
            klass = Class_singleton((String*)class_name, ANALYZER);
        return klass;

    // Constructor.
    MyAnalyzer_new(void) {
        Class *klass = S_class_var();
        return (MyAnalyzer*)Class_Make_Obj(klass);

My main worry with your new example is that there is a considerable amount
of code being written in main and this will all go inside a library.
Because for now I am basically cargo-culting my way around this, I am not
sure what would be the best point to do that initialization. Would doing it
in _new work anyway?

Thanks again.
On Sun, Mar 5, 2017 at 3:32 PM Nick Wellnhofer <[EMAIL PROTECTED]> wrote:
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB