JSON Schema suggestions

Bug #817388 reported by abdullahc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Alfanous - Quranic Search engine
Fix Released
High
Assem Chelli (عاصم شلي)

Bug Description

Salam/Hi,

** List query

* Recitations list { Caption : Link,.. }, I would prefer this { Key/orCanonicalName : ( Caption, Link ),..}
Key would be short like translations one.

http://www.alfanous.org/json?list=recitations

{"Mishary Rashid Alafasy": "http://www.versebyversequran.com/data/Alafasy_128kbps", "Ahmed_ibn_Ali_al-Ajamy (From QuranExplorer.com)": "http://www.versebyversequran.com/data/Ahmed_ibn_Ali_al-Ajamy_64kbps_QuranExplorer.Com", "Menshawi (external source)": "http://www.everyayah.com/data/Menshawi_32kbps", "Saad Al Ghamadi": "http://www.everyayah.com/data/Ghamadi_40kbps", "AbdulBasit AbdusSamad (From QuranExplorer.com)": "http://www.versebyversequran.com/data/AbdulSamad_64kbps_QuranExplorer.Com", "Hani Rifai": "http://www.everyayah.com/data/Hani_Rifai_192kbps", "Muhammad Ayyoub": "http://www.everyayah.com/data/Muhammad_Ayyoub_128kbps", "Husary": "http://www.everyayah.com/data/Husary_128kbps", "Saood bin Ibraaheem Ash-Shuraym": "http://www.everyayah.com/data/Saood bin Ibraaheem Ash-Shuraym_128kbps", "Hudhaify": "http://www.everyayah.com/data/Hudhaify_128kbps", "Abu Bakr Ash-Shaatree": "http://www.versebyversequran.com/data/Abu Bakr Ash-Shaatree_128kbps", "Ibrahim_Walk": "http://www.everyayah.com/data/English/Ibrahim_Walk_192kbps_TEST", "Husary Mujawwad": "http://www.everyayah.com/data/Husary_128kbps_Mujawwad", "Abdullah Basfar": "http://www.everyayah.com/data/Abdullah_Basfar_192kbps", "AbdulBasit AbdusSamad (Murattal style)": "http://www.versebyversequran.com/data/Abdul_Basit_Murattal", "Muhammad Ayyoub (external source)": "http://www.everyayah.com/data/Muhammad_Ayyoub_32kbps"}

http://www.alfanous.org/json?list=traductions

{"indonesian": "Bahasa Indonesia-Indonesian", "noghmani": "Noghmani-tt", "korkut": "Besim Korkut-Bosnian", "jalandhry": "Jalandhry-ur", "makarem": "Ayatollah Makarem Shirazi-Persian", "osmanov": "M.-N.O. Osmanov-Russian", "amroti": "Maulana Taj Mehmood Amroti-sd", "ozturk": "Prof. Yasar Nuri Ozturk-Turkish", "shakir": "Mohammad Habib Shakir-English", "pickthall": "Mohammed Marmaduke William Pickthall-English", "muhiuddinkhan": "Maulana Muhiuddin Khan-bn", "irfan_ul_quran": "Maulana Doctor Tahir ul Qadri-ur", "ghomshei": "Mahdi Elahi Ghomshei-Persian", "arberry": "Arthur John Arberry-English", "porokhova": "V. Porokhova-Russian", "ansarian": "Hussain Ansarian-Persian", "kuliev": "E. Kuliev-Russian", "transliteration-en": "Transliteration-English"}

* "traductions" is French word, English "translation". :) I caught you!

* Fields needs captions for sorting-by list, also key_en:key_ar not reverse.

Here some thing raised to my mind about i18n support for translation:

It's better if We receive {Key/orCanonicalName:Caption} in requested language (needs additional parameter, default English)
Ex:
"sura_type":"Type of Sura"

{"\u062c\u0632\u0621": "juz", "\u0639\u062b\u0645\u0627\u0646\u064a ": "uth", "\u0646\u0648\u0639_\u0627\u0644\u0633\u0648\u0631\u0629": "sura_type", "\u0631\u0642\u0645_\u0627\u0644\u0633\u062c\u062f\u0629": "sajda_id", "\u0635\u0641\u062d\u0629": "page", "\u0631\u0628\u0639": "rub", "\u0631_\u0633": "s_r", "\u0631\u0643\u0648\u0639": "ruku", "\u0631\u0642\u0645_\u0627\u0644\u0633\u0648\u0631\u0629": "sura_id", "\u0622_\u0633": "s_a", "\u0622\u064a\u0629_": "aya_", "\u0645\u0648\u0636\u0648\u0639": "subject", "\u062c_\u0633": "s_g", "\u0643_\u0622": "a_w", "\u0641\u0635\u0644": "chapter", "\u062d_\u0622": "a_l", "\u0633\u0648\u0631\u0629": "sura", "\u0641\u0631\u0639": "topic", "\u0622\u064a\u0629": "aya", "\u0631\u0642\u0645_\u0627\u0644\u0622\u064a\u0629": "aya_id", "\u0639\u062b\u0645\u0627\u0646\u064a_": "uth_", "\u0643_\u0633": "s_w", "\u0646\u0648\u0639_\u0627\u0644\u0633\u062c\u062f\u0629": "sajda_type", "\u0631\u0642\u0645": "gid", "\u0628\u0627\u0628": "subtopic", "\u0646\u0635\u0641": "nisf", "\u062d_\u0633": "s_l", "\u062d\u0632\u0628": "hizb", "\u0645\u0646\u0632\u0644": "manzil", "\u062c_\u0622": "a_g", "\u0633\u062c\u062f\u0629": "sajda", "\u062a\u0631\u062a\u064a\u0628_\u0627\u0644\u0633\u0648\u0631\u0629": "sura_order"}

* Are all fields accepted in sorting? if no We need new fields list specific for sorting.

** For search results schema

* runtime: would be float not a text.

* I would suggest words.global to be out of words, so like ayas. it will easy loop without any 'if' exception for global.

* For a complete interact with json server, If we add success flag & error code&message to the schema. This means also the dummy query http://www.alfanous.org/json?search= should not return text/html, where the user application waiting for application/json. This implies to list query.

** information:

Now my form/application does 3 queries for recitations, tranlations & fields; It's time consuming. I would suggest putting all them within information query. ie. another structure for this.

That's all right now.

Tags: json schema
Changed in alfanous:
importance: Undecided → High
status: New → In Progress
assignee: nobody → Assem Chelli (عاصم شلي) (assem-ch)
Revision history for this message
abdullahc (sneetsher) wrote :

Salam,

** Paging (interval control)

* I don't really know if we need a page & nb_pages items within interval. This is good for web pages and the user will not be obliged to implement a page calculation.

* It would be nice if the query support 2 methods for result slicing (interval control):

 - page & range (page number & number of items per page) good for web pages.

 - start & range ( start item number & number of items) suitable for other applications.

range should be limited by server, no overload crisis.

Revision history for this message
abdullahc (sneetsher) wrote :

Salam,

Concerning results slicing (Paging)

I think it will be good if you would make a look into http://www.opensearch.org/ specifications, this makes json search parameter directly mapped to standard way.

As a quick reading they uses:

- (start page offset & number of items per page)
- ( start item offset & number of items per page )

Also in next json schema to more easy to make integration to search box in browser (like suggestions, language, ...)

Changed in alfanous:
status: In Progress → 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.