Line 1: |
Line 1: |
− | <noinclude>{{GoogleTrans-en}}{{TOCright}}</noinclude> | + | <noinclude>{{GoogleTrans-en}}{{TOCright}} |
| + | [[Category:Feature Page Incomplete]] |
| + | [[Category:FeatureObsoleted|Plain Query Format]]</noinclude> |
| | | |
| <!-- All fields on this form are required to be accepted. | | <!-- All fields on this form are required to be accepted. |
Line 8: |
Line 10: |
| == Summary == | | == Summary == |
| | | |
− | Provide simple string query format for Datastore find() method to cover all kinds of requests. | + | Provide a simple string query format for the Datastore find() method to cover all kinds of requests. |
| | | |
| == Owner == | | == Owner == |
Line 17: |
Line 19: |
| == Current status == | | == Current status == |
| | | |
− | * Targeted release: 0.86 | + | * Targeted release: ? |
| * Last updated: Tue Aug 25 07:59:58 UTC 2009 | | * Last updated: Tue Aug 25 07:59:58 UTC 2009 |
− | * Percentage of completion: core part was implemented within [[Version support for datastore/Proposal]], the final set of terms depends on [[Features/Tags in Journal]] | + | * Percentage of completion: 90%, core part was implemented within [[Version support for datastore/Proposal]] |
| | | |
| == Detailed Description == | | == Detailed Description == |
| | | |
− | Instead of having dictionary ''query'' argument in ''org.laptop.sugar.DataStore::find()'' method, use plain string of [http://www.xapian.org/docs/queryparser.html full featured] query request i.e. use all system query parameters(like timestamp, mime_type etc.) in query string.
| + | Let users create complex queries with all possible terms (see Xapian [http://xapian.org/docs/glossary.html glossary]) including system ones. Users can use in query string [[#System prefixes|system]] prefixes and predefined set of [[#Users predefined prefixes|custom]] prefixes. |
| | | |
− | All system, users predefined and some(its up to user) of users query terms
| + | Prefixes in query string could look like |
− | * use prefixes like mime_type:"text/plain", author:Strugatsky etc.
| + | <prefix>:<one-word-value> |
− | * could be ranged e.g. timestamp:<stamp1>..<stamp2>
| + | <prefix>:"<multi-word-value>" |
− | * could be sorted
| |
| | | |
− | ==== System terms ====
| + | Values for system prefixes, Sugar fills on its own, i.e., if ''title'' metadata field is ''My activity'', user can type ''title:"My activity"'' in query string to search ''My activity'' substring only within ''title'' fields. |
| | | |
− | Sugar fills these terms on its own.
| + | Values for [[#Users predefined prefixes|custom]] prefixes user should place to ''tags'' metadata field in the same form like in query string. |
| + | |
| + | If value is multi-worded, any of these words could be used in query, e.g., ''title:My'' or ''title:activity''. |
| + | |
| + | ==== System prefixes ==== |
| | | |
| {| border=1 cellpadding=3 style="border: 1px solid white; border-collapse: collapse; background: #e3e4e5;" | | {| border=1 cellpadding=3 style="border: 1px solid white; border-collapse: collapse; background: #e3e4e5;" |
Line 44: |
Line 49: |
| | | | | |
| | [http://dublincore.org/documents/dces/#identifier identifier] | | | [http://dublincore.org/documents/dces/#identifier identifier] |
| + | | |
| |- | | |- |
| | ''bundle_id'' | | | ''bundle_id'' |
| + | | |
| + | | |
| + | | postponed until we decide to use Journal to represent activities |
| |- | | |- |
| | ''mime_type'' | | | ''mime_type'' |
| | | | | |
| | [http://dublincore.org/documents/dces/#format format] | | | [http://dublincore.org/documents/dces/#format format] |
| + | | |
| |- | | |- |
| | ''title'' | | | ''title'' |
| | sorted | | | sorted |
| | [http://dublincore.org/documents/dces/#title title] | | | [http://dublincore.org/documents/dces/#title title] |
| + | | |
| + | |- |
| + | | ''activity'' |
| + | | |
| + | | |
| + | | |
| |- | | |- |
| | ''activity_id'' | | | ''activity_id'' |
| + | | |
| + | | |
| + | | |
| |- | | |- |
| | ''timestamp'' | | | ''timestamp'' |
| | ranged sorted | | | ranged sorted |
| + | | |
| + | | |
| |- | | |- |
| | ''keep'' | | | ''keep'' |
| + | | |
| + | | |
| + | | |
| |- | | |- |
| | ''tags'' | | | ''tags'' |
| + | | |
| + | | |
| + | | see [[#Users predefined terms]] |
| |- | | |- |
| | ''filesize'' | | | ''filesize'' |
| | ranged sorted | | | ranged sorted |
| | | | | |
− | | TODO: propose adding this field to DS | + | | postponed for [[Features/Unified Browser for Objects]] |
| |- | | |- |
| | ''participant'' | | | ''participant'' |
| | sorted | | | sorted |
| | | | | |
− | | TODO: propose adding this field to DS
| |
− | |-
| |
− | | ''buddies_count''
| |
− | | sorted
| |
| | | | | |
− | | (?)
| |
| |- | | |- |
| | ''description'' | | | ''description'' |
| | | | | |
| | [http://dublincore.org/documents/dces/#description description] | | | [http://dublincore.org/documents/dces/#description description] |
| + | | |
| |- | | |- |
| |} | | |} |
| | | |
− | ==== Users predefined terms ==== | + | ==== Users predefined prefixes ==== |
− | | |
− | The purpose of having predefined users terms:
| |
− | * Shell or activities can fill these terms implicitly e.g. by parsing metedata of downloaded files(audio, video etc.)
| |
− | * in some UI(for example books viewer) having some of these terms in separate columns in list view could make sense
| |
− | * we can provide sorting and ranging options only for known(by Datasotre) terms
| |
− | * provide [http://dublincore.org/documents/dces/ Dublin Core] set of metadata fields
| |
| | | |
| {| border=1 cellpadding=3 style="border: 1px solid white; border-collapse: collapse; background: #e3e4e5;" | | {| border=1 cellpadding=3 style="border: 1px solid white; border-collapse: collapse; background: #e3e4e5;" |
Line 151: |
Line 168: |
| |- | | |- |
| |} | | |} |
− |
| |
− | ==== Another ways to differentiate DS objects ====
| |
− |
| |
− | All metadata fields will be tracked as usual, so regular search(w/o prefixes) should work. There is only one addition - optional prefixes in ''tags'' field.
| |
− |
| |
− | All substrings(tags) from ''tags'' field in format:
| |
− | * ''<substring_w/o_separators>:<string_w/o_separators_after_:>''
| |
− | * ''<substring_w/o_separators>:"<string_w/o_separators_after_: but with separators inside string>"''
| |
− |
| |
− | Will be treated as tags with prefix, so user can type in search bar:
| |
− | * ''books:favorite'' if ''tags'' has substring ''books:favorite''
| |
− | * ''books:brothers'' if ''tags'' has substring ''books:"The Strugatsky brothers"''
| |
| | | |
| ==== Result set control parameters ==== | | ==== Result set control parameters ==== |
Line 185: |
Line 190: |
| == Benefit to Sugar == | | == Benefit to Sugar == |
| | | |
− | * simple(plain string in comparing with existed API with dictionary find()'s argument) query format for dbus find() method | + | * Feature lets users specify exact metadata fields to search for. |
− | * simple and new-feature-proof way to implement find method for example in CLI tools(because this tool needs only to pass plain string to Datastore service)
| |
− | * let experienced users use system terms in Journal search bar
| |
− | * existed implementation has hard-coded logic for example in case of having several mime_types in query(all mime_types will be ORed despite what user wants).
| |
| | | |
| == Scope == | | == Scope == |
Line 209: |
Line 211: |
| == User Experience == | | == User Experience == |
| | | |
− | * In Journal search bar users can use system terms e.g. ''timestamp:<date1>..<date2> AND mime_type="text/plain" AND participant:me''' | + | * feature just expands query dictionary |
− | * use tags with prefixes to differentiate them from regular words e.g. having substring ''books:favorite'' in tags field, user can type ''books:favorite'' in search bar and differentiate word ''favorite'' with prefix ''books'' from other ''books'' words.
| |
| | | |
| == Dependencies == | | == Dependencies == |
Line 231: |
Line 232: |
| == Comments and Discussion == | | == Comments and Discussion == |
| * See [[{{TALKPAGENAME}}|discussion tab for this feature]] <!-- This adds a link to the "discussion" tab associated with your page. This provides the ability to have ongoing comments or conversation without bogging down the main feature page --> | | * See [[{{TALKPAGENAME}}|discussion tab for this feature]] <!-- This adds a link to the "discussion" tab associated with your page. This provides the ability to have ongoing comments or conversation without bogging down the main feature page --> |
− |
| |
− |
| |
− | [[Category:Feature Page Incomplete]]
| |
− | [[Category:Feature]]
| |