Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
⚠️ This client is deprecated ⚠️
swiftype-enterprise has been replaced by elastic-enterprise-search. Thank you! - Elastic
A first-party Ruby client for Elastic Enterprise Search.
To install the gem, execute:
gem install swiftype-enterprise
Or place gem 'swiftype-enterprise', '~> 1.0.0
in your Gemfile
and run bundle install
.
Create a new instance of the Swiftype Enterprise Client with your access token:
SwiftypeEnterprise.access_token = '' # your access token
swiftype = SwiftypeEnterprise::Client.new
swiftype = SwiftypeEnterprise::Client.new
SwiftypeEnterprise.endpoint = 'https://your-server.example.com/api/v1'
This example shows how to use the index_documents method:
content_source_key = '' # your content source key
documents = [
{
'id' => 'INscMGmhmX4',
'url' => 'http://www.youtube.com/watch?v=v1uyQZNg2vE',
'title' => 'The Original Grumpy Cat',
'body' => 'this is a test'
},
{
'id' => 'JNDFojsd02',
'url' => 'http://www.youtube.com/watch?v=tsdfhk2j',
'title' => 'Another Grumpy Cat',
'body' => 'this is also a test'
}
]
begin
document_receipts = swiftype.index_documents(content_source_key, documents)
# handle results
rescue SwiftypeEnterprise::ClientException => e
# handle error
end
content_source_key = '' # your content source key
document_ids = ['INscMGmhmX4', 'JNDFojsd02']
begin
destroy_document_results = swiftype.destroy_documents(content_source_key, document_ids)
# handle destroy document results
rescue SwiftypeEnterprise::ClientException => e
# handle error
end
Run tests via rspec:
$ ENDPOINT=http://localhost:3002/api/v1 bundle exec rspec
If something is not working as expected, please open an issue.
We welcome contributors to the project. Before you begin, a couple notes...
Thank you to all the contributors!
FAQs
Unknown package
We found that swiftype-enterprise demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.