Hello,

I use 
elasticsearch-carrot2<https://github.com/carrot2/elasticsearch-carrot2>and I 
was not able to find how to get cluster result using JAVA API e.g. for

GET _search_with_clusters?pretty=true
{
  "query" : {
   "bool": {
      "must": [
      { "term": { "content": "zeman"}}
    ]
   }
  },
  "query_hint": "vodafone",
  "field_mapping": {
    "url":      ["_source.reference"],
    "title":    ["_source.title"],
    "content":  ["_source.content"]
  }
}


result

{
   "took": 12,
   "timed_out": false,
   "_shards": {
      "total": 49,
      "successful": 49,
      "failed": 0
   },
   "hits": {
      "total": 2080562,
      "max_score": 1,
      "hits": [.....]
   },
   "clusters": [
      {
         "id": 0,
         "score": 4.094963866819582,
         "label": "Možné Scénáře",
         "phrases": [
            "Možné Scénáře"
         ],
         "documents": [
            
"http://www.denik.cz/z_domova/palestinsky-velvyslanec-zemrel-v-nemocnici-na-misto-jede-policejni-sef-cervicek.html#2114206";,
            
"http://www.denik.cz/z_domova/palestinsky-velvyslanec-zemrel-v-nemocnici-na-misto-jede-policejni-sef-cervicek.html#2114186";,
            
"http://www.denik.cz/z_domova/palestinsky-velvyslanec-zemrel-v-nemocnici-na-misto-jede-policejni-sef-cervicek.html#2114174";
         ]
      },
     ....
   ],
   "info": {
      "algorithm": "lingo",
      "search-millis": "11",
      "clustering-millis": "26",
      "total-millis": "38",
      "include-hits": "true"
   }
}


is there any way how call this query using JAVA API?

Thx
Petr

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/7a23e5a5-15ed-40be-80d9-fa93eebc28fe%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to