I am using source query as lucene queries to extract records from elastic search database.
Here are some of my queries
While searching with low level client, does it post anything to elastic search db, as in argument I see postdata as parameter passed?
//.LowLevel is of type IElasticLowLevelClient
// Generic parameter of Search<> is the type of .Body on response
var response = client.LowLevel.Search<SearchResponse>("myindex", PostData.Serializable(new
Does using low level queries impact my search results ?
I want to use lucene's query in body while searching and need to make sure I get upto date response.
I want to use lucene's queries to extract data from elastic search, which is best feasbile option?
I see we can use NEST powerful DSL, but i have limited knowledge in creating NEST queries.
3.) How to deal with huge response?
Currently response is stored it in StringResponse and need to handle huge responses as well.
Stringresponse strResponse= esClient.LowLevel.Search(Of StringResponse)(argin_strIndex01,argin_strQuery)
The .NET client does not send request bodies with HTTP GET requests as they are not supported by the underlying HTTP library used, so whenever a request will send a body using PostData, the request will always be a HTTP POST (or a PUT, depending on the operation).
For example, using the low level client exposed on NEST 7.x, the high level client
var client = new ElasticClient();
var searchResponse = client.LowLevel.Search<StringResponse>(PostData.Serializable(new
{
query = new
{
query_string = new
{
default_field = "content",
// Lucene query
query = "this AND that OR thus"
}
}
}));
POST http://localhost:9200/_search
{"query":{"query_string":{"default_field":"content","query":"this AND that OR thus"}}}
You can use the low level or high level client, it's up to you. The difference between them is that the latter has types for all requests and responses. and documents can be modelled with Plain Old CLR Objects (POCOs), making it easier to develop with.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.