Utopian Solrizer - get utopian posts indexed in Solr
What is the project about?
This project is aiming to index Utopian posts into solr, making it possible to do advanced searches.
Apache Solr is an open source enterprise search platform. Its major features include full-text search, hit highlighting, faceted search, real-time indexing, dynamic clustering, database integration, NoSQL features and rich document (e.g., Word, PDF) handling.
Technology Stack
Ruby V2.4
Gem V2.6.11
Apache Solr V5.0+
Utopian Ruby 0.0.3.1
Roadmap
The current implementation performs CRUD to Solr server. As the focus of Solr is searching texts, Utopian Solrizer currently only index text fields, e.g. author, title, body, moderator etc and ignoring other fields, e.g. votes, pending payout. However, it's very easy to modify the code to index whatever you want. There are some features to be addressed in the future iterations.
- Index comments
- Move solr fields definition into a config file to give users more flexibility
- Add rake tasks to do batch job, e.g. add Utopian posts into Solr
Test
A set of rspec test has been written here:
https://github.com/yuxir/utopian-solrizer/blob/master/spec/utopian_solrizer_spec.rb
How to contribute?
Just fork this project, create your feature branch, commit your changes and send a pull request!
https://github.com/yuxir/utopian-solrizer
Installation
This gem has been registered in rubygems.org :
Assuming you already have Ruby development configured, then run:
gem install utopian_solrizer
How to use it?
Assuming you have installed and configured Solr correctly. If not, please check the offical Solr website for more information.
Add Utopian post to solr
solr_options = { read_timeout: 120, open_timeout: 120, url: 'http://localhost:8983/solr/utopian' }
post = UtopianRuby::UtopianRubyAPI.get_post_obj('yuxi','utopian-api-ruby-client')
UtopianSolrizer.solrize_post(post, solr_options)
Query Solr to find all Utopian posts
params = { :q => "*:*" }
response = UtopianSolrizer.query(solr_options, params)
Check if an Utopian post indexed in Solr
UtopianSolrizer.exist(solr_options, id)
Index Utopian posts within a certain period to Solr
UtopianSolrizer.solrize_posts_within_minutes({"limit":1,"status":"reviewed","type":"development"}, solr_options, 60*2)
Example of indexed Utopian posts in Solr
Proof of work
I have added my Steemit account link in the README:
Posted on Utopian.io - Rewarding Open Source Contributors
Leave Utopian Solrizer - get utopian posts indexed in Solr to:
Read more #utopian-io posts
Best Posts From yuxi
We have not curated any of yuxi's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From yuxi
- 想要买比特币等加密货币又担心银行账户被冻结?推荐Skrill!
- 试用一下Weedcash
- 黑五打折入手了Ledger Nano S
- HF20 test
- Steem Python升级过程中遇到的坑
- Steemmate - Like both Steemit and Steemd? Let’s put them together!
- Namesilo Ruby client v0.0.3 - supporting all REST API methods and adding helper methods
- Webmaster tool update (v0.1) - Namecheap support and lazy loading of data
- Namesilo Ruby client
- 软件介绍: Gource, 察看酷绚的软件提交历史