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

Thomas Mueller commented on OAK-1325:
-------------------------------------

Thanks a lot for the patch! A few remarks:

I know we want to support both Lucene and Solr, but I thought both use Lucene 
internally - so couldn't be the query the same for Solr _and_ Lucene? So, for 
example, "native('lucene')" for both? Or is there a case where somebody would 
use both a Lucene index and a Solr index at the same time?

It is unlikely, but legal to create a node called "native('solr')" 
(addNode("native('solr')") works). (the same for "jcr:path", but I think there 
we don't have a choice, we need that for backward compatibility). But here, 
what about using a syntax that is not at the same time a legal node/property 
name (a  non-ambiguous syntax). For example "select [jcr:path] from [nt:base] 
where native('solr') = 'name:(Hello OR World)'. The disadvantage is, we need to 
extend the SQL-2 parser to support the keyword "native", on the other hand you 
also had to change the query engine (ComparisonImpl) and I don't see how we 
could avoid that. The SQL-2 engine would then convert that to an property 
condition that is not a legal property name, for example 
"internal:native('solr')" or ":native('solr')".




> Support native pass-through queries (e.g. Lucene)
> -------------------------------------------------
>
>                 Key: OAK-1325
>                 URL: https://issues.apache.org/jira/browse/OAK-1325
>             Project: Jackrabbit Oak
>          Issue Type: New Feature
>          Components: oak-lucene, oak-solr, query
>            Reporter: Thomas Mueller
>         Attachments: OAK-1325.patch
>
>
> The query engine currently supports XPath and SQL-2 queries as documented by 
> the JCR 2.0 specification. Some queries require syntax that goes beyond the 
> JCR 2.0 spec, even thought the feature is supported by the query index. One 
> example is "MoreLikeThis" in OAK-1286.
> We would like an extension point so that a user of Oak can use the feature of 
> the query index. There are multiple options:
> * Use a separate, custom query language (not XPath or SQL-2)
> * Extend the XPath and/or SQL-2 syntax similar to "rep:excerpt()"



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to