All Projects → ConsenSys → Mahuta

ConsenSys / Mahuta

Licence: apache-2.0
IPFS Storage service with search capability

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Mahuta

Elasticsearch
The missing elasticsearch ORM for Laravel, Lumen and Native php applications
Stars: ✭ 375 (+102.7%)
Mutual labels:  search-engine, elasticsearch, caching
Ipfs Search
Search engine for the Interplanetary Filesystem.
Stars: ✭ 519 (+180.54%)
Mutual labels:  search-engine, elasticsearch, ipfs
Funpyspidersearchengine
Word2vec 千人千面 个性化搜索 + Scrapy2.3.0(爬取数据) + ElasticSearch7.9.1(存储数据并提供对外Restful API) + Django3.1.1 搜索
Stars: ✭ 782 (+322.7%)
Mutual labels:  search-engine, elasticsearch
Flexsearch
Next-Generation full text search library for Browser and Node.js
Stars: ✭ 8,108 (+4282.7%)
Mutual labels:  search-engine, elasticsearch
Vectorsinsearch
Dice.com repo to accompany the dice.com 'Vectors in Search' talk by Simon Hughes, from the Activate 2018 search conference, and the 'Searching with Vectors' talk from Haystack 2019 (US). Builds upon my conceptual search and semantic search work from 2015
Stars: ✭ 71 (-61.62%)
Mutual labels:  search-engine, elasticsearch
Fess
Fess is very powerful and easily deployable Enterprise Search Server.
Stars: ✭ 561 (+203.24%)
Mutual labels:  search-engine, elasticsearch
Elasticsuite
Smile ElasticSuite - Magento 2 merchandising and search engine built on ElasticSearch
Stars: ✭ 647 (+249.73%)
Mutual labels:  search-engine, elasticsearch
Elasticsearch Spring Boot Spring Data
🏆 Starter example for using Elasticsearch repository with Springboot
Stars: ✭ 65 (-64.86%)
Mutual labels:  search-engine, elasticsearch
Xapiand
Xapiand: A RESTful Search Engine
Stars: ✭ 347 (+87.57%)
Mutual labels:  search-engine, elasticsearch
Ik Analyzer
支持Lucene5/6/7/8+版本, 长期维护。
Stars: ✭ 112 (-39.46%)
Mutual labels:  search-engine, elasticsearch
Thesaurus Of Job Titles
Open Source Thesaurus of Job Titles in US English
Stars: ✭ 77 (-58.38%)
Mutual labels:  search-engine, elasticsearch
Srchx
A standalone lightweight full-text search engine built on top of blevesearch and Go with multiple storage (scorch, boltdb, leveldb, badger)
Stars: ✭ 118 (-36.22%)
Mutual labels:  search-engine, elasticsearch
Nboost
NBoost is a scalable, search-api-boosting platform for deploying transformer models to improve the relevance of search results on different platforms (i.e. Elasticsearch)
Stars: ✭ 549 (+196.76%)
Mutual labels:  search-engine, elasticsearch
Bertsearch
Elasticsearch with BERT for advanced document search.
Stars: ✭ 684 (+269.73%)
Mutual labels:  search-engine, elasticsearch
Rated Ranking Evaluator
Search Quality Evaluation Tool for Apache Solr & Elasticsearch search-based infrastructures
Stars: ✭ 134 (-27.57%)
Mutual labels:  search-engine, elasticsearch
Klask Io
klask.io is an open source search engine for source code, live demo
Stars: ✭ 45 (-75.68%)
Mutual labels:  search-engine, elasticsearch
Go Cyber
Your 🔵 Superintelligence
Stars: ✭ 270 (+45.95%)
Mutual labels:  search-engine, ipfs
Toshi
A full-text search engine in rust
Stars: ✭ 3,373 (+1723.24%)
Mutual labels:  search-engine, elasticsearch
Gnes
GNES is Generic Neural Elastic Search, a cloud-native semantic search system based on deep neural network.
Stars: ✭ 1,178 (+536.76%)
Mutual labels:  search-engine, elasticsearch
Haystack
🔍 Haystack is an open source NLP framework that leverages Transformer models. It enables developers to implement production-ready neural search, question answering, semantic document search and summarization for a wide range of applications.
Stars: ✭ 3,409 (+1742.7%)
Mutual labels:  search-engine, elasticsearch

Mahuta

Mahuta (formerly known as IPFS-Store) is a library to aggregate and consolidate files or documents stored by your application on the IPFS network. It provides a solution to collect, store, index, cache and search IPFS data handled by your system in a convenient way.

Project status

Service Master Development
CI Status
Test Coverage Coverage Coverage
Bintray Bintray
Docker
Sonar Quality Gate Status

Features

  • Indexation: Mahuta stores documents or files on IPFS and index the hash with optional metadata.
  • Discovery: Documents and files indexed can be searched using complex logical queries or fuzzy/full text search)
  • Scalable: Optimised for large scale applications using asynchronous writing mechanism and caching
  • Replication: Replica set can be configured to replicate (pin) content across multiple nodes (standard IPFS node or IPFS-cluster node)
  • Multi-platform: Mahuta can be used as a simple embedded Java library for your JVM-based application or run as a simple, scalable and configurable Rest API.

Mahuta.jpg


Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Mahuta depends of two components:

  • an IPFS node (go or js implementation)
  • a search engine (currently only ElasticSearch is supported)

See how to run those two components first run IPFS and ElasticSearch

