lucidworks / zeppelin-solr

Apache Solr interpreter for Apache Zeppelin
Apache License 2.0
28 stars 4 forks source link

Use JSON query DSL #39

Open luis100 opened 3 years ago

luis100 commented 3 years ago

Instead of defining the query or facet parameter in URL query format, use query JSON DSL.

For search:

%solr query techproducts
{
  "query" : "name:iPod"
}

And for facet:

%solr query techproducts
{
  "query": "*:*",
  "facet": {
    "categories" : {
      "type": "terms",
      "field": "cat",
      "limit": 3
    }
  }
}
luis100 commented 3 years ago

The JSON query can be interpreted using DirectJsonQueryRequest