On 07.07.11 17:41, "Paco Avila" <monkiki@gmail.com> wrote:

I'm also interested in this question. Which alternative is proposed by JCR 2.0 ?

JCR 2.0 provides JCR-SQL2 or better AQM (abstract query model) on top of which one should be able to implement any kind of query language. The idea was that instead of specifying one or multiple specific query language syntaxes (upon which it seems is hard to agree ;-)), it would be better to specify the search semantics using an abstract query tree (as object model in this case). JCR SQL2 is one ootb "serialization" of that tree.

The implementation in Jackrabbit currently does not (yet!?) reflect that approach. The "old" Xpath & JCR-SQL languages are implemented as before, and there is a new & somewhat separate query engine for JCR-SQL2 and the AQM (however I am not up to date with the latest improvements in that area).

Once this new engine is fast enough, it might make sense to build an Xpath to AQM converter (as well as JCR-SQL to AQM) and provide that as something like a jcr-search-commons utility library for use on top of the JCR API. But that's just one idea.

Cheers,
Alex



On Thu, Jul 7, 2011 at 5:38 PM, Alexander Klimetschek <aklimets@adobe.com> wrote:
It is only deprecated in the JCR 2.0 spec (and hence the javax.jcr api
docs), but Jackrabbit will continue to support it, since a lot of apps on
top of Jackrabbit make use of Xpath as the primary query language.

Cheers,
Alex

On 07.07.11 08:21, "g. raaja" <raaja09@gmail.com> wrote:

>Hi,
>
>Its showing Query.XPATH is deprecated and in API its showing
>
>*Deprecated. As of JCR 2.0, this language is deprecated.*
>
>my code is: This is for adding spellcheck
>
>*QueryManager qm = jcrSession.getWorkspace().getQueryManager();
>Query query =
>qm.createQuery("/jcr:root[rep:spellcheck('"+content+"')]/(rep:spellcheck()
>)",
>Query.XPATH);*
>
>and in another condition
>
>*QueryManager qm = jcrSession.getWorkspace().getQueryManager();
>stmt1 ="//element(*,nt:resource)[jcr:contains(.,'"+content+"')]";
>Query q = qm.createQuery(stmt1, Query.XPATH)*;
>
>I am not getting an idea what I have to use instead of this.
>
>Please guide me what to use in the place of this Query.XPATH.
>
>Thanking you.
>
>--raaja g
>
>--
>View this message in context:
>http://jackrabbit.510166.n4.nabble.com/what-we-have-to-use-instead-of-Quer
>y-XPATH-tp3650763p3650763.html
>Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
>



--
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel




--
OpenKM
http://www.openkm.com
http://www.guia-ubuntu.org



-- 
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel