Changes

Line 23: Line 23:  
== 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([http://xapian.org/docs/glossary.html Xapian 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.
   −
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 word 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 103: Line 106:  
|}
 
|}
   −
==== 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 the minimal set of [http://dublincore.org/documents/dces/ Dublin Core] metadata fields
  −
 
  −
User can use these prefixes in ''tags'', for multi word terms quotes are needed e.g.
  −
creator:"me and my friends"
      
{| 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;"