So where is a good java example showing how to use the java api to do a 
simple and condition. I can get this to work work fine with curl but how do 
I use the java api to implement it.

curl -XPOST 10.20.71.30:9200/sessionmsg/_search?pretty -d  '{
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "roomid": "7087"
          }
        },
        {
          "term": {
            "sessionid": "55622"
          }
        }
      ]
      }
    }
  }
}'

how can I implement the above with this kind of call?
SearchResponse response = client.prepareSearch("sessionmsg")
.setSearchType(SearchType.DFS_QUERY_THEN_FETCH)
.setQuery(QueryBuilders.termQuery("roomid", "7087"))
.setFrom(0).setSize(60).setExplain(true).execute().actionGet();


On Tuesday, March 24, 2015 at 8:05:57 AM UTC-4, David Pilato wrote:
>
> Did you look at answer branch?
>
> Answers are on answers branch: 
>> https://github.com/elasticsearchfr/hands-on/tree/answers
>>
>
>
> David
>
> Le 24 mars 2015 à 12:58, 'newbo' via elasticsearch <
> [email protected] <javascript:>> a écrit :
>
> Hey David,
>
> I'm looking at the code now and I see lots of TODOs and nulls, but no 
> actual indexing.  Perhaps that code needs to be cleaned up?
>
> On Thursday, November 15, 2012 at 9:11:02 AM UTC-5, David Pilato wrote:
>>
>>
>> Hi Ryan,
>>
>> Have a look at this: https://github.com/elasticsearchfr/hands-on
>> Answers are on answers branch: 
>> https://github.com/elasticsearchfr/hands-on/tree/answers
>>
>> Some slides (in french but you can understand code) are here: 
>> http://www.slideshare.net/mobile/dadoonet/hands-on-lab-elasticsearch
>>
>> I'm waiting for ES team to merge my Java tutorial: 
>> https://github.com/elasticsearch/elasticsearch.github.com/pull/321
>> It will look like this: 
>> https://github.com/dadoonet/elasticsearch.github.com/blob/9f6dae922247a81f1c72c77769d1dce3ad09dca5/tutorials/_posts/2012-11-07-using-java-api-basics.markdown
>>
>>
>> HTH
>>
>> --
>> David ;-)
>> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
>>
>>  -- 
> 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] <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/elasticsearch/92c7a0f5-ef47-45c2-b121-8c0302fa8c71%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/elasticsearch/92c7a0f5-ef47-45c2-b121-8c0302fa8c71%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
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/6541b592-3e0f-4d6e-8ae3-6e37595d3ee2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to