Hi all,
I'm using ElasticSearch as a search service in Spring Web project. Now
I'm using Transport Client to communicate with ES.
I'm wondering if there exists a method which can construct a QueryBuilder
from a JSON DSL. for example, convert this bool query DSL JSON
{
"query" : {
"bool" : {
"must" : { "match" : {"content" : "quick"},
"should": { "match": {"content" : "lazy"}
}
}
}
to a QueryBuilder. I need this function because I have to receive
user's bool string input from web front-side, and parse this bool string to
a QueryBuilder.
However it not suit to use
QueryBuilders.boolQuery().must(matchQB).should(shouldQB).must_not(mustNotQB).
Because we may need several must or non must keywords.
PS: Still wondering why javadocs disappeared a while ago. This would be a
great help if javadocs would be available for each version for download.
Am Montag, 15. September 2014 09:22:45 UTC+2 schrieb 张新星:
Hi all,
I'm using Elasticsearch as a search service in Spring Web project.
Now I'm using Transport Client to communicate with ES.
I'm wondering if there exists a method which can construct a QueryBuilder
from a JSON DSL. for example, convert this bool query DSL JSON
{
"query" : {
"bool" : {
"must" : { "match" : {"content" : "quick"},
"should": { "match": {"content" : "lazy"}
}
}
}
to a QueryBuilder. I need this function because I have to receive
user's bool string input from web front-side, and parse this bool string to
a QueryBuilder.
However it not suit to use
QueryBuilders.boolQuery().must(matchQB).should(shouldQB).must_not(mustNotQB).
Because we may need several must or non must keywords.
PS: Still wondering why javadocs disappeared a while ago. This would be a
great help if javadocs would be available for each version for download.
Am Montag, 15. September 2014 09:22:45 UTC+2 schrieb 张新星:
Hi all,
I'm using Elasticsearch as a search service in Spring Web project.
Now I'm using Transport Client to communicate with ES.
I'm wondering if there exists a method which can construct a QueryBuilder
from a JSON DSL. for example, convert this bool query DSL JSON
{
"query" : {
"bool" : {
"must" : { "match" : {"content" : "quick"},
"should": { "match": {"content" : "lazy"}
}
}
}
to a QueryBuilder. I need this function because I have to receive
user's bool string input from web front-side, and parse this bool string to
a QueryBuilder.
However it not suit to use
QueryBuilders.boolQuery().must(matchQB).should(shouldQB).must_not(mustNotQB).
Because we may need several must or non must keywords.
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.