You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Tommaso Teofili (JIRA)" <ji...@apache.org> on 2017/05/10 14:10:04 UTC

[jira] [Comment Edited] (OAK-6201) Native Query syntax for rep:native unclear

    [ https://issues.apache.org/jira/browse/OAK-6201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16004727#comment-16004727 ] 

Tommaso Teofili edited comment on OAK-6201 at 5/10/17 2:09 PM:
---------------------------------------------------------------

I think your problem relates to the assumption that a (relative) property of a node maps 1:1 with a property of a document in a Lucene index, which is not the case, e.g. properties that are used for full text search will usually have a name like _:fulltext:dc:title_.
On the other hand we need to consider the fact that not all of the users may have knowledge about how information about a certain property is indexed into Lucene (or Solr) therefore it'd be helpful to provide some guidance on how to use native query language depending on configuration of the Oak Lucene index to be used.


was (Author: teofili):
I think your problem relates to the assumption that a (relative) property maps 1:1 with a Lucene index, which is not the case, e.g. properties that are used for full text search will usually have a name like _:fulltext:dc:title_.
On the other hand we need to consider the fact that not all of the users may have knowledge about how information about a certain property is indexed into Lucene (or Solr) therefore it'd be helpful to provide some guidance on how to use native query language depending on configuration of the Oak Lucene index to be used.

> Native Query syntax for rep:native unclear
> ------------------------------------------
>
>                 Key: OAK-6201
>                 URL: https://issues.apache.org/jira/browse/OAK-6201
>             Project: Jackrabbit Oak
>          Issue Type: Documentation
>            Reporter: David Gonzalez
>            Priority: Minor
>
> I was trying to perform a few test queries against an Oak 1.6.x repository using the XPath with the rep:native(..) function and but could not get any to work.
> I suspect my problem is with specifying the field, but i've tried a variety of permutations to no avail. 
> For example, if tried to re-purpose the example XPath query to search over an asset's dc:title [1],
> Generally, i think the documentation [2] is lacking in that 1) unclear on the syntax 2) unclear if i need to do anything special to Oak indexes 3) if only the provided lucene index will service these requests (these are all from a lucene POV, rather than Solr, though assume all the same considerations apply)
> [1] Non-working: {code}
> //element(*, app:Asset)[(rep:native('lucene', 'jcr:contnet/metdata/dc:title:(Hello OR World)'))]
> {code}
> [2] http://jackrabbit.apache.org/oak/docs/query/query-engine.html#Native_Queries



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)