concept subquerie in category solr

This is an excerpt from Manning's book Relevant Search: With applications for Solr and Elasticsearch.
As you build up the subqueries corresponding to your signals, it’s important to test each query in isolation, as you did in chapter 7. This simplifies the work required when combining these pieces into an overarching query, because you’ll be able to focus on the higher-level signal rather than worrying that the base signals aren’t appropriately balanced. Test queries by indexing a realistic set of documents and then running through each query to ensure that it measures the expected information. In this case, you test the location filter and query by making sure that only restaurants within the bounding box are returned, and that they’re returned in order of increasing distance.

This is an excerpt from Manning's book Solr in Action.
You’ll undoubtedly encounter content on the web about doing document joins in Solr. We’ll address this functionality in detail in chapter 15. For now, it’s important to understand that Solr joins are more like subqueries in SQL than joins. A typical use case is to find the parent documents of child documents that match your search criteria. In our example microblog application, for example, we could use Solr joins to bring back the original post instead of retweets.
Listing 8.6. Running multiple queries to obtain document counts for subqueries
http://localhost:8983/solr/restaurants/select?q=*:*&fq=price:[5 TO 25] ... "response":{"numFound":11 ... http://localhost:8983/solr/restaurants/select?q=*:*&fq=price:[5 TO 25]& fq=state:("New York" OR "Georgia" OR "South Carolina") ... "response":{"numFound":5 ... http://localhost:8983/solr/restaurants/select?q=*:*&fq=price:[5 TO 25]& fq=state:("Illinois" OR "Texas") ... "response":{"numFound":3 ... http://localhost:8983/solr/restaurants/select?q=*:*&fq=price:[5 TO 25]& fq=state:("California") ... "response":{"numFound":3 ...The example demonstrates the most brute-force method for finding search result counts for subqueries in Solr—running each subquery as a separate search and seeing how many results are found. Although the pain may not seem enormous in this small, contrived example, it’s nevertheless unnecessary. The following listing demonstrates how such a query can be easily combined into a single query using query facets.