You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2017/06/07 14:11:43 UTC

[39/50] [abbrv] lucene-solr:feature/autoscaling: SOLR-10521: documenting sort=childfield(field) asc

SOLR-10521: documenting sort=childfield(field) asc


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/7646f910
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/7646f910
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/7646f910

Branch: refs/heads/feature/autoscaling
Commit: 7646f91097c54890348b2f9dda9cf4e554c3f77d
Parents: 357f4df
Author: Mikhail Khludnev <mk...@apache.org>
Authored: Tue Jun 6 00:27:15 2017 +0300
Committer: Mikhail Khludnev <mk...@apache.org>
Committed: Tue Jun 6 00:31:10 2017 +0300

----------------------------------------------------------------------
 solr/solr-ref-guide/src/function-queries.adoc | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7646f910/solr/solr-ref-guide/src/function-queries.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/function-queries.adoc b/solr/solr-ref-guide/src/function-queries.adoc
index 624406f..7e03ae3 100644
--- a/solr/solr-ref-guide/src/function-queries.adoc
+++ b/solr/solr-ref-guide/src/function-queries.adoc
@@ -86,6 +86,10 @@ The table below summarizes the functions available for function queries.
 |===
 |Function |Description |Syntax Examples
 |abs |Returns the absolute value of the specified value or function. |`abs(x)` `abs(-5)`
+|childfield(field)|Returns the value of the given field for one of the matched child docs when searching by <<other-parsers.adoc#OtherParsers-BlockJoinParentQueryParser,{!parent}>>. It can be used only in `sort` parameter|
+* `sort=childfield(name) asc` implies `$q` as a second argument and therefor it assumes `q={!parent ..}..`;
+* `sort=childfield(field,$bjq) asc` refers to a separate parameter `bjq={!parent ..}..`;
+* `sort=childfield(field,{!parent of=...}...) desc` allows to inline block join parent query 
 |concat(v,f..)|concatenates the given string fields, literals and other functions |`concat(name," ",$param,def(opt,"-"))`
 |"constant" |Specifies a floating point constant. |`1.5`
 |def |`def` is short for default. Returns the value of field "field", or if the field does not exist, returns the default value specified. and yields the first value where `exists()==true`.) |`def(rating,5):` This `def()` function returns the rating, or if no rating specified in the doc, returns 5 `def(myfield, 1.0):` equivalent to `if(exists(myfield),myfield,1.0)`