Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added limit and offset for verses #99

Merged
merged 2 commits into from
Feb 7, 2017
Merged

Added limit and offset for verses #99

merged 2 commits into from
Feb 7, 2017

Conversation

naveed-ahmad
Copy link
Collaborator

No description provided.

@ahmedre
Copy link
Contributor

ahmedre commented Feb 2, 2017

Deployed to: http://staging.quran.com:32812

@@ -1,7 +1,7 @@
class V3::ChaptersController < ApplicationController
# GET /chapters
def index
chapters = Chapter.includes(:translated_names).all
chapters = Chapter.all
Copy link
Contributor

@mmahalwy mmahalwy Feb 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @naveed-ahmad but i have to bother you on this one. The title of the PR and the changes done are not the same. This, and other changes for example, will break the frontend and will go unnoticed since my expectation of the PR is offset + limit.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmahalwy this won't break frontend. We were eager loading translated names with initial implementation, but later on changed that. This is just removing the eager loading, it will not impact the generated json

@mmahalwy mmahalwy merged commit 24147d9 into master Feb 7, 2017
@mmahalwy mmahalwy deleted the segments_fix branch February 7, 2017 01:07
mmahalwy added a commit that referenced this pull request Apr 19, 2017
* started v3 with rails 5.0.1

* added models, and data migrations task for few tables

* added more data transfer logic and fixed some models

* don't need encrypted segments

* added translation importer

* time to start writing api, done with data transfer

* added todos, and fixed some polymorphic relation

* send exception to raven, we are already using this on frontend!

* working on serializers

* added translated name of chapters

* added chapter info and verse endpoint

* implemented verse serializer

* working on options controller

* added options endpoint

* finished options controller

* added language filters, and chapter info data

* Generate nginx directory as part of Dockerfile

* removed test code

* API v3  (#82)

* started v3 with rails 5.0.1

* added models, and data migrations task for few tables

* added more data transfer logic and fixed some models

* don't need encrypted segments

* added translation importer

* time to start writing api, done with data transfer

* added todos, and fixed some polymorphic relation

* send exception to raven, we are already using this on frontend!

* working on serializers

* added translated name of chapters

* added chapter info and verse endpoint

* implemented verse serializer

* working on options controller

* added options endpoint

* finished options controller

* added language filters, and chapter info data

* removed test code

* moving ES mapping to related models

* updated readme

* moved db submodule to dumps

* removed v2 controller

* removed annotate from gem lock

* Fix build

* wip

* added simple name of chapters

* moved searchable content to one ES index

* removed transliteration csv

* wip on search

* added ids in api

* removed root from response

* added roots back (#98)

* Added limit and offset for verses (#99)

* fixed language name and segment are array

* added offset and limit to verses endpoint

* Sentry only in production

* Add Page Number to Word Serializer

* Media Content default, translations evaluate

* Translations options approved

* Linting

* added image response

* Take searchable out for better query

* rubocop

* added bare min search

* added missing query dsl file

* added image in verse respose

* added font code for v3, removed image model

* setup ruby path for rvm

* Remove extra passenger_ruby from nginx config

This causes nginx to fail to start the backend server.

* Revert change to passenger_ruby

passenger_ruby should not be set to rvm when using Phusion, at least for now.

* added footnote endpoint (#112)

* added tafsirs endpoint

* Bump phusion to 0.9.20 to bump Ruby to 2.3.3

* removed v2 models and added corpus data

* added lemma and stems

* migrated remaining tables from v2

* reannotated models

* fixed typo

* removed v2 search

* enabled search and we don't need to query languages with search. (#117)

* enabled search and we don't to query languages with search.

* updated rake task to import ES

* removed v2 models (#116)

* added slack in readme (#120)

* Fixes pagination with offset (#121)

* Remove unnecessary Elasticsearch tasks

Elasticsearch runs sandboxed away from api, so these files aren't
available to api anyway.

* Performance (#123)

* WIP

* Preloading magic

* style

* Fallback on EN (#126)

* Indentation style (#127)

* Added boost to translation search for language selected by user (#130)

* Added boost to translation search for language selected by user

* Ruby-esq style for returns

* Show routes for juz, pages, words (#128)

* Audio files api (#132)

* Fixes #131 Puma server (#133)

* added cache headers, and minor performance imporvements

* added more source fields for trans index and minor fixes for pagination (#137)

* Slugs (#138)

* added slug and minor changes in search

* added resource id to translation json

* added slug to content resource

* added missing attrs for search

* word has one audio, no need for another join (#141)

* Search suggestions (#143)

* Added suggestion API

* bare minimum suggestions

* enable get transaltion using slug

* increase highlight size

* we don't need to highlight ayah text for search!

* rollback and fixed bug. User can get multiple translation using ID or slug or resource (#144)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants