[JBoss JIRA] (ARTIF-664) Queries with relationship predicates fail on EAP 6.2-6.4
by Brett Meyer (JIRA)
Brett Meyer created ARTIF-664:
---------------------------------
Summary: Queries with relationship predicates fail on EAP 6.2-6.4
Key: ARTIF-664
URL: https://issues.jboss.org/browse/ARTIF-664
Project: Artificer
Issue Type: Bug
Reporter: Brett Meyer
Assignee: Brett Meyer
Example:
/s-ramp[expandedFromDocument]
JCR-SQL2:
{code}
SELECT artifact1.* FROM [sramp:baseArtifactType] AS artifact1 WHERE
artifact1.[jcr:uuid] IN
(SELECT artifact2.[jcr:uuid] AS uuid FROM [sramp:relationship] AS relationship1
INNER JOIN [sramp:baseArtifactType] AS artifact2 ON ISCHILDNODE(relationship1,artifact2)
WHERE (relationship1.[sramp:relationshipType] = 'expandedFromDocument' AND ISDESCENDANTNODE(relationship1,'/s-ramp')))
AND ISDESCENDANTNODE(artifact1,'/s-ramp') ORDER BY artifact1.[sramp:name] ASC
{code}
The query simply returns nothing. Works perfectly for Wildfly 8
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 9 months
[JBoss JIRA] (ARTIF-260) Free Text Search for artifacts Enhancement
by Brett Meyer (JIRA)
[ https://issues.jboss.org/browse/ARTIF-260?page=com.atlassian.jira.plugin.... ]
Brett Meyer resolved ARTIF-260.
-------------------------------
Resolution: Done
> Free Text Search for artifacts Enhancement
> ------------------------------------------
>
> Key: ARTIF-260
> URL: https://issues.jboss.org/browse/ARTIF-260
> Project: Artificer
> Issue Type: Feature Request
> Components: Client
> Environment: N/A
> Reporter: Cojan van Ballegooijen
> Assignee: Brett Meyer
> Fix For: 1.1.0.Final
>
>
> Support free-text searching through any client. Expand "xp2:matches" to support a "." value.
> /s-ramp[xp2:matches(., '.*foo.*')] == find all artifacts that have "foo" in *any* metadata.
> Further expand the above to include artifact *content*. We'll need to make use of ModeShape full text searching, as well as its support for Tika text extractors.
> In addition, we should consider allowing searches through a content-specific value. Something like: /s-ramp[xp2:matches(@content, '.*foo.*')]
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 9 months
[JBoss JIRA] (ARTIF-656) Cannot query with 2 relationship predicates
by Brett Meyer (JIRA)
[ https://issues.jboss.org/browse/ARTIF-656?page=com.atlassian.jira.plugin.... ]
Brett Meyer resolved ARTIF-656.
-------------------------------
Fix Version/s: 1.1.0.Final
1.0.0.Alpha2
Resolution: Done
> Cannot query with 2 relationship predicates
> -------------------------------------------
>
> Key: ARTIF-656
> URL: https://issues.jboss.org/browse/ARTIF-656
> Project: Artificer
> Issue Type: Bug
> Reporter: Brett Meyer
> Assignee: Brett Meyer
> Fix For: 1.1.0.Final, 1.0.0.Alpha2
>
>
> Example:
> {code}
> /s-ramp/wsdl/Part[relatedDocument[@uuid = '%1$s'] and element]
> {code}
> That currently results in something like:
> {code}
> SELECT artifact1.* FROM [sramp:baseArtifactType] AS artifact1
> INNER JOIN [sramp:relationship] AS relationship2 ON ISCHILDNODE(relationship2,artifact1)
> INNER JOIN [sramp:target] AS target3 ON ISCHILDNODE(target3,relationship2)
> INNER JOIN [sramp:baseArtifactType] AS artifact4 ON target3.[sramp:targetArtifact] = artifact4.[jcr:uuid]
> INNER JOIN [sramp:relationship] AS relationship5 ON ISCHILDNODE(relationship5,artifact1)
> WHERE
> artifact1.[sramp:artifactType] = 'Part'
> AND relationship2.[sramp:relationshipType] = 'relatedDocument'
> AND artifact4.[sramp:uuid] = 'cea13510-e7a6-4195-a18e-c091eb5a939e'
> AND relationship5.[sramp:relationshipType] = 'element'
> AND ISDESCENDANTNODE([sramp:baseArtifactType],'/s-ramp'
> {code}
> Since we use an artifact -> relationship -> target structure, and since ModeShape doesn't allow you to use the selectors transitively (ie, can't use "artifact1" in a subselect), inner joins were the method used. Each time a relationship predicate is hit, the parser assumes "I need to join and add a condition".
> Forgetting the parser, for a moment, I'm not sure what the eventual query should look like...
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 9 months