From d922c09370e4e7b64cc3b0a0a0a840d9347b4410 Mon Sep 17 00:00:00 2001 From: stjepanB Date: Wed, 16 Mar 2022 12:54:02 +0100 Subject: [PATCH 1/3] Update queary-engine.md changed code error. Variable row was not defined, so I changed it with already existing RowIterator it. --- oak-doc/src/site/markdown/query/query-engine.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oak-doc/src/site/markdown/query/query-engine.md b/oak-doc/src/site/markdown/query/query-engine.md index 13d47dc42a6..911573e748d 100644 --- a/oak-doc/src/site/markdown/query/query-engine.md +++ b/oak-doc/src/site/markdown/query/query-engine.md @@ -587,7 +587,7 @@ Clients wanting to obtain suggestions could use the following JCR code: RowIterator it = result.getRows(); String suggestions = ""; if (it.hasNext()) { - suggestions = row.getValue("rep:suggest()").getString() + suggestions = it.getValue("rep:suggest()").getString() } The `suggestions` String would be have the following pattern @@ -778,4 +778,4 @@ In this case, no escaping is needed. Example patterns are: Patterns are evaluated in alphabetical order. They are only read once, at startup. -See also [OAK-8294](https://issues.apache.org/jira/browse/OAK-8294) \ No newline at end of file +See also [OAK-8294](https://issues.apache.org/jira/browse/OAK-8294) From a7fabaf7f0cfde711585a956c0cb875110b8dac8 Mon Sep 17 00:00:00 2001 From: stjepanB Date: Wed, 16 Mar 2022 13:05:31 +0100 Subject: [PATCH 2/3] Changed code example error Replaced undefined varaible row with it. --- oak-doc/src/site/markdown/query/query-engine.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oak-doc/src/site/markdown/query/query-engine.md b/oak-doc/src/site/markdown/query/query-engine.md index 911573e748d..7403d4fcf67 100644 --- a/oak-doc/src/site/markdown/query/query-engine.md +++ b/oak-doc/src/site/markdown/query/query-engine.md @@ -605,7 +605,7 @@ The `suggestions` String would be have the following pattern RowIterator it = result.getRows(); List suggestions = new LinkedList(); while (it.hasNext()) { - suggestions.add(row.getValue("rep:suggest()").getString()); + suggestions.add(it.getValue("rep:suggest()").getString()); } If either Lucene or Solr were configured to provide the suggestions feature, From 5236a1379ae4f13f9f7c2c4ce753abca953f40e5 Mon Sep 17 00:00:00 2001 From: stjepanB Date: Wed, 16 Mar 2022 13:08:06 +0100 Subject: [PATCH 3/3] Update changed row undefined variable with it --- oak-doc/src/site/markdown/query/query-engine.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oak-doc/src/site/markdown/query/query-engine.md b/oak-doc/src/site/markdown/query/query-engine.md index 7403d4fcf67..d22b8f8106c 100644 --- a/oak-doc/src/site/markdown/query/query-engine.md +++ b/oak-doc/src/site/markdown/query/query-engine.md @@ -536,7 +536,7 @@ Clients wanting to obtain spellchecks could use the following JCR code: RowIterator it = result.getRows(); String spellchecks = ""; if (it.hasNext()) { - spellchecks = row.getValue("rep:spellcheck()").getString() + spellchecks = it.getValue("rep:spellcheck()").getString() } The `spellchecks` String would be have the following pattern `\[[\w|\W]+(\,\s[\w|\W]+)*\]`, e.g.: @@ -551,7 +551,7 @@ The `spellchecks` String would be have the following pattern `\[[\w|\W]+(\,\s[\w RowIterator it = result.getRows(); List spellchecks = new LinkedList(); while (it.hasNext()) { - spellchecks.add(row.getValue("rep:spellcheck()").getString()); + spellchecks.add(it.getValue("rep:spellcheck()").getString()); } If either Lucene or Solr were configured to provide the spellcheck feature, see