[haiku] Re: Need Some GSoC Advice

  • From: Truls Becken <truls.becken@xxxxxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Tue, 24 Mar 2009 12:16:31 +0100

François Revol wrote:

> Well extracting the data will have to be done in userland.
>
> Another option for the storage would be extended semantics on
> attributes.
>
> Some flag like B_APPEND_TO_INDEX
>
> Indexing a file containing "Haiku rox windows sux" would issue
>
> fs_write_attribute_etc("BEOS:CONTENT", "haiku", B_APPEND_TO_INDEX);
> fs_write_attribute_etc("BEOS:CONTENT", "rox", B_APPEND_TO_INDEX);
> fs_write_attribute_etc("BEOS:CONTENT", "windows", B_APPEND_TO_INDEX);
> fs_write_attribute_etc("BEOS:CONTENT", "sux", B_APPEND_TO_INDEX);
>
> Of course this would require many ops but would work.
> Would also need some way to clean up all the values for this file
> before reindexing.

That's interesting because this looks like a very simple extension.

Question: Does an index with loads and loads of data in it slow down
other indexes in any way? I would hope not.

Clearing the index would happen by not using the append flag on the
first value when reindexing, right?

I guess only one of the values would show in Tracker, though, which
means it will probably not work so well for other multi-value examples
that have been brought up before, like setting multiple labels on a
file. Those might require the type to be something like vector of
strings, which is a much more complex extension.

-Truls

Other related posts: