Opened 15 years ago

Closed 4 years ago

#4424 closed enhancement (fixed)

Indexes missing in alpha image

Reported by: humdinger Owned by: bonefish
Priority: normal Milestone: R1/beta2
Component: Build System Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by humdinger)

This is hrev32931.

There are no extra attributes indexed. I think audio attributes and people and e-mail attributes should be indexed by default.

Change History (20)

comment:1 by jonas.kirilla, 15 years ago

You're right about the indexes, but the "AUDIO:" attributes are part of the audio super type. There's no reason to add them to the audio subtypes.

in reply to:  1 comment:2 by humdinger, 15 years ago

Replying to jonas.kirilla:

...but the "AUDIO:" attributes are part of the audio super type. There's no reason to add them to the audio subtypes.

Oh, I missed that. Very good.

comment:3 by humdinger, 15 years ago

Description: modified (diff)
Summary: Attributes and indexes missing in alpha imageIndexes missing in alpha image
Type: bugenhancement

I changed title and wording. It's really only the missing indexes. I guess this should have been fixed for alpha1, but it may be too late now.

comment:4 by bonefish, 15 years ago

A complete list of the indexes in question with their respective type might considerably lower the motivation threshold for attacking this ticket. :-)

comment:5 by humdinger, 15 years ago

Version: R1/pre-alpha1R1/Development

OK. After building the image to the partition, this is the output of lsindex:

BEOS:APP_SIG[[BR]] BEOS:LOCALE_LANGUAGE[[BR]] BEOS:LOCALE_SIGNATURE[[BR]] _trk/qrylastchange
_trk/recentQuery
be:deskbar_item_status[[BR]] last_modified
name
size

These indexes are IMO desirable:

AUDIO:Album[[BR]] AUDIO:Artist[[BR]] AUDIO:Genre[[BR]] AUDIO:Rating[[BR]] AUDIO:Title[[BR]] AUDIO:Year[[BR]] BEOS:APP_SIG[[BR]] BEOS:LOCALE_LANGUAGE[[BR]] BEOS:LOCALE_SIGNATURE[[BR]] MAIL:account[[BR]] MAIL:cc[[BR]] MAIL:chain[[BR]] MAIL:draft[[BR]] MAIL:flags[[BR]] MAIL:from[[BR]] MAIL:name[[BR]] MAIL:pending_chain[[BR]] MAIL:priority[[BR]] MAIL:reply[[BR]] MAIL:status[[BR]] MAIL:subject[[BR]] MAIL:thread[[BR]] MAIL:to[[BR]] MAIL:when[[BR]] META:address[[BR]] META:city[[BR]] META:company[[BR]] META:country[[BR]] META:email[[BR]] META:fax[[BR]] META:group[[BR]] META:hphone[[BR]] META:name[[BR]] META:nickname[[BR]] META:state[[BR]] META:url[[BR]] META:wphone[[BR]] META:zip[[BR]] _signature
_status
_trk/qrylastchange
_trk/recentQuery
be:deskbar_item_status[[BR]] last_modified
name
size

Note, that the META indexes are automatically created when first launching People, but that may be too late, for example, if you copied over some person files before starting People.
The same goes for the MAIL and _status and _signature indexes which are created when starting the mail_daemon or Mail respectively.

I'd also like to point to Axel's thread on Defining new standard attributes.

