2 Oct 2007 15:40
Re: spellchecker
Marcel Reutegger <marcel.reutegger <at> gmx.net>
2007-10-02 13:40:11 GMT
2007-10-02 13:40:11 GMT
Ard Schrijvers wrote:
> Just wondering how this interface would look like, and how you are
> planning that the spellchecker is used. I really think it is nice to
> have, but I cannot picture how to use it from for example xpath or sql
> (I suppose it will introduce some "did you mean" option as well when
> searching and you find only hits with a score < min ).
the primary use case is in fact a 'did you mean' functionality.
e.g. if a query does not return the expected results (too few results, or
whatever the application thinks is not appropriate) you would then execute the
following query:
/jcr:root[rep:spellcheck('softeware')]/(rep:spellcheck())
this will always return the root node of the workspace because rep:spellcheck()
with a string always evaluates to true. the string literal is the same as the
one you can pass to a jcr:contains() function. the function rep:spellcheck()
without arguments is a pseudo property which refers to the previous function and
returns a suggestion for the misspelled statement or null if the statement is
correctly spelled.
regards
marcel
RSS Feed