This blog entry will try to explain a few technical details about the Query system in combination with the new "People" files.
To begin, take a look at this screenshots:
The following section will explain what happend behind the scene when the user copied this already existing BeOS people files to SkyOS:
1. User drags people files from a BFS partition to SkyOS.
2. The indexfeeder service (running in the background always) immediately detects this file operation
3. The indexfeeder asks various plugins if anyone knows about these files
4. The "BeOS People file convert" plugin claims that it can handle this file
5. The Indexfeeder now tells the plugin to extract all possible attributes from the file and optionally index its content (attributes go into SkyFS, content into the SQL database)
6. The BeOS People file Convert plugin reads all BeOS people attribute and returns a list with the new SkyOS attributes. (It actually converts on the fly between BeOS people file attributes and SkyOS people file attributes)
7. The indexfeeder attaches this new attributes to the people file.
Note: Step 2 until step 7 just take a few milliseconds and you will not notice this at all
8. User right clicks on desktop and selects Run...
9. The "File Open" dialog appears and user clicks on "People"
10. The "File Open" dialog tells the indexfeeder that it should start a new query
11. The indexfeeder fires a query to SkyFS and also starts a thread which searchs through the SQL database to search inside files
12. Once the indexfeeder found a matching file, the "File Open" dialog asks the CategoryView if it knows about this type
13. By default, the CategoryView has a handler for "application/x-person" and knows how to display such a contact inside the results view
14. The user gets his result presented as a contact view
Of course you can just search for the name of a contact and it will display the result too:
As you can see, the Indexfeeder is not only able to completely index your files (by attributes and content), but can also be used as "on-the-fly file converter".