[
http://jira.magnolia-cms.com/browse/MAGNOLIA-2708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jan Haderka updated MAGNOLIA-2708:
----------------------------------
Fix Version/s: 4.3.x
(was: 4.3.2)
> Implement the jackrabbit spellchecker for the fulltext search
> -------------------------------------------------------------
>
> Key: MAGNOLIA-2708
> URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-2708
> Project: Magnolia
> Issue Type: New Feature
> Reporter: Tom Wespi
> Assignee: Philipp Bärfuss
> Priority: Minor
> Fix For: 4.3.x
>
> Attachments: jackrabbit-spellchecker-1.5.3.jar,
> lucene-spellchecker-2.2.0.jar
>
>
> for workspace.xml:
> <param name="spellCheckerClass"
> value="org.apache.jackrabbit.core.query.lucene.spell.LuceneSpellChecker$OneMinuteRefreshInterval"
> />
> code for the template:
> <%
> String q = request.getParameter("query");
> Query query = MgnlContext.getWebContext().getQueryManager("website")
> .createQuery("/jcr:root[rep:spellcheck('"+q+"')]/(rep:spellcheck())",
> Query.XPATH);
> RowIterator rows =
> ((QueryResultImpl)query.execute()).getJcrResult().getRows();
> // the above query will always return one row no matter what string we check
> Row r = rows.nextRow();
> // get the result of the spell checking
> Value v = r.getValue("rep:spellcheck()");
> if (v == null) {
> // no suggestion returned, the spelling is correct or the spell checker
> // does not know how to correct it.
> } else {
> String suggestion = v.getString();
> out.write("Did you mean <b>" + suggestion + "</b>?");
> }
> %>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------