cancel
Showing results for 
Search instead for 
Did you mean: 

Aspects & indexing

dku_asseco
Champ in-the-making
Champ in-the-making
I've added an aspect to the site (in .js file:
site.node.addAspect("x:newAspect", props) 
). This aspect is defined in the model definition file on the server.

<aspect name="x:newAspect">
            <title>Activity</title>
            <properties>
                <property name="x:actOrganisationUnit">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                    <index enabled="true">
                        <atomic>true</atomic>
                        <stored>false</stored>
                        <tokenised>true</tokenised>
                    </index>
                </property>
[…]
</aspect>


It seems, that Alfresco can't find the site by values of this new aspect. I'm talking about the search in the right upper corner.
The same problem occurs in SiteFinder menu.

What can I do about it?

Regards.

D.


2 REPLIES 2

jayesh_prajapat
Star Contributor
Star Contributor
Hi dku.asseco

Fist confirm the aspect on this node from node browser and then query it from node browser itself.

Hi jayesh.prajapati2010,

The node is visible in node browser and is searchable. I can find it with CMIS_ALFRESCO search and qeury like this.
I can't find it through standard alfresco search.


SearchService pSearchService = serviceRegistry.getSearchService();

SearchParameters pSearchParameters = new SearchParameters();
pSearchParameters.addStore(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
pSearchParameters.setLanguage(SearchService.LANGUAGE_CMIS_ALFRESCO);

ResultSet  pResults = pSearchService.query(aSearchParameters);




"select d.cmis:objectId from st:site as d join x:newAspect as w on d.cmis:objectId = w.cmis:objectId where w.x:actOrganisationUnit LIKE '%" + aTerm + "%'"