Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions oak-doc/src/site/markdown/query/query-engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.:
Expand All @@ -551,7 +551,7 @@ The `spellchecks` String would be have the following pattern `\[[\w|\W]+(\,\s[\w
RowIterator it = result.getRows();
List<String> spellchecks = new LinkedList<String>();
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
Expand Down Expand Up @@ -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
Expand All @@ -605,7 +605,7 @@ The `suggestions` String would be have the following pattern
RowIterator it = result.getRows();
List<String> suggestions = new LinkedList<String>();
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,
Expand Down Expand Up @@ -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)
See also [OAK-8294](https://issues.apache.org/jira/browse/OAK-8294)