I change property by adding tokenised as follows:
<property name="sci:doc">
<type>d:text</type>
<index enabled="true">
<atomic>true</atomic>
<stored>false</stored>
<tokenised>false</tokenised>
</index>
</property>
After fully rebuilding the index and restarting alfresco I searched in node browser using Lucene like this:
PATH:"/app:company_home/app:guest_home/cm:mySpace/*" AND (#sci\:doc:'my doc')
But no result was returned. I also tried (#sci\:doc:'my') OR (#sci\:doc:'doc'). This all failed.
I'm using 3.4.d. I found any property that sets <tokenised> to false has this issue: Search always returns nothing!
I tried alfresco-fts search in node browser, it works for the tokenized property above, but I'm using Alfresco web service, the default QUERY_LANG_LUCENE is lucene. I cannot switch to alfresco-fts.
Any idea how to solve this?
Related
How is this done in OpenUI 5 / SAPUI5?
given the following
<MainNavigation>
<Link>
<property name="Name">Clinical Overview</property>
<property name="command">showTeachingPoints</property>
<property name="autoSelect">true</property>
</Link>
<Link>
<property name="command">showDevices</property>
<property name="Name">Equipment</property>
</Link>
</MainNavigation>
And trying to fill out the text property for the following:
<tnt:SideNavigation expanded="true" itemSelect="onItemSelect">
<tnt:NavigationList id="sideMenu" items="{/MainNavigation/Link}">
<tnt:NavigationListItem text="{property/[#name='Name']/text()}" />
</tnt:NavigationList>
</tnt:SideNavigation>
The goal should be to display the Name of each property (so Clinical Overview, Equipment, etc...) but the query is not working.
Also I've tried:
{property/[#name='Name']/text()}
{property/[name='Name']/text()}
{property/['#name='Name'']/text()}
{property[#name='Name']/text()}
The only way that's worked has been
{property}
However that will only display whatever is first in the collection of property nodes. I want to know how to get at a specific node since I want to use the other nodes for different purposes (default selection, function callback names, etc...)
edited to clarify:
The list should contain:
Clinical Overview
Equipment
Using {property/#name} the list would be:
Name
command
Granted this is not what I'm looking for but it shares the same problem as {property} in that it returns only the first item under <Link> when I may want the second or third.
This xpath query works in other places /UI/MainNavigation/Link/property[#name='Name']/text() and I would just like to how to translate that into OpenUI.
This should do the trick:
<tnt:SideNavigation expanded="true" itemSelect="onItemSelect">
<tnt:NavigationList id="sideMenu" items="{/MainNavigation/Link}">
<tnt:NavigationListItem text="{property/#name}" />
</tnt:NavigationList>
</tnt:SideNavigation>
More info in the docs about Binding Path Syntax for XML Models.
For attributes, a special selector using the "#" character exists and "text()" can be used to reference the content text of an element. Lists are referenced by using the path to the multiple element.
BR Chris
I am trying to add a new view in our application. For time being adding this view as the first page in the app. Created necessary OSLC resources in maximo and also verified that I am able to view the data by hitting the URL (ip,userid,pw removed intentionally).
http://{ipaddress}:7001/maximo/oslc/os/ABS_VERI_POINTS?_lid={maximoadminuser}&_lpwd={maximoadminpw}&oslc.select=*
I have also added the view and the resources in app.xml file but when I am logging in to the application it gives me the following message
"WorkList Record Could Not be Downloaded. If Problem persists, Contact your administrator"
After than it landed up into the view with No data. Upon inspecting the UI in browser I noticed I am getting the following error
Procedure invocation error. Runtime: Failed to parse JSON string
Error 404--Not Found
....
....
Resource Data in app.xml is as follows
<resource describedBy="http://jazz.net/ns/ism/asset/smarter_physical_infrastructure#ABS_VERI_POINTS" id="resabsVP" name="resabsVP" providedBy="/oslc/sp/SmarterPhysicalInfrastructure">
<attributes id="absVPAttrs">
<attribute describedByProperty="spi:parent" id="vpparent" name="parent"/>
<attribute describedByProperty="spi:location" id="vplocation" name="location"/>
<attribute describedByProperty="spi:assetnum" id="vpassetnum" name="assetnum"/>
<!-- attribute describedByProperty="spi:abs_verification_pointsid" id="vpabsvpid" name="absvppointsid" -->
<attribute describedByProperty="spi:taskid" id="vptaskid" name="taskid"/>
<attribute describedByProperty="spi:description" id="vpdescription" name="description"/>
<attribute describedByProperty="spi:wonum" id="vpwonum" name="wonum"/>
</attributes>
<queryBases id="absvpqry">
<queryBase id="absvpqry1" name="getabsvp" queryUri="oslc/os/ABS_VERI_POINTS" />
</queryBases>
</resource>
View in app.xml as follows
<view id="absVPview" label="ABS Verification Points">
<requiredResources id="absVPAttrs11">
<requiredResource name="resabsVP" id="resabsVP11">
<requiredAttribute id="vpdescription1" name="description"/>
<requiredAttribute id="vpwonum1" name="wonum"/>
<requiredAttribute id="vpparent1" name="parent"/>
</requiredResource>
</requiredResources>
<list id="VP.abs_veri_points_list" resource="resabsVP" >
<listItemTemplate id="VP.abs_veri_points_list_listItemTemplate" layout="InspectionListItem">
<listtext id="VP.abs_veri_points_list_vpid" resourceAttribute="description" layoutInsertAt="item1"/>
<listtext id="VP.abs_veri_points_list_wonum" resourceAttribute="wonum" layoutInsertAt="item2"/>
<listtext id="VP.abs_veri_points_list_parenttext" resourceAttribute="parent" layoutInsertAt="item3"/>
</listItemTemplate>
</list>
</view>
Can you please give any clue whats going wrong here
Can you open a PMR on this with our support? This may be a bug where we're not correctly handling underscores in our OSLC request url to retrieve data. Also, check the URL that is failing in your javascript console, just to make sure that it's really this resource throwing the 404 exception. You might check the network tab of the debugger to see that.
#MDutta,
If the issue is in the object/attribute using underscore ("_"), you can fix this by updating the xsd validation file located at ..\Anywhere\lib\codegen\artifac-processor-7.5.2.jar.
Unzip this file and open the app.xsd located: ..\resource\xsd\app.xsd. Modify the validation
From:
<xs:simpleType name="string">
<xs:restriction base="xs:string">
<xs:pattern value="[a-zA-Z][a-zA-Z0-9]+"/>
</xs:restriction>
</xs:simpleType>
To:
~dk
I am trying to update SearchableText on my dexterity type ("Resource"), to include file contents from child items, by adding this to resource.py:
#indexer(IResource)
def subFiles(obj):
searchable_text = obj.SearchableText()
for item in obj.getFolderContents({'portal_type': 'File'}, full_object=True):
searchable_text += item.SearchableText()
return searchable_text
grok.global_adapter(subFiles, name="SearchableText")
I know I need an event to update this, but believe I should be able to see the index modified by manually "clearing and rebuilding" from the ZMI, however no changes take place on the value of SearchableText for objects of this content type. I am not seeing any errors either, so I am not sure where the problem lies.
Well, I did not recognise here, that you are using dexterity.
You need the dexteritytextindexer behavior:
https://github.com/collective/collective.dexteritytextindexer
Enable this on your container type.
<property name="behaviors">
<element value="collective.dexteritytextindexer.behavior.IDexterityTextIndexer" />
</property>
With the dexteritytextindexer you have a different approach to index the data on your container. Check the dexteritytextindexer.IDynamicTextIndexExtender.
I am trying to configure cd_storage and getting issue in setting up dynamic component presentation as they get over written by child and published to same folder from every publication.
I know we can define the publication level settings but once we define that then it expect us to define everything inside that publication tag. We do not want to define every thing 50 times in publication tag.
Could any one suggest the best practice for same.
this is for sdl tridion 2011 sp1
Thanks in advance...
Your problem is in how you defined your storage configuration for the storage which you use to store ComponentPresentations. There is a flag in the definition of a storage which sets exactly this type of behavior: defaultFilesystem. You probably have it set to false which causes all ComponentPresentations from all publications to be stored in the same location. By setting this flag to true you will get ComponentPresentations from different publications stored in different locations. I will give an example to show how this works in cd_storage_conf.xml:
<Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="defaultCPs" defaultFilesystem="true">
<Root Path="c:\temp\cpRoot" />
</Storage>
....
<ItemTypes defaultStorageId="defaultFile" cached="true">
<Item typeMapping="ComponentPresentation" itemExtension=".jsp" storageId="defaultCPs"/>
....
This is really easy to maintain and will make the Broker to store ComponentPresentations to locations like: c:\temp\cpRoot\pub109\dcp\jsp\*** (here I have publicationId=109).
Hope this helps.
I want to create a catalog metadata with a computed string. So following Aspeli's book and the developer manual I proceeded to create an indexer:
# indexer.py
#grok.adapter(Entry, name='bind_representation')
#indexer(Entry)
def bindIndexer(context):
print str(IBindRepresentable(context))
return str(IBindRepresentable(context))
and register the index with genericSetup:
<!-- profiles/default/catalog.xml -->
<?xml version="1.0"?>
<object name="portal_catalog" meta_type="Plone Catalog Tool">
<index name="bind_representation" meta_type="ZCTextIndex">
<!-- I tried with meta_type="FieldIndex" too -->
<indexed_attr value="bind_representation"/>
<!-- copied from other text metadata -->
<extra name="index_type" value="Okapi BM25 Rank"/>
<extra name="lexicon_id" value="plaintext_lexicon"/>
</index>
</object>
The problems are: (1) only the index is registered, not the metadata, and (2) After reindex all the zodb, bind_representation still doesn't find any entry to index, even when they are.
The examples cited only deal with pre-existent indexes, so I'm not sure about the content of catalog.xml. bindIndexer seems not to be called at all, since its print statement is never executed. I copied bindIndexer to entry.py too, to get sure it wasn't being ignored, but still nothing.
What am I missing?
Thanks.
1- In order to add a new metadata, you have to use this syntax:
<?xml version="1.0"?>
<object name="portal_catalog" meta_type="Plone Catalog Tool">
...
<column value="bind_representation"/>
</object>
2a- you are adapting your content class, you should adapt your content interface (IEntry most likely).
2b- you are using a ZCTextIndex: that index won't show you all entries anyway (even following the previous point) because it's based on a lexicon. You should probably use this instead (unless you have specific bounds):
<index name="bind_representation" meta_type="FieldIndex">
<indexed_attr value="bind_representation"/>
</index>
More info:
http://bluebream.zope.org/doc/1.0/manual/componentarchitecture.html#adapters
http://maurits.vanrees.org/weblog/archive/2009/12/catalog