Support more ResultType

Bug #655164 reported by Seif Lotfy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zeitgeist Framework
Fix Released
Wishlist
Seif Lotfy

Bug Description

I am in discussion with the Software Center team and it seems like they are growing fond of Zeitgeist.
There is a feature in their queue that they would like to implement and where Zeitgeist can make it happen:
- Software Center wants to suggest applications to be installed based on the Most or Recently Used Subject Interpretations and/or mimetypes.
Currently I plan to call all events within a specific timeperiod and sort internally but it would be more helpful to have this info provided by Zeitgeist.

So long story short I suggest 2 new ResultTypes:
1) MostPopular/MostRecent/LeastPopular/LeastRecent Interpretation
2) MostPopular/MostRecent/LeastPopular/LeastRecent Mimetype

Markus Korn (thekorn)
description: updated
Revision history for this message
Markus Korn (thekorn) wrote :

Having such ResultTypes sounds reasonable to me, but let's ignore the implementation details for now, and think about the `Support more ResultType` topic a bit more:
This bugreport made me realize that the ResultType system as we have it right now does not scale very well. Right now we have 15 different types, and a bugreport like this one will add another eight. At some point we will end in an usability nightmare, where it will be hard for our users to find out which ResultType they want in their query. I must admit it's even right now hard for me to think about the correct type when designing a query, and i expect others, who do not think about zeitgeist daily, having even more problems with them.
So, I think it is the right point in time right now to the about the more general question "How can we support more ResultTypes in a user friendly way?" - and at the end of this process we can easily add the ones requested in this bugreport.

Revision history for this message
Markus Korn (thekorn) wrote :

One way which just came into my mind to make things easier to understand is to use a flag system, like

MostRecent = 0x01
LeastRecent = 0x02
MostPopular = 0x04
LeastPopular = 0x08
[...]
Events = 0x0100
Subjects = 0x0200
Actor = 0x0400
[...]

This way the ResultTypes we have right now can be written as

MostRecentEvents => MostRecent | Events
LeastRecentSubjects => LeastRecent | Subjects

And when we feel like adding a new `target` like Interpretation or Manifestation all we have to do is to add two new values

Interpretation = 0x0800
Manifestation = 0x01000

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

I really don't think that using binary flags helps usability. On the contrary. It just leaves the door open for a tonne of new types of bugs.

How about 'LeastRecent | Subjects | Events' what does that do?

Another problem with the flags system is that it severely limits the number of result types we can have. Consider that extensions (like the FTS) can also "add" their own result types. And by "add" I mean that they export and API like FindEvents() but allow some extra result types in there, but also the default ones - which will then fall back to the normal API for sorting and grouping.

I actually think the current way we do it is pretty nice.

Revision history for this message
Siegfried Gevatter (rainct) wrote : Re: [Bug 655164] Re: Support more ResultType

2010/10/7 Mikkel Kamstrup Erlandsen <email address hidden>:
> I really don't think that using binary flags helps usability. [...]
> I actually think the current way we do it is pretty nice.

+1

--
Siegfried-Angel Gevatter Pujals (RainCT)
Free Software Developer       363DEAE3

Seif Lotfy (seif)
Changed in zeitgeist:
assignee: nobody → Seif Lotfy (seif)
importance: Undecided → Wishlist
milestone: none → 0.6
status: New → In Progress
Seif Lotfy (seif)
Changed in zeitgeist:
status: In Progress → Fix Committed
Markus Korn (thekorn)
Changed in zeitgeist:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.