How to make a custom type field not queryable?
Hi, how can I make a field not queryable, not indexed?
I've created a custom type.
<extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">
<doctype name="custom:asset" extends="Document">
<schema name="common"/>
<schema name="dublincore"/>
<schema name="custom-asset"/>
</doctype>
</extension>
<extension target="org.nuxeo.ecm.core.schema.TypeService" point="schema">
<schema name="custom-asset" src="schemas/custom-asset.xsd" prefix="customAsset" />
</extension>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:nxs="http://example.com.br/contenttypes/schemas/custom-asset/"
targetNamespace="http://example.com.br/contenttypes/schemas/custom-asset/">
<xs:element name="fieldNotQueryable" type="xs:string"/>
</xs:schema>
Previus version, I could do something like this:
<extension target="org.nuxeo.ecm.core.search.service.SearchServiceImpl" point="resource">
<resource name="custom-asset" prefix="customAsset" indexAllFields="true" type="schema">
<field name="fieldNotQueryable" stored="true" indexed="false" type="Text" binary="false" sortable="true"/>
</resource>
</extension>
Thanks in advance. Fabio
What is the purpose of not making a field queryable? Some kind of security restriction?
You seem to want the field marked not queryable at the CMIS level. There is currently no configuration for this, all fields are queryable.
example: test:uuidRegisterField: 434345-543236-3435878-c3545-6575767
So the user is looking for a product called "c3" and this image that contains the hash value "c3" return.
If you want the field not to be included in full-text results, then that's done through the <excludeField>
configuration you found.
Having the field itself not be marked queryable in CMIS is not possible. But it's a different thing from the above.
Model.inferFulltextInfo
would help if you have source code and a debugger.
Set the VCS Configurations
http://doc.nuxeo.com/display/ADMINDOC/VCS+Configuration
But when we look on the Workbench CMIS the field still Queryable.
Can someone help us ?
Thanks!