Java library

  1. Import the Maven dependencies (core module + indexer)
<repository>
    <id>consensys-kauri</id>
    <name>consensys-kauri</name>
    <url>https://consensys.bintray.com/kauri/</url>
</repository>
<dependency>
    <groupId>net.consensys.mahuta</groupId>
    <artifactId>mahuta-core</artifactId>
    <version>${MAHUTA_VERSION}</version>
</dependency>
<dependency>
    <groupId>net.consensys.mahuta</groupId>
    <artifactId>mahuta-indexing-elasticsearch</artifactId>
    <version>${MAHUTA_VERSION}</version>
</dependency>
  1. Configure Mahuta to connect to an IPFS node and an indexer
Mahuta mahuta = new MahutaFactory()
    .configureStorage(IPFSService.connect("localhost", 5001))
    .configureIndexer(ElasticSearchService.connect("localhost", 9300, "cluster-name"))
    .defaultImplementation();
  1. Execute high-level operations
IndexingResponse response = mahuta.prepareStringIndexing("article", "## This is my first article")
    .contentType("text/markdown")
    .indexDocId("article-1")
    .indexFields(ImmutableMap.of("title", "First Article", "author", "greg"))
    .execute();
    
GetResponse response = mahuta.prepareGet()
    .indexName("article")
    .indexDocId("article-1")
    .loadFile(true)
    .execute();
    
SearchResponse response = mahuta.prepareSearch()
    .indexName("article")
    .query(Query.newQuery().equals("author", "greg"))
    .pageRequest(PageRequest.of(0, 20))
    .execute();

For more info, Mahuta Java API

Spring-Data

  1. Import the Maven dependencies
<dependency>
    <groupId>net.consensys.mahuta</groupId>
    <artifactId>mahuta-springdata</artifactId>
    <version>${MAHUTA_VERSION}</version>
</dependency>
  1. Configure your spring-data repository
@IPFSDocument(index = "article", indexConfiguration = "article_mapping.json", indexContent = true)
public class Article {
    
    @Id
    private String id;

    @Hash
    private String hash;

    @Fulltext
    private String title;

    @Fulltext
    private String content;

    @Indexfield
    private Date createdAt;

    @Indexfield
    private String createdBy;
}



public class ArticleRepository extends MahutaRepositoryImpl<Article, String> {

    public ArticleRepository(Mahuta mahuta) {
        super(mahuta);
    }
}

For more info, Mahuta Spring Data

HTTP API with Docker

Prerequisites

Docker

$ docker run -it --name mahuta \ 
    -p 8040:8040 \
    -e MAHUTA_IPFS_HOST=ipfs \
    -e MAHUTA_ELASTICSEARCH_HOST=elasticsearch \
    gjeanmart/mahuta

Docker Compose

Check out the documentation to configure Mahuta HTTP-API with Docker.

Examples

To access the API documentation, go to Mahuta HTTP API

Create the index article

  • Sample Request:
curl -X POST \
  http://localhost:8040/mahuta/config/index/article \
  -H 'Content-Type: application/json' 
  • Success Response:

    • Code: 200
      Content:
{
    "status": "SUCCESS"
}

Store and index an article and its metadata

  • Sample Request:
curl -X POST \
  'http://localhost:8040/mahuta/index' \
  -H 'content-type: application/json' \
  -d '{"content":"# Hello world,\n this is my first file stored on **IPFS**","indexName":"article","indexDocId":"hello_world","contentType":"text/markdown","index_fields":{"title":"Hello world","author":"Gregoire Jeanmart","votes":10,"date_created":1518700549,"tags":["general"]}}'
  • Success Response:

    • Code: 200
      Content:
{
  "indexName": "article",
  "indexDocId": "hello_world",
  "contentId": "QmWHR4e1JHMs2h7XtbDsS9r2oQkyuzVr5bHdkEMYiqfeNm",
  "contentType": "text/markdown",
  "content": null,
  "pinned": true,
  "indexFields": {
    "title": "Hello world",
    "author": "Gregoire Jeanmart",
    "votes": 10,
    "createAt": 1518700549,
    "tags": [
      "general"
    ]
  },
  "status": "SUCCESS"
}

Search by query

  • Sample Request:
curl -X POST \
 'http://localhost:8040/mahuta/query/search?index=article' \
 -H 'content-type: application/json' \
 -d '{"query":[{"name":"title","operation":"CONTAINS","value":"Hello"},{"name":"author.keyword","operation":"EQUALS","value":"Gregoire Jeanmart"},{"name":"votes","operation":"GT","value":"5"}]}'
  • Success Response:

    • Code: 200
      Content:
{
  "status": "SUCCESS",
  "page": {
    "pageRequest": {
      "page": 0,
      "size": 20,
      "sort": null,
      "direction": "ASC"
    },
    "elements": [
      {
        "metadata": {
          "indexName": "article",
          "indexDocId": "hello_world",
          "contentId": "Qmd6VkHiLbLPncVQiewQe3SBP8rrG96HTkYkLbMzMe6tP2",
          "contentType": "text/markdown",
          "content": null,
          "pinned": true,
          "indexFields": {
            "author": "Gregoire Jeanmart",
            "votes": 10,
            "title": "Hello world",
            "createAt": 1518700549,
            "tags": [
              "general"
            ]
          }
        },
        "payload": null
      }
    ],
    "totalElements": 1,
    "totalPages": 1
  }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].