All Projects → codelibs → elasticsearch-langfield

codelibs / elasticsearch-langfield

Licence: Apache-2.0 license
This plugin provides a useful feature for multi-language

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to elasticsearch-langfield

Elasticsearch Readonlyrest Plugin
Free Elasticsearch security plugin and Kibana security plugin: super-easy Kibana multi-tenancy, Encryption, Authentication, Authorization, Auditing
Stars: ✭ 917 (+6953.85%)
Mutual labels:  elasticsearch-plugin
Elasticsearch Reindexing
Elasticsearch plugin for reindexing
Stars: ✭ 106 (+715.38%)
Mutual labels:  elasticsearch-plugin
Graph Aided Search
Elasticsearch plugin offering Neo4j integration for Personalized Search
Stars: ✭ 153 (+1076.92%)
Mutual labels:  elasticsearch-plugin
Elasticsearch Analysis Hanlp
Stars: ✭ 39 (+200%)
Mutual labels:  elasticsearch-plugin
Zentity
Entity resolution for Elasticsearch.
Stars: ✭ 97 (+646.15%)
Mutual labels:  elasticsearch-plugin
Performance Analyzer
📈 OpenDistro for Elasticsearch Performance Analyzer
Stars: ✭ 128 (+884.62%)
Mutual labels:  elasticsearch-plugin
Elasticsearch Hq
Monitoring and Management Web Application for ElasticSearch instances and clusters.
Stars: ✭ 4,832 (+37069.23%)
Mutual labels:  elasticsearch-plugin
Elastik Nearest Neighbors
Go to: https://github.com/alexklibisz/elastiknn
Stars: ✭ 249 (+1815.38%)
Mutual labels:  elasticsearch-plugin
Geocluster Facet
Stars: ✭ 101 (+676.92%)
Mutual labels:  elasticsearch-plugin
Esparser
PHP write SQL to convert DSL to query Elasticsearch
Stars: ✭ 142 (+992.31%)
Mutual labels:  elasticsearch-plugin
Elasticsearch Learning To Rank
Plugin to integrate Learning to Rank (aka machine learning for better relevance) with Elasticsearch
Stars: ✭ 1,147 (+8723.08%)
Mutual labels:  elasticsearch-plugin
Syliuselasticsearchplugin
Elasticsearch integration for Sylius apps.
Stars: ✭ 88 (+576.92%)
Mutual labels:  elasticsearch-plugin
Elasticsearch Dataformat
Excel/CSV/BulkJSON downloads on Elasticsearch.
Stars: ✭ 135 (+938.46%)
Mutual labels:  elasticsearch-plugin
Elasticsearch Analysis Dynamic Synonym
elasticsearch同义词热更新插件,支持本地文件更新,http远程文件更新,修复若干bug。
Stars: ✭ 30 (+130.77%)
Mutual labels:  elasticsearch-plugin
Mirage
🎨 GUI for simplifying Elasticsearch Query DSL
Stars: ✭ 2,143 (+16384.62%)
Mutual labels:  elasticsearch-plugin
Gem
💎 GUI for Data Modeling with Elasticsearch
Stars: ✭ 654 (+4930.77%)
Mutual labels:  elasticsearch-plugin
Elasticsearch Analysis Kuromoji Ipadic Neologd
Elasticsearch's Analyzer for Kuromoji with Neologd
Stars: ✭ 109 (+738.46%)
Mutual labels:  elasticsearch-plugin
Elasticsearch
Elasticsearch是一个实时的分布式搜索和分析引擎,
Stars: ✭ 23 (+76.92%)
Mutual labels:  elasticsearch-plugin
Emoji Search
😄 Emoji synonyms to build your own emoji-capable search engine (elasticsearch, solr)
Stars: ✭ 184 (+1315.38%)
Mutual labels:  elasticsearch-plugin
Elastiknn
Elasticsearch plugin for nearest neighbor search. Store vectors and run similarity search using exact and approximate algorithms.
Stars: ✭ 139 (+969.23%)
Mutual labels:  elasticsearch-plugin

Elasticsearch LangField Plugin

Overview

LangField Plugin provides a useful feature for multi-language enrivonment.

Version

Versions in Maven Repository

Issues/Questions

Please file an issue. (Japanese forum is here.)

Installation

For 5.x

$ $ES_HOME/bin/elasticsearch-plugin install org.codelibs:elasticsearch-langfield:5.3.0

For 2.x

$ $ES_HOME/bin/plugin install org.codelibs/elasticsearch-langfield/2.4.1

Getting Started

Create Index for Multi-Languages

First, you need to create index which has fields for multi-languages:

$ curl -XPUT 'localhost:9200/my_index' -d '
{
  "mappings" : {
    "my_type" : {
      "properties" : {
        "message" : {
          "type" : "langstring"
        },
        "message_en" : {
          "type" : "string"
        },
        "message_ja" : {
          "type" : "string"
        }
      }
    }
  },
  "settings" : {
    "index" : {
      "number_of_shards" : "5",
      "number_of_replicas" : "0"
    }
  }
}'

where message_* field is for multi-language. Using message field with "langstring" type, message_* fields are stored automaticaly. The above index-setting JSON is just an example. It's better to specify a proper analyzer for message_* field.

Insert Documents

Insert 2 documents for English and Japanese:

$ curl -XPOST "localhost:9200/my_index/my_type/1" -d '{
  "message":"This is a pen."
}'
$ curl -XPOST "localhost:9200/my_index/my_type/2" -d '{
  "message":"これはペンです。"
}'

message field detects language and then copy the content of message field to a proper message_* field. Check the result with exists filter query:

$ curl -XPOST "http://localhost:9200/my_index/my_type/_search" -d'
{
  "query": {
    "filtered": {
      "query": {
        "match_all": {}
      },
      "filter": {
        "exists": {
          "field": "message_en"
        }
      }
    }
  }
}'
{
  "took": 3,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 5,
    "failed": 0
  },
  "hits": {
    "total": 1,
    "max_score": 1,
    "hits": [
      {
        "_index": "my_index",
        "_type": "my_type",
        "_id": "1",
        "_score": 1,
        "_source": {
          "message": "This is a pen."
        }
      }
    ]
  }
}

Next, check if message_ja field exists:

$ curl -XPOST "http://localhost:9200/my_index/my_type/_search" -d'
{
  "query": {
    "filtered": {
      "query": {
        "match_all": {}
      },
      "filter": {
        "exists": {
          "field": "message_ja"
        }
      }
    }
  }
}'
{
  "took": 2,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 5,
    "failed": 0
  },
  "hits": {
    "total": 1,
    "max_score": 1,
    "hits": [
      {
        "_index": "my_index",
        "_type": "my_type",
        "_id": "2",
        "_score": 1,
        "_source": {
          "message": "これはペンです。"
        }
      }
    ]
  }
}
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].