Solr 7.1 Features


Here’s an overview of some of the new features in Solr 7.1, the next upcoming minor release in the Solr 7 line:
Download a Solr 7 nightly build to try these features out and give us feedback!

JSON Query Syntax

There is now a JSON mapping to Solr QParsers. Currently, one must use the JSON Request API to use this JSON syntax, but SOLR-11295 will provide a more general purpose entry point to JSON syntax in the future.

The general form of a query type in existing local params syntax is:

 {!query_type param1=val1 param2=val2}query_value

OR, specifying the main query value using the v parameter:

 {!query_type param1=val1 param2=val2 v=query_value}

In the new JSON syntax, the corresponding mappings would be

 {query_type:{param1:val1, param2:val2, v:query_value}}

OR using query (which is a synonym for v when mapping to local params)

 {query_type:{param1:val1, param2:val2, query:query_value}}

 
Here’s an example of a pseudo-join query in local-params syntax that queries for book_review1 and follows the “book_id” field of the result(s) to the matching “id” field:

curl http://localhost:8983/solr/techproducts/query -d 'q={!join from:book_id to:id}id:book_review1'

In JSON syntax (indented for better readability), this would be

curl http://localhost:8983/solr/techproducts/query -d '
{
  query:{
    join:{
      from : book_id,
      to : id,
      query : "id:book_review1"
    }
  }
}'

Note that the query parameter is specified in lucene syntax above, but it can be any query in local-params syntax or JSON syntax. Example:

curl http://localhost:8983/solr/techproducts/query -d '
{
  query:{
    join:{
      from : book_id,
      to : id,
      query : { field : {f:"id", v:"book_review1"} }  // invokes the "field" QParser
    }
  }
}'

 

Integral and date type support for min/max

Min and max aggregations in the JSON Facet API have been updated to include support for int, long, and date types.
Previously, min and max of all of these field types returned double results.

 

IN PROGRESS