
marvin at rectangular
Sep 5, 2007, 11:47 AM
Post #1 of 4
(877 views)
Permalink
|
|
KinoSearch::FieldSpec::text
|
|
Greets, I'm contemplating some mods to FieldSpec and Schema. * Rename KinoSearch::Schema::FieldSpec to KinoSearch::FieldSpec::text. * Within the %fields hash, make 'text' an alias for 'KinoSearch::FieldSpec::text'. * Reserve all-lower-case FieldSpec class names for future use. The most immediated effect of this would be to cut down on typing: # before our %fields = ( foo => 'KinoSearch::Schema::FieldSpec', bar => 'KinoSearch::Schema::FieldSpec', ); # after our %fields = ( foo => 'text', bar => 'text', ); There are two other reasons. First, I intend to write a generic spec for the invindex file format, and the word "KinoSearch" shouldn't appear in it. Second, it reserves space for the addition of 'float', 'blob', 'keyword', and so on. our %fields = ( foo => 'text', bar => 'blob', # alias for KinoSearch::FieldSpec::blob baz => 'text::unstored', # alias for KinoSearch::FieldSpec::text::unstored ); If KinoSearch::Schema::FieldSpec sticks around for now as a subclass/ alias of KinoSearch::FieldSpec::text, then this change doesn't have to be immediately disruptive. Thoughts? Marvin Humphrey Rectangular Research http://www.rectangular.com/ _______________________________________________ KinoSearch mailing list KinoSearch [at] rectangular http://www.rectangular.com/mailman/listinfo/kinosearch
|