记录生活
标签 Tag : json

ElasticSearch复杂查询DSL使用

<Category: 搜索> 发表评论

测试ES版本0.10.0,ES的Query DSL很灵活,可以实现复杂的查询,这里提供个简单的例子。

curl -XGET 'http://localhost:9200/_all/default/_search?pretty=true' -d '
{
    "explain": true,
    "from": 1,
    "size": 12,
    "fields": [
        "HasExperience",
        "Name"
    ],
    "query": {
        "term": {
            "HasExperience": true,
            "__TENANTID": "100001"
        },
        "range": {
            "Age": {
                "from": 0,
                "to": 100,
                "includeLower": true,
                "includeUpper": true
            }
        }
    }
}
'

阅读这篇文章的其余部分 »

本文来自: ElasticSearch复杂查询DSL使用

[独家]Elastic Search,偶然发现的强悍的搜索引擎

<Category: Lucene, 小道消息> 2 条评论

闲逛,发现了这个好东东,分享下,绝对独家,哈哈。

elasticsearch

Search Engine for the Cloud

Capture6
Capture23Capture7索引目录结构
下载地址:http://www.elasticsearch.com/download/

阅读这篇文章的其余部分 »

本文来自: [独家]Elastic Search,偶然发现的强悍的搜索引擎