You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by boxymoron <dr...@hotmail.com> on 2016/02/24 20:33:05 UTC
Issues running native Lucene queries
Hello,
I'm trying to get native Lucene queries working, but get no results.
My Oak version is jcr.repository.version: 1.3.7
I followed the Oak guide here:
https://jackrabbit.apache.org/oak/docs/query/lucene.html#native-query
<https://jackrabbit.apache.org/oak/docs/query/lucene.html#native-query>
I can open the actual Lucene index with LUKE
<https://github.com/tarzanek/luke> and I am able to run the following
query and get one result: merchant_id:merchant-704658
When I run the equivalent query in Sling/OAK I get no results:
SQL
select [jcr:path] from [nt:base] where native('LuceneIndexTest',
'merchant_id:(merchant-704658)')
or XPATH
//*[rep:native('LuceneIndexTest', 'merchant-704658')]
My custom Lucene Index definition looks like this (you can see I specified
the functionName as above):
{
"jcr:primaryType": "oak:QueryIndexDefinition",
"compatVersion": 2,
"functionName": "LuceneIndexTest",
"name": "LuceneIndexTest",
"type": "lucene",
"async": "async",
"evaluatePathRestrictions": true,
"reindex": false,
"reindexCount": 4,
"indexRules": {
"jcr:primaryType": "nt:unstructured",
"nt:base": {
"jcr:primaryType": "nt:unstructured",
"includePropertyTypes": "[String, Date]",
"properties": {
"jcr:primaryType": "nt:unstructured",
"jcr:lastModified": {
"jcr:primaryType": "nt:unstructured",
"ordered": true,
"propertyIndex": true,
"name": "jcr:content/jcr:lastModified",
"type": "Date",
"nodeName": "lastModified"
},
"jcr:primaryType": {
"jcr:primaryType": "nt:unstructured",
"ordered": false,
"propertyIndex": true,
"name": "jcr:primaryType",
"type": "String",
"nodeName": "jcr:primaryType"
},
"merchant_id": {
"jcr:primaryType": "nt:unstructured",
"propertyIndex": true,
"analyzed": true,
"index": true,
"name": "merchant_id"
}
}
},
"oak:Unstructured": {
"jcr:primaryType": "nt:unstructured",
"includePropertyTypes": "[String, Date]",
"properties": {
"jcr:primaryType": "nt:unstructured",
"jcr:lastModified": {
"jcr:primaryType": "nt:unstructured",
"ordered": true,
"propertyIndex": true,
"name": "jcr:content/jcr:lastModified",
"type": "Date",
"nodeName": "lastModified"
},
"jcr:primaryType": {
"jcr:primaryType": "nt:unstructured",
"ordered": false,
"propertyIndex": true,
"name": "jcr:primaryType",
"type": "String",
"nodeName": "jcr:primaryType"
},
"merchant_id": {
"jcr:primaryType": "nt:unstructured",
"propertyIndex": true,
"analyzed": true,
"index": true,
"name": "merchant_id",
"nodeName": "merchant_id"
}
}
}
}
}
It appears that this functionality is not working. I found a related OAK
JIRA ticket <https://issues.apache.org/jira/browse/OAK-2205> and someone
left a message indicating: "The feature would not work with
LucenePropertyIndex due to OAK-2241".
Any suggestions are greatly appreciated.
--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Issues-running-native-Lucene-queries-tp4663703.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.