On Tue, Mar 09, 2004 at 03:06:16PM -0800, JFH wrote:
> Question: I'm looking for a way to get an enumeration of any
> non-standard PropertyNames stored in an index.
Actually, this has come up a few times before. I actually spent some
time trying to implement the feature but ran into a a few complications.
It shouldn't be that hard -- dump.c can display them, after all.
I'm guess you are trying to write something to detect what fields are in
the index and provide a general interface to any index.
I've always found that I needed to know more than just the name -- I
needed to know their type (which is in the index) but also what they
mean in a human context. If there's a property name "foo" how do you
display it without knowing if it's a long description or a date or a
number or a URL or whatever?
> I've been mucking about by following the example of dump_metanames() in
> dump.c but I don't think that's the right way to go about this.
Well that will give you an idea how to get the names listed. The harder
part is deciding on the API -- should you pass in an index name and get
a list of property names as strings back? And how about the meta data
associated with a metaname or propertyname? In Perl it might be nice to
get an array of objects with methods to fetch the name, id, type and
other meta data. Or perhaps a hash or hashes.
Received on Tue Mar 9 19:13:21 2004