mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.2 to HEAD
8146: Interim checkin for Oracle upgrade scripts. 8150: AR-1905 8151: AR-1956 8152: Correct I18N when reporting patch description 8153: QName script for Oracle along with fixes for unique constraints on assoc tables 8155: Upgrade scripts for Oracle V2.2 - almost there 8164: AWC-1633: Unable to edit rule added via web service 8166: V2.2 upgrade scripts for MySQL and Oracle 8170: AWC-1515: E-mail doesn't reach user's mail box, if it was created with the help of templates 8174: Fix for AWC-798 8180: Fix for AWC-1843 8183: Fixes for different unique index names on alf_child_assoc 8189: AWC-1719: Need to alllow Rules to account for a space being deleted 8249: Fixed handling of empty namespaces on Oracle 8259: Fixes for null namespaces in QName 8360: Modified alf_audit_date columns and added patch 8404: Fix AR-2133: Fix handling of empty namespaces during upgrade git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8481 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -3879,6 +3879,22 @@ public class ADMLuceneTest extends TestCase
|
||||
results = searcher.query(sp);
|
||||
assertEquals(1, results.length());
|
||||
results.close();
|
||||
|
||||
sp = new SearchParameters();
|
||||
sp.addStore(rootNodeRef.getStoreRef());
|
||||
sp.setLanguage("lucene");
|
||||
sp.setQuery("ISNULL:\"" + QName.createQName(TEST_NAMESPACE, "aspectProperty").toString() + "\"");
|
||||
results = searcher.query(sp);
|
||||
assertEquals(1, results.length());
|
||||
results.close();
|
||||
|
||||
sp = new SearchParameters();
|
||||
sp.addStore(rootNodeRef.getStoreRef());
|
||||
sp.setLanguage("lucene");
|
||||
sp.setQuery("ISNOTNULL:\"" + QName.createQName(TEST_NAMESPACE, "aspectProperty").toString() + "\"");
|
||||
results = searcher.query(sp);
|
||||
assertEquals(0, results.length());
|
||||
results.close();
|
||||
|
||||
// Test non field queries
|
||||
|
||||
|
@@ -49,6 +49,7 @@ import org.alfresco.repo.search.impl.lucene.analysis.VerbatimAnalyser;
|
||||
import org.alfresco.repo.search.impl.lucene.query.PathQuery;
|
||||
import org.alfresco.repo.tenant.TenantService;
|
||||
import org.alfresco.service.cmr.dictionary.AspectDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.ClassDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
||||
@@ -507,9 +508,11 @@ public class LuceneQueryParser extends QueryParser
|
||||
PropertyDefinition pd = dictionaryService.getProperty(qname);
|
||||
if (pd != null)
|
||||
{
|
||||
QName container = pd.getContainerClass().getName();
|
||||
ClassDefinition containerClass = pd.getContainerClass();
|
||||
QName container = containerClass.getName();
|
||||
BooleanQuery query = new BooleanQuery();
|
||||
Query typeQuery = getFieldQuery("TYPE", container.toString());
|
||||
String classType = containerClass.isAspect() ? "ASPECT" : "TYPE";
|
||||
Query typeQuery = getFieldQuery(classType, container.toString());
|
||||
Query presenceQuery = getWildcardQuery("@" + qname.toString(), "*");
|
||||
if ((typeQuery != null) && (presenceQuery != null))
|
||||
{
|
||||
@@ -531,9 +534,11 @@ public class LuceneQueryParser extends QueryParser
|
||||
PropertyDefinition pd = dictionaryService.getProperty(qname);
|
||||
if (pd != null)
|
||||
{
|
||||
QName container = pd.getContainerClass().getName();
|
||||
ClassDefinition containerClass = pd.getContainerClass();
|
||||
QName container = containerClass.getName();
|
||||
BooleanQuery query = new BooleanQuery();
|
||||
Query typeQuery = getFieldQuery("TYPE", container.toString());
|
||||
String classType = containerClass.isAspect() ? "ASPECT" : "TYPE";
|
||||
Query typeQuery = getFieldQuery(classType, container.toString());
|
||||
Query presenceQuery = getWildcardQuery("@" + qname.toString(), "*");
|
||||
if ((typeQuery != null) && (presenceQuery != null))
|
||||
{
|
||||
|
@@ -10,9 +10,9 @@
|
||||
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>
|
||||
</imports>
|
||||
|
||||
<namespaces>
|
||||
<namespace uri="http://www.alfresco.org/test/lucenetest" prefix="test"/>
|
||||
</namespaces>
|
||||
<namespaces>
|
||||
<namespace uri="http://www.alfresco.org/test/lucenetest" prefix="test"/>
|
||||
</namespaces>
|
||||
|
||||
<types>
|
||||
<type name="test:testSuperType">
|
||||
@@ -331,6 +331,18 @@
|
||||
<aspect name="test:testAspect">
|
||||
<title>Titled</title>
|
||||
<parent>test:testSuperAspect</parent>
|
||||
<properties>
|
||||
<property name="test:aspectProperty">
|
||||
<type>d:text</type>
|
||||
<mandatory>false</mandatory>
|
||||
<multiple>false</multiple>
|
||||
<index enabled="true">
|
||||
<atomic>true</atomic>
|
||||
<stored>true</stored>
|
||||
<tokenised>true</tokenised>
|
||||
</index>
|
||||
</property>
|
||||
</properties>
|
||||
</aspect>
|
||||
</aspects>
|
||||
|
||||
|
Reference in New Issue
Block a user