Sam_4  
                (Sam)
               
                 
              
                  
                    May 9, 2012,  4:37am
                   
                   
              1 
               
             
            
              Hi
how to construct java query equal to given  rest query?
"filter" : {
        "not" : {
    "query" : {
            "query_string" : { "query" : “Account 1 OR Account 2 OR 
 
Account 3 OR Account 4…}
        }
        }
    }
 
please help me?
             
            
               
               
               
            
            
           
          
            
            
              See Elasticsearch Platform — Find real-time answers at scale | Elastic ?
On May 8, 9:37 pm, sam mishra.sam...@gmail.com  wrote:
Hi
how to construct java query equal to given  rest query?
"filter" : {
        "not" : {
    "query" : {
            "query_string" : { "query" : “Account 1 OR Account 2 OR
 
Account 3 OR Account 4…}
        }
        }
    }
 
please help me?
 
             
            
               
               
               
            
            
           
          
            
              
                Ivan  
                (Ivan Brusic)
               
              
                  
                    May 9, 2012,  5:05pm
                   
                   
              3 
               
             
            
              Much of the code uses the builder pattern, so look at the various 
methods of the request classes. For the search request:
https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/search/SearchRequest.java 
There are a few different ways at creating a SearchRequest. I like 
using the static factory methods in the Requets class.
SearchRequest request = 
org.elasticsearch.client.Requests.searchRequest(index).type(type)....
-- 
Ivan
On Tue, May 8, 2012 at 9:37 PM, sam mishra.sameek@gmail.com  wrote:
Hi
how to construct java query equal to given  rest query?
"filter" : {
        "not" : {
    "query" : {
            "query_string" : { "query" : “Account 1 OR Account 2 OR
 
Account 3 OR Account 4…}
        }
        }
    }
 
please help me?
 
             
            
               
               
               
            
            
           
          
            
              
                Ivan  
                (Ivan Brusic)
               
              
                  
                    May 9, 2012,  5:48pm
                   
                   
              4 
               
             
            
              Oops, sorry, I misread your email (multi-tasking fail). You wanted to 
know about constructing an actual query and not just executing.
Follow Eric's link. The builder pattern still applies. Look at the 
various methods under org.elasticsearch.index.query.QueryBuilders.
-- 
Ivan
On Wed, May 9, 2012 at 10:05 AM, Ivan Brusic ivan@brusic.com  wrote:
Much of the code uses the builder pattern, so look at the various 
methods of the request classes. For the search request:
https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/search/SearchRequest.java 
There are a few different ways at creating a SearchRequest. I like 
using the static factory methods in the Requets class.
SearchRequest request = 
org.elasticsearch.client.Requests.searchRequest(index).type(type)....
-- 
Ivan
On Tue, May 8, 2012 at 9:37 PM, sam mishra.sameek@gmail.com  wrote:
Hi
how to construct java query equal to given  rest query?
"filter" : {
        "not" : {
    "query" : {
            "query_string" : { "query" : “Account 1 OR Account 2 OR
 
Account 3 OR Account 4…}
        }
        }
    }
 
please help me?