Socket
Socket
Sign inDemoInstall

reindexer

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reindexer


Version published
Maintainers
1
Created
Source

Gem Reindexer

Reindexer Ruby

gRPC client for work with reindexer. It is still in alpha state and there are a lot of works to do. So using in a prod environment is not recomended.

The gem also wraps the arguments of gRPC requests into the gRPC messages. So you should not care about the toons of nested initializations. Just give a common hash and the gem will do all the work.

Installation

Add this line to your application's Gemfile:

gem 'reindexer'

And then execute:

bundle

Or install it yourself as:

gem install reindexer

Usage

client = Reindexer::Client.new('grpc://reindexer:16534')
client.create_database(db_name: 'test_db')
client.open_namespace(db_name: 'test_db', storage_options: {ns_name: 'items'})
client.add_index(db_name: 'test_db', ns_name: 'items', definition: {
  name: 'id',
  json_paths: ['id'],
  index_type: 'hash',
  field_type: 'int',
  options: {
    is_pk: true,
    is_array: false,
    is_dense: false,
    is_sparse: false,
    collate_mode: 'CollateUTF8Mode',
    sort_order_labled: '',
    config: ''
  },
  expire_after: nil
})
client.modify_item([
  {db_name: 'test_db', ns_name: 'items', mode: :UPSERT, data: JSON.dump(id: 1, name: 'Name')},
  {db_name: 'test_db', ns_name: 'items', mode: :UPSERT, data: JSON.dump(id: 2, name: 'BestName')}
])
stream = client.select_sql(db_name: 'test_db', sql: 'SELECT * FROM items', output_flags: {with_rank: true})

Contributing

If you have any questions about Reindexer, please use main page of Reindexer. Feel free to report issues and contribute about Reindexer Ruby at https://github.com/numbata/reindexer-ruby.

License

The gem is available as open source under the terms of the Apache-2.0

FAQs

Package last updated on 22 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc