Here is how you do it..

QueryBuilder qb = QueryBuilders
.boolQuery()
.must(QueryBuilders.termQuery("roomid","7087") )
.must(QueryBuilders.termQuery("sessionid","55622"));


On Wednesday, November 14, 2012 at 10:04:41 PM UTC-5, Ryan Compton wrote:
>
> I am completely new to Elastic Search. I have figured out enough that I 
> can retrieve jsons from our cluster with:
>
> -bash-3.2$ curl -XGET http://10.10.1.7:9200/twitter-sept/_search -d 
> '{"query":{"bool":{"must":[{"term":{"tweet":"elastic"}}],"must_not":[],"should":[]}},"from":0,"size":50,"sort":[],"facets":{}}'
>
> Since most of my code is in Java I figured things would be easier if I 
> used the Java API. I am completely stumped on how to do it. The guide 
> http://www.elasticsearch.org/guide/reference/java-api/search.html is 
> confusing. What are all those classes? Where are the javadocs? Is there a 
> simple example somewhere that explains how I can reproduce the above 
> command in Java? Do I need a TransportClient, a SearchSourceBuilder, 
> ImmutableSettings?
>

-- 
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/84c0ad1c-7242-49ae-ac2b-3f9ea0d0a619%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to