quran / quran_android

a quran reading application for android
http://android.quran.com
GNU General Public License v3.0
2.01k stars 888 forks source link

Discussion: Web powered search #597

Closed ahmedre closed 7 years ago

ahmedre commented 8 years ago

we get lots of complaints about search (see #453 for example). part of the problem is that on Android, we're stuck with sqlite, which makes it more difficult to do some of the more advanced text processing features that we can more easily (and efficiently) do on the web.

legacy.quran.com's search is pretty stable and pretty decent (quran.com's new one is still getting there and improving, but in the meanwhile, legacy's is better for now).

so was thinking of wiring up quran for android's searches and live suggestions to go through the web (and fallback to local behavior when there is no internet).

my main concerns are people in countries that have to pay for internet per mb, etc - should we make this an "opt in" feature maybe, or only enable it on wifi or something? thoughts about this in general?

ahmedre commented 8 years ago

cc @ozbek @hmaher

ofa1 commented 8 years ago

Agreed totally. I think it would be great if this feature is added to Quran Android.

As for people in countries with expensive internet, it's always good to have it as an opt-in feature. Can have the options "Mobile Data + Wifi", "Wifi Only", "Never" as the selection with "Wifi Only" set to default.

assem-ch commented 8 years ago

I would suggest for you using alfanous quran search API

website: http://alfanous.org web service: http://alfanous.org/jos2

You can send your queries through url parameters, for example ?action=search&query=الحمد. And you will get results in json format.

You can add param ?view=minimal to get minimal info You can add param ?unit=translation&lang=en to search in english translations of quran.

http://alfanous.org/jos2?action=search&unit=aya&sortedby=score&advanced_search_advanced_query_optionsRadios=phrase&recitation=14&query=%D8%A7%D9%84%D8%AD%D9%85%D8%AF+%D9%84%D9%84%D9%87&translation=en.transliteration&view=default

You can request all meta data that you need : http://www.alfanous.org/jos2?action=show&query=all

More about the webservice here: https://github.com/Alfanous-team/alfanous/blob/master/src/alfanous-cgi/README.rst

ofa1 commented 8 years ago

This functionality already exists in Quran Android. Correct me, but I think this is only for searching the Arabic text and/or the translation, right ?

The idea for enabling web search in Quran Android was to enable the phonetic search and other features not directly implementable in Android.

On Sun, Jan 17, 2016 at 6:57 AM, assem-ch notifications@github.com wrote:

I would suggest for you using alfanous quran search API

website: http://alfanous.org web service: http://alfanous.org/jos2

You can send your queries through url parameters, for example ?action=search&query=الحمد. And you will get results in json format.

You can add param ?view=minimal to get minimal info You can add param ?unit=translation&lang=en to search in english translations of quran.

http://alfanous.org/jos2?action=search&unit=aya&sortedby=score&advanced_search_advanced_query_optionsRadios=phrase&recitation=14&query=%D8%A7%D9%84%D8%AD%D9%85%D8%AF+%D9%84%D9%84%D9%87&translation=en.transliteration&view=default

You can request all meta data that you need : http://www.alfanous.org/jos2?action=show&query=all

More about the webservice here: https://github.com/Alfanous-team/alfanous/blob/master/src/alfanous-cgi/README.rst

— Reply to this email directly or view it on GitHub https://github.com/quran/quran_android/issues/597#issuecomment-172282500 .

Omair Fareed Ahmed

assem-ch commented 8 years ago

Arabic text, Buckwalter romanizations and quran translations for many languages. Alfanous is about advanced search, inf alfanous.org, check help in the side panel.

Example for root search, http://alfanous.org/?query=%3E%3E%D8%A7%D9%84%D8%AD%D9%85%D8%AF&view=default&sortedby=score&translation=en.transliteration&recitation=14&advanced_search_advanced_query_optionsRadios=phrase

I am not telling to replace your basic search functionality but to extend it using alfanous advanced searrch. Here a good example of use , Alfanous app for iphone by i4islam: https://itunes.apple.com/us/app/alfanws-mhrk-bhth-qrany-mtqdm/id543646326?mt=8

Ahmed9914 commented 7 years ago

If the user is using mobile data, we can ask him:

Also we can make the user choose his default option in the preferences

ahmedre commented 7 years ago

merging into #453