Comments (4)
This is going to be a little tricky for few reasons
- Trends update every 30 minutes or so
- Search result is generated purely from the search index and search service which deliberately does not talk to hadith service or analytics service to speed up the search process, so we have no way of knowing whether hadith is trending or not.
For above reasons, we would most likely need to add a separate Elasticsearch index update job for this (not a good idea though).
from planner.
I think a better solution would be to add another job who's sole purpose would be to update the ahādīth records that are now trending and that are no longer trending
That way the Elasticsearch builder would pick up these records, and update their associated index.
Doing this would also mean we can continue to use search service as it is and pick up the record right from the ES
The downside is cache invalidation but there is also a workaround for that which is search versioning. This would be a little cumbersome especially because our trends change every 30 minute.
from planner.
Another possible (and simpler) solution is asynchronously fetch the badges post search - there is going to be a slight user experience concern here.
from planner.
So we have 3 possible solution to achieve this:
- New job that would find trends and update the search index (worst option)
- New job to update the records with new trend and remove old trends and so existing ES job can pick up these records and update the index
- +simple solution that works with existing eco-system
- -ddl change for hadith
- -frequent hadith records update
- -cache invalidation
- Asynchronously fetch the badges from hadith service.
- +simple solution
- -bad user experience
- >going to need new GET API
from planner.
Related Issues (20)
- Corner indicator for hadith on search result card
- Malik Muwatta cards are not showing title
- Corner indicator ignores the "sub-tags"
- Searching hadith reference preempted results
- Ability to specify revision date
- Revision "same day surah" highlighter
- New translations to be added
- Emushaf v2 HOT 1
- "Special" badge
- Cross refs ux
- Projected last revised for date other than today
- Add bookmark feature for tafasir HOT 1
- Use ML for revision strength
- Revision viewer & updater in the mus'haf HOT 1
- Fix gapless recitation on simple Quran
- Voice translation along with recitation
- Series list
- Revision in reader improvements
- Print revision
- Provide consistent recommendations for revision
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from planner.