You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ct...@apache.org on 2018/03/09 19:24:36 UTC

lucene-solr:branch_7x: Ref Guide: fix rendering of _val_ param in function query example

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x 3b6649faa -> 8463d6af6


Ref Guide: fix rendering of _val_ param in function query example


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

Branch: refs/heads/branch_7x
Commit: 8463d6af6ddce4c70e5846772943e948db270563
Parents: 3b6649f
Author: Cassandra Targett <ct...@apache.org>
Authored: Fri Mar 9 13:23:30 2018 -0600
Committer: Cassandra Targett <ct...@apache.org>
Committed: Fri Mar 9 13:24:26 2018 -0600

----------------------------------------------------------------------
 solr/solr-ref-guide/src/function-queries.adoc | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8463d6af/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 5630e23..32991b3 100644
--- a/solr/solr-ref-guide/src/function-queries.adoc
+++ b/solr/solr-ref-guide/src/function-queries.adoc
@@ -29,7 +29,7 @@ Functions must be expressed as function calls (for example, `sum(a,b)` instead o
 
 There are several ways of using function queries in a Solr query:
 
-* Via an explicit QParser that expects function arguments, such <<other-parsers.adoc#function-query-parser,`func`>> or <<other-parsers.adoc#function-range-query-parser,`frange`>>. For example:
+* Via an explicit query parser that expects function arguments, such <<other-parsers.adoc#function-query-parser,`func`>> or <<other-parsers.adoc#function-range-query-parser,`frange`>>. For example:
 +
 [source,text]
 ----
@@ -58,13 +58,13 @@ the output would be:
 <float name="score">0.343</float>
 ...
 ----
-* Use in a parameter that is explicitly for specifying functions, such as the EDisMax query parser's <<the-extended-dismax-query-parser.adoc#the-extended-dismax-query-parser,`boost`>> param, or DisMax query parser's <<the-dismax-query-parser.adoc#bf-boost-functions-parameter,`bf` (boost function) parameter>>. (Note that the `bf` parameter actually takes a list of function queries separated by white space and each with an optional boost. Make sure you eliminate any internal white space in single function queries when using `bf`). For example:
+* Use in a parameter that is explicitly for specifying functions, such as the eDisMax query parser's <<the-extended-dismax-query-parser.adoc#the-extended-dismax-query-parser,`boost`>> param, or DisMax query parser's <<the-dismax-query-parser.adoc#bf-boost-functions-parameter,`bf` (boost function) parameter>>. (Note that the `bf` parameter actually takes a list of function queries separated by white space and each with an optional boost. Make sure you eliminate any internal white space in single function queries when using `bf`). For example:
 +
 [source,text]
 ----
 q=dismax&bf="ord(popularity)^0.5 recip(rord(price),1,1000,1000)^0.3"
 ----
-* Introduce a function query inline in the lucene QParser with the `\_val_` keyword. For example:
+* Introduce a function query inline in the Lucene query parser with the `\_val_` keyword. For example:
 +
 [source,text]
 ----
@@ -506,11 +506,13 @@ Returns `true` if any member of the field exists.
 
 To give you a better understanding of how function queries can be used in Solr, suppose an index stores the dimensions in meters x,y,z of some hypothetical boxes with arbitrary names stored in field `boxname`. Suppose we want to search for box matching name `findbox` but ranked according to volumes of boxes. The query parameters would be:
 
-`q=boxname:findbox _val_:"product(x,y,z)"`
+[source,text]
+q=boxname:findbox _val_:"product(x,y,z)"
 
 This query will rank the results based on volumes. In order to get the computed volume, you will need to request the `score`, which will contain the resultant volume:
 
-`&fl=*, score`
+[source,text]
+&fl=*, score
 
 Suppose that you also have a field storing the weight of the box as `weight`. To sort by the density of the box and return the value of the density in score, you would submit the following query: