【问题标题】:where is my data in Elastic search我在弹性搜索中的数据在哪里
【发布时间】:2017-10-27 02:56:59
【问题描述】:

我正在尝试使用 Elastic Search,我已经使用文档中提供的 curl 创建了示例数据并将其上传到 ES。

这是我的电影数据。

{ "index" : { "_index": "movies", "_type" : "listings", "_id" : "2" } }
{"director": "Frankenheimer, John", "genre": ["Drama", "Mystery", "Thriller"], "year": 1962, "actor": ["Lansbury, Angela", "Sinatra, Frank", "Leigh, Janet", "Harvey, Laurence", "Silva, Henry", "Frees, Paul", "Gregory, James", "Bissell, Whit", "McGiver, John", "Parrish, Leslie", "Edwards, James", "Flowers, Bess", "Dhiegh, Khigh", "Payne, Julie", "Kleeb, Helen", "Gray, Joe", "Nalder, Reggie", "Stevens, Bert", "Masters, Michael", "Lowell, Tom"], "title": "The Manchurian Candidate"}
{ "index" : { "_index": "movies", "_type" : "listings", "_id" : "3" } }
{"director": "Baird, Stuart", "genre": ["Action", "Crime", "Thriller"], "year": 1998, "actor": ["Downey Jr., Robert", "Jones, Tommy Lee", "Snipes, Wesley", "Pantoliano, Joe", "Jacob, Ir\u00e8ne", "Nelligan, Kate", "Roebuck, Daniel", "Malahide, Patrick", "Richardson, LaTanya", "Wood, Tom", "Kosik, Thomas", "Stellate, Nick", "Minkoff, Robert", "Brown, Spitfire", "Foster, Reese", "Spielbauer, Bruce", "Mukherji, Kevin", "Cray, Ed", "Fordham, David", "Jett, Charlie"], "title": "U.S. Marshals"}
{ "index" : { "_index": "movies", "_type" : "listings", "_id" : "4" } }
{"director": "Ray, Nicholas", "genre": ["Drama", "Romance"], "year": 1955, "actor": ["Hopper, Dennis", "Wood, Natalie", "Dean, James", "Mineo, Sal", "Backus, Jim", "Platt, Edward", "Ray, Nicholas", "Hopper, William", "Allen, Corey", "Birch, Paul", "Hudson, Rochelle", "Doran, Ann", "Hicks, Chuck", "Leigh, Nelson", "Williams, Robert", "Wessel, Dick", "Bryar, Paul", "Sessions, Almira", "McMahon, David", "Peters Jr., House"], "title": "Rebel Without a Cause"}

当我点击 post 命令时,我得到的响应为

{
    "took": 90,
    "errors": false,
    "items": [
        {
            "index": {
                "_index": "movies",
                "_type": "listings",
                "_id": "2",
                "_version": 2,
                "result": "updated",
                "_shards": {
                    "total": 2,
                    "successful": 2,
                    "failed": 0
                },
                "created": false,
                "status": 200
            }
        },
        {
            "index": {
                "_index": "movies",
                "_type": "listings",
                "_id": "3",
                "_version": 2,
                "result": "updated",
                "_shards": {
                    "total": 2,
                    "successful": 2,
                    "failed": 0
                },
                "created": false,
                "status": 200
            }
        }
    ]
}

现在我正在尝试搜索我上传的数据。这是我的查询。

curl -XGET "myEndPoint.us-east-1.es.amazonaws.com/movies/_search?q=rebel"

当我运行它时,我得到如下响应。

{
    "took": 15,
    "timed_out": false,
    "_shards": {
        "total": 5,
        "successful": 5,
        "failed": 0
    },
    "hits": {
        "total": 0,
        "max_score": null,
        "hits": []
    }
}

我尝试通过进入myEndPoint.us-east-1.es.amazonaws.com/_cat/indices?v 来查看数据,它返回给我以下数据。

我想知道我的数据存放在哪里,是否有一些 Dynamo Db 拥有这些数据。

我很困惑如何查询数据(还有多个词要搜索)并查看我的数据在哪里。

【问题讨论】:

    标签: amazon-web-services curl elasticsearch


    【解决方案1】:

    根据分析器...搜索可以区分大小写,您可以在没有查询的情况下进行搜索以检查您的索引。 curl -XGET "myEndPoint.us-east-1.es.amazonaws.com/movies/_search"

    Lucene 将它的索引存储在文件中。 Elasticsearch 跨节点对它们进行分片。当您使用 AWS 搜索服务时,您将无权访问。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-09-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-07
      • 2015-11-03
      • 1970-01-01
      相关资源
      最近更新 更多