Using filters (text match / exclusion / etc)
Bug #485966 reported by
Siegfried Gevatter
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zeitgeist Framework |
Fix Released
|
Critical
|
Markus Korn | ||
0.3 |
Invalid
|
Critical
|
Markus Korn | ||
0.4 |
Fix Released
|
Critical
|
Unassigned |
Bug Description
- How can I get all events except those with interpretation VISIT_EVENT?
- In case you give me above the awful answer "looking for all interpretations except VISIT_EVENT", how can I get all events except those from application "firefox.desktop"?
- How can I get all those events whose URI ends with "myfile.txt"?
- And those events whose title contains "zeitgeist"?
Related branches
lp:~thekorn/zeitgeist/negation_support
- Mikkel Kamstrup Erlandsen: Approve (review only, no test run)
- Zeitgeist Framework Team: Pending requested
-
Diff: 551 lines (+338/-30)6 files modified_zeitgeist/engine/main.py (+50/-18)
_zeitgeist/engine/sql.py (+5/-2)
test/datamodel-test.py (+118/-0)
test/engine-test.py (+108/-1)
test/test-sql.py (+21/-0)
zeitgeist/datamodel.py (+36/-9)
lp:~thekorn/zeitgeist/wildcard_support
- Siegfried Gevatter: Approve
- Seif Lotfy: Approve (deployment and testing)
- Mikkel Kamstrup Erlandsen: Pending requested
-
Diff: 422 lines (+224/-32)6 files modified_zeitgeist/engine/main.py (+61/-32)
_zeitgeist/engine/sql.py (+31/-0)
test/datamodel-test.py (+36/-0)
test/engine-test.py (+45/-0)
test/sql-test.py (+36/-0)
zeitgeist/datamodel.py (+15/-0)
Changed in zeitgeist: | |
importance: | Undecided → Critical |
milestone: | none → 0.3 |
Changed in zeitgeist: | |
milestone: | 0.3.0 → 0.3.1 |
Changed in zeitgeist: | |
milestone: | 0.3.2 → 0.3.3 |
Changed in zeitgeist: | |
milestone: | 0.3.4 → 0.4.0 |
To post a comment you must log in.
For this question to make sense you have to give a use case and explain why it is not good enough to filter out events manually in the Firefox example.
For nitpicking: events can have a "title that contains zeitgeist". They can have a subject with text field containing 'zeitgeist'. If we want to make such queries efficient we need a full text index on the event.subject_text column, which would require the FTS extension for sqlite and I am not quite sure that this is a standard dependency..?
If we are serious about scaling to millions of events then we can never under any circumstance allow queries that force us into a table scan. And I think massive scalability is more important than esoteric queries, but this is simply my opinion, and up to discussion.
If zeitgeist was implemented on top of something like Xapian or Lucene instead of SQLite we could allow more complex queries. But for the near- to mid term future I don't see that happening.
On the negation issue I suppose we could add some sort of negation switch (fx '!') before the fields where we use controlled identifiers (that'd be uri, iterpretations, manifestation, mimetype, etc., but not payload or subject_text). But I still need a convincing argument showing that we need this...