As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<model name="dg:dgmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0"> <description>dgMarket model</description> <author>Philipp Anokhin</author> <version>1.0</version> <imports> <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" /> <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" /> </imports> <namespaces> <namespace uri="http://www.dgmarket.com/model/dgModel/1.0" prefix="dg" /> </namespaces> <types> <type name="dg:category"> <title>dg Categotry</title> <parent>cm:content</parent> <properties> <property name="dg:category"> <type>d:text</type> </property> <property name="dg:type"> <type>d:text</type> <default>cpv</default> </property> </properties> </type> <type name="dg:country"> <title>dg Country</title> <parent>cm:content</parent> <properties> <property name="dg:iso"> <type>d:text</type> </property> </properties> </type> <type name="dg:contact"> <title>dg Contact</title> <parent>cm:content</parent> <properties> <property name="dg:contactId"> <type>d:text</type> </property> <property name="dg:contactFirstNames"> <type>d:text</type> </property> <property name="dg:contactLastName"> <type>d:text</type> </property> <property name="dg:contactTitle"> <type>d:text</type> </property> <property name="dg:contactOrganization"> <type>d:text</type> </property> <property name="dg:contactAddress"> <type>d:text</type> </property> <property name="dg:contactAddress2"> <type>d:text</type> </property> <property name="dg:contactCity"> <type>d:text</type> </property> <property name="dg:contactProvince"> <type>d:text</type> </property> <property name="dg:contactPostalCode"> <type>d:text</type> </property> <property name="dg:contactPhone"> <type>d:text</type> </property> <property name="dg:contactFax"> <type>d:text</type> </property> <property name="dg:contactEmail"> <type>d:text</type> </property> <property name="dg:contactUrl"> <type>d:text</type> </property> <property name="dg:contactCountry"> <type>d:noderef</type> </property> </properties> <mandatory-aspects> <aspect>cm:versionable</aspect> </mandatory-aspects> </type> <type name="dg:langProperty"> <title>dg Language Property</title> <parent>cm:content</parent> <properties> <property name="dg:propName"> <type>d:text</type> <mandatory>true</mandatory> </property> <property name="dg:propText"> <type>d:text</type> <– This can be very large <mandatory>false</mandatory> <index enabled="true"> <atomic>true</atomic> <stored>false</stored> <tokenised>true</tokenised> </index> </property> <property name="dg:propLang"> <type>d:text</type> <mandatory>true</mandatory> </property> </properties> </type> <type name="dg:notice"> <title>dg Notice</title> <parent>cm:folder</parent> <properties> <property name="dg:noticeId"> <type>d:text</type> </property> <property name="dg:noticeType"> <type>d:text</type> </property> <property name="dg:noticeLang"> <type>d:text</type> </property> <property name="dg:noticeSubmitted"> <type>d:date</type> </property> <property name="dg:noticeDeadline"> <type>d:datetime</type> </property> <property name="dg:noticeExpiration"> <type>d:date</type> </property> <property name="dg:noticeMethod"> <type>d:text</type> </property> <property name="dg:noticeCity"> <type>d:text</type> </property> <property name="dg:noticePostalCode"> <type>d:text</type> </property> <property name="dg:noticePublisher"> <type>d:text</type> </property> <property name="dg:noticeCountry"> <type>d:noderef</type> </property> <property name="dg:noticeCategory"> <type>d:noderef</type> <multiple>true</multiple> </property> </properties> <associations> <child-association name="dg:noticeContact"> <source> <mandatory>false</mandatory> <many>false</many> </source> <target> <class>dg:contact</class> <mandatory>false</mandatory> <many>false</many> </target> <duplicate>false</duplicate> </child-association> </associations> <mandatory-aspects> <aspect>cm:versionable</aspect> </mandatory-aspects> </type> <type name="dg:buyer"> <title>dg Buyer</title> <parent>cm:folder</parent> <properties> <property name="dg:buyerId"> <type>d:text</type> </property> <property name="dg:buyerType"> <type>d:text</type> </property> <property name="dg:buyerLang"> <type>d:text</type> </property> <property name="dg:buyerCountry"> <type>d:noderef</type> </property> </properties> <associations> <child-association name="dg:buyerContact"> <source> <mandatory>false</mandatory> <many>false</many> </source> <target> <class>dg:contact</class> <mandatory>false</mandatory> <many>false</many> </target> <duplicate>false</duplicate> </child-association> </associations> </type> <type name="dg:site"> <title>dg Site</title> <parent>cm:folder</parent> <properties> <property name="dg:siteName"> <type>d:text</type> </property> </properties> </type> </types> </model>
public static Node addBuyer(Node node, Buyer buyer) throws Exception { Node b = node.addNode("dg:buyers","dg:buyer"); b.setProperty("dg:buyerId",buyer.getId().toString()); b.setProperty("cm:name","buyer:"+buyer.getId().toString()); //print(b); if(buyer.getBuyerTexts()!=null) { Iterator it = buyer.getBuyerTexts().iterator(); while(it.hasNext()) { BuyerText bt = (BuyerText)it.next(); Node lp = b.addNode("dg:langProperties","dg:langProperty"); lp.setProperty("cm:name",bt.getTextType()); lp.setProperty("dg:propName",bt.getTextType()); lp.setProperty("dg:propLang",bt.getLang()); lp.setProperty("dg:propText",bt.getText()); lp.setProperty("cm:content",bt.getText()); //print(lp); } } if(buyer.getBuyerNotices()!=null) { System.out.println("\t\t\t\tNumber of notices is: "+buyer.getBuyerNotices().size()); System.out.flush(); Iterator it = buyer.getBuyerNotices().iterator(); while(it.hasNext()) { Notice notice = (Notice)it.next(); Node n = b.addNode("dg:notices","dg:notice"); n.setProperty("dg:noticeId",notice.getId().toString()); n.setProperty("cm:name","notice:"+notice.getId().toString()); //print(n); if(notice.getNoticeTexts()!=null) { Iterator itt = notice.getNoticeTexts().iterator(); while(itt.hasNext()) { NoticeText nt = (NoticeText)itt.next(); Node lp = n.addNode("dg:langProperties","dg:langProperty"); lp.setProperty("cm:name",nt.getTextType()); lp.setProperty("dg:propName",nt.getTextType()); lp.setProperty("dg:propLang",nt.getLang()); lp.setProperty("dg:propText",nt.getText()); lp.setProperty("cm:content",nt.getText()); //print(lp); } } } } return b; }
I'm trying to do a simple test of loading about 1700 objects (I'll include the complete model and sample code below) and querying them using JCR API (we decided to go with JCR since it seems to becoming a widely adopted standard).So, I wanted to ask 3 questions:1. Is this poor result due to the fact that JCR support is new in Alfresco, so it's going to be changed in near future to be more scalable?2. If we use Alfresco search API instead, will it scale better or the problem is in the model we use: few nodes but many (large text) properties?3. Are there any support (current or planned) in Alfresco's version of JCR search or it's own Lucene search for language-specific search modifiers (e.g. stemming, base letter conversion, fuzzy search)?