Skip to content

Commit

Permalink
SOLR-14419: Ref Guide update for {ref:param}
Browse files Browse the repository at this point in the history
  • Loading branch information
mkhludnev committed Jun 4, 2020
1 parent bab4fcc commit 7c55ba9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions solr/solr-ref-guide/src/json-query-dsl.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ include::{example-source-dir}JsonRequestApiTest.java[tag=solrj-ipod-query-bool-f

== Additional Queries

Multiple additional queries might be specified under `queries` key with all syntax alternatives described above. Every entry might have multiple values in array. Notice that old-style referencing `"{!v=$query_name}"` picks only the first element in array ignoring everything beyond, e.g., if one changes the reference below from `"{!v=$electronic}"` to `"{!v=$manufacturers}"` it's equivalent to querying for `manu:apple`, ignoring the later query. These queries don't impact query result until explicit referencing.
Multiple additional queries might be specified under `queries` key with all syntax alternatives described above. Every entry might have multiple values in array. To reference these queries one can use `{"param":"query_name"}`, as well as old-style referencing `"{!v=$query_name}"`. Beware of arity for these references. Depending on the context, a reference might be resolved into the first element in array ignoring the later elements, e.g., if one changes the reference below from `{"param":"electronic"}` to `{"param":"manufacturers"}` it's equivalent to querying for `manu:apple`, ignoring the later query. These queries don't impact query result until explicit referencing.

[source,bash]
----
Expand All @@ -354,7 +354,7 @@ curl -X POST http://localhost:8983/solr/techproducts/query -d '
{"field": {"f":"manu", "query":"belkin"}}
]
},
"query":"{!v=$electronic}"
"query":{"param":"electronic"}
}'
----

Expand Down

0 comments on commit 7c55ba9

Please sign in to comment.