manticoresearch
Version, currently 1.0.23 versions
- 1.0.2latestSep 9, 2024
- 1.0.1not indexedSep 29, 2024
- 1.0.0not indexedSep 29, 2024
github.com/Athsus/manticoresearch-crystal
No description declared in shard.yml.
0 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
manticoresearch:
github: Athsus/manticoresearch-crystal
version: ~> 1.0.2Then run:
shards installshard.yml
- Crystal
>= 1.13.1- License
- MIT
- Author
- Ao Yu
- Targets
testfrom test.crutils_api_sqlfrom examples/utils_api_sql.crindex_api_bulkfrom examples/index_api_bulk.crutils_api_specfrom spec/utils_api_spec.crindex_api_deletefrom examples/index_api_delete.crindex_api_insertfrom examples/index_api_insert.crindex_api_updatefrom examples/index_api_update.crindex_api_replacefrom examples/index_api_replace.crsearch_api_searchfrom examples/search_api_search.crsearch_api_percolatefrom examples/search_api_percolate.cr
Dependencies
This version declares no dependencies.
README
Manticore Crystal Client
Client for Manticore Search.
Installation & Usage
Install with Shards
TODO: installation not tested
To add the manticoresearch package to your Crystal project, add the following to your shard.yml:
dependencies:
manticoresearch:
github: Athsus/manticoresearch-crystal
version: ~> 1.0.0
Then run shards install to install dependencies
Example Usage
require "manticoresearch"
# Define the Manticore Search configuration
config = Manticoresearch::Configuration.new("http://127.0.0.1:9308")
# Initialize the API client
api_client = Manticoresearch::ApiClient.new(config)
# Create an instance of the Index API
index_api = Manticoresearch::IndexApi.new(api_client)
# Perform a bulk insert
body = <<-NDJSON
{"insert": {"index": "test", "id": 1, "doc": {"title": "Title 1"}}}
{"insert": {"index": "test", "id": 2, "doc": {"title": "Title 2"}}}
NDJSON
begin
# Bulk index operation
response = index_api.bulk(body)
puts response
rescue ex : Exception
puts "Error: #{ex.message}"
end
# Search example
search_api = Manticoresearch::SearchApi.new(api_client)
search_request = {
"index" => "test",
"query" => { "match" => { "title" => "Title 1" } }
}
begin
# Perform a search
search_response = search_api.search(search_request)
puts search_response
rescue ex : Exception
puts "Error: #{ex.message}"
end
API Documentation
All URIs are relative to http://127.0.0.1:9308.
API Endpoints
| Class | Method | HTTP request | Description |
|---|---|---|---|
| IndexApi | bulk | POST /bulk | Bulk index operations |
| IndexApi | delete | POST /delete | Delete a document in an index |
| IndexApi | insert | POST /insert | Create a new document in an index |
| IndexApi | replace | POST /replace | Replace a document in an index |
| IndexApi | update | POST /update | Update a document in an index |
| SearchApi | percolate | POST /pq/{index}/search | Perform reverse search on a percolate index |
| SearchApi | search | POST /search | Performs a search on an index |
| UtilsApi | sql | POST /sql | Perform SQL queries |
For full API reference, please refer to the Manticore Search Documentation.
Author
- Athsus - creator
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
1.0.2- Tagged
- Sep 9, 2024
- Commit
50a5108e0494- Crystal
>= 1.13.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/Athsus/manticoresearch-crystal
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 23, 2026
- Synced
- Aug 23, 2026
- Versions
- 3