[Trac's preview is messing up the linebreaks... hope the final submit works out.]

comment:6 by humdinger, 15 years ago

Maybe I should've used preformatted text... One more try:

OK. After building the image to the partition,
this is the output of lsindex:

BEOS:APP_SIG
BEOS:LOCALE_LANGUAGE
BEOS:LOCALE_SIGNATURE
_trk/qrylastchange
_trk/recentQuery
be:deskbar_item_status
last_modified
name
size


These indexes are IMO desirable:

AUDIO:Album
AUDIO:Artist
AUDIO:Genre
AUDIO:Rating
AUDIO:Title
AUDIO:Year
BEOS:APP_SIG
BEOS:LOCALE_LANGUAGE
BEOS:LOCALE_SIGNATURE
MAIL:account
MAIL:cc
MAIL:chain
MAIL:draft
MAIL:flags
MAIL:from
MAIL:name
MAIL:pending_chain
MAIL:priority
MAIL:reply
MAIL:status
MAIL:subject
MAIL:thread
MAIL:to
MAIL:when
META:address
META:city
META:company
META:country
META:email
META:fax
META:group
META:hphone
META:name
META:nickname
META:state
META:url
META:wphone
META:zip
_signature
_status
_trk/qrylastchange
_trk/recentQuery
be:deskbar_item_status
last_modified
name
size

comment:7 by mmadia, 15 years ago

would this need to be implemented in data/system/boot/InstallerFinishScript or build/scripts/build_haiku_image ?

in reply to:  7 comment:8 by bonefish, 15 years ago

Replying to mmadia:

would this need to be implemented in data/system/boot/InstallerFinishScript or build/scripts/build_haiku_image ?

I guess in the latter. Not sure, if there's much point in also creating them in build_haiku_image. On images they are probably superfluous. People building directly to disk may want them, but they probably don't store much data on that partition anyway -- at least not, if they update frequently.

comment:9 by leavengood, 14 years ago

So the solution here is to add a bunch of calls to mkindex for the installed volume to the InstallerFinishScript?

Something like:

mkindex -d "$volume" -t string AUDIO:Album
mkindex -d "$volume" -t string AUDIO:Artist
mkindex -d "$volume" -t string AUDIO:Genre
mkindex -d "$volume" -t int AUDIO:Rating
...and many more...

humdinger, I think this is right up your alley! Or Matt, who is quite the shell guru.

Though I wonder how much overhead these indexes cause. I suppose they only affect files with the given attributes.

comment:10 by axeld, 14 years ago

The MAIL:* attributes are automatically installed when the mail daemon is started. But since we're talking about an installation here, I think the InstallerFinishScript is actually too late, as there could already have been files copied that aren't found then when this is not a CD install.

And yes, the overhead of additional indexes should be negligible as long as a file doesn't use them.

in reply to:  6 ; comment:11 by mmadia, 14 years ago

Replying to humdinger:

Maybe I should've used preformatted text... One more try:

OK. After building the image to the partition,
this is the output of lsindex:

BEOS:APP_SIG
BEOS:LOCALE_LANGUAGE
BEOS:LOCALE_SIGNATURE
_trk/qrylastchange
_trk/recentQuery
be:deskbar_item_status
last_modified
name
size


These indexes are IMO desirable:

AUDIO:Album
AUDIO:Artist
AUDIO:Genre
AUDIO:Rating
AUDIO:Title
AUDIO:Year
BEOS:APP_SIG
BEOS:LOCALE_LANGUAGE
BEOS:LOCALE_SIGNATURE
MAIL:account
MAIL:cc
MAIL:chain
MAIL:draft
MAIL:flags
MAIL:from
MAIL:name
MAIL:pending_chain
MAIL:priority
MAIL:reply
MAIL:status
MAIL:subject
MAIL:thread
MAIL:to
MAIL:when
META:address
META:city
META:company
META:country
META:email
META:fax
META:group
META:hphone
META:name
META:nickname
META:state
META:url
META:wphone
META:zip
_signature
_status
_trk/qrylastchange
_trk/recentQuery
be:deskbar_item_status
last_modified
name
size

If someone would divide this list of attributes by type, String, Int, etc ... I'd be willing to take ownership. To start with, I'd implement this in build/scripts/build_haiku_image. IIRC, Installer now copies the indexes from the source to destination partition.

in reply to:  11 comment:12 by humdinger, 14 years ago

Replying to mmadia:

If someone would divide this list of attributes by type, String, Int, etc ... I'd be willing to take ownership. To start with, I'd implement this in build/scripts/build_haiku_image. IIRC, Installer now copies the indexes from the source to destination partition.

Cool! It's an easy list, it's either string or int32:

  • String:
    Audio:Album
    Audio:Artist
    Media:Genre
    Media:Title
    MAIL:account
    MAIL:cc
    MAIL:chain
    MAIL:draft
    MAIL:flags
    MAIL:from
    MAIL:name
    MAIL:pending_chain
    MAIL:priority
    MAIL:reply
    MAIL:status
    MAIL:subject
    MAIL:thread
    MAIL:to
    META:address
    META:city
    META:company
    META:country
    META:email
    META:fax
    META:group
    META:hphone
    META:name
    META:nickname
    META:state
    META:url
    META:wphone
    META:zip
    
  • Int32:
    Media:Rating
    Media:Year
    MAIL:account_id
    MAIL:read
    MAIL:when
    

If those index names are case insensitive, as I suspect, the naming could be normalized. Personally, I'd go with "ALLCAPS:nocaps", because it looks unusual. People can then name their custom indices in a saner way, thereby distinguishing them more easily from the default indices.

comment:13 by korli, 6 years ago

Hey humdinger, could you check this on beta1 images?

comment:14 by humdinger, 6 years ago

The output of lsindex on a fresh Beta1 install:

BEOS:APP_SIG
BEOS:LOCALE_LANGUAGE
BEOS:LOCALE_SIGNATURE
MAIL:account
MAIL:account_id
MAIL:cc
MAIL:draft
MAIL:flags
MAIL:from
MAIL:name
MAIL:priority
MAIL:read
MAIL:reply
MAIL:status
MAIL:subject
MAIL:thread
MAIL:to
MAIL:when
_trk/qrylastchange
_trk/recentQuery
be:deskbar_item_status
last_modified
name
size

comment:15 by pulkomandy, 5 years ago

Milestone: R1R1/beta2

Nice to have for beta2 if someone can look into it, I guess?

comment:17 by waddlesplash, 5 years ago

Milestone: R1/beta2R1

I'm still not sure that is the right way to go about it, as I commented. But, it works for now, so I merged that into the beta branch at least.

comment:18 by axeld, 5 years ago

BTW the mail_daemon will create the indices as needed automatically. Why create them upfront?

comment:19 by pulkomandy, 5 years ago

That's fine for the mail specific ones, but nothing creates the media and people ones.

comment:20 by pulkomandy, 4 years ago

Milestone: R1R1/beta2
Resolution: fixed
Status: newclosed

Done in hrev54437 (the commit had already been merged in beta2 but not in master)

Note: See TracTickets for help on using tickets.