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.
Ruby V2.4
Gem V2.6.11
Apache Solr V5.0+
Utopian Ruby 0.0.3.1
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.
A set of rspec test has been written here:
https://github.com/yuxir/utopian-solrizer/blob/master/spec/utopian_solrizer_spec.rb
Just fork this project, create your feature branch, commit your changes and send a pull request!
https://github.com/yuxir/utopian-solrizer
This gem has been registered in rubygems.org :
Assuming you already have Ruby development configured, then run:
gem install utopian_solrizer
Assuming you have installed and configured Solr correctly. If not, please check the offical Solr website for more information.
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)
params = { :q => "*:*" }
response = UtopianSolrizer.query(solr_options, params)
UtopianSolrizer.exist(solr_options, id)
UtopianSolrizer.solrize_posts_within_minutes({"limit":1,"status":"reviewed","type":"development"}, solr_options, 60*2)
I have added my Steemit account link in the README: