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"/>

<extension target="org.nuxeo.ecm.core.schema.TypeService" point="schema">
    <schema name="custom-asset" src="schemas/custom-asset.xsd" prefix="customAsset" />

<xs:schema xmlns:xs=""
    <xs:element name="fieldNotQueryable" type="xs:string"/>

Previus version, I could do something like this:

<extension target="" 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"/>

Thanks in advance. Fabio

0 votes

1 answers



Guys here is what we already tried.

Set the VCS Configurations

&lt;repository name=&quot;arizona&quot; factory=&quot;;&gt;

  &lt;pool minPoolSize=&quot;0&quot; maxPoolSize=&quot;20&quot; blockingTimeoutMillis=&quot;100&quot; idleTimeoutMinutes=&quot;10&quot; /&gt;

  &lt;binaryStore path=&quot;/usr/local/nuxeo/nxserver/data-domains/arizona&quot; /&gt;

  &lt;property name=&quot;ServerName&quot;&gt;localhost&lt;/property&gt;
  &lt;property name=&quot;PortNumber&quot;&gt;5432&lt;/property&gt;
  &lt;property name=&quot;DatabaseName&quot;&gt;arizona&lt;/property&gt;
  &lt;property name=&quot;User&quot;&gt;nuxeo&lt;/property&gt;
  &lt;property name=&quot;Password&quot;&gt;nuxeo&lt;/property&gt;

     &lt;fulltext analyzer=&quot;english&quot;&gt;
       &lt;index name=&quot;default&quot;&gt;


But when we look on the Workbench CMIS the field still Queryable.

&quot;Name&quot;,&quot;Id&quot;,&quot;Description&quot;,&quot;Local Namespace&quot;,&quot;Local Name&quot;,&quot;Query Name&quot;,&quot;Type&quot;,&quot;Cardinality&quot;,&quot;Updatability&quot;,&quot;Queryable&quot;,&quot;Orderable&quot;,&quot;Required&quot;,&quot;Inherited&quot;,&quot;Default Value&quot;,&quot;Open Choice&quot;,&quot;Choices&quot;

Can someone help us ?

alt text



This is not an answer, so don't add it as an answer. Instead edit your original question to add details/clarification. I moved this to a comment.

I will remember on my next post.

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.

0 votes

Actually we have some fields that are recorded technical information, which does not have any value to business, so when a user searches for a file he ends up finding files that do not make sense to him.

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.


There are two entirely different things.

If you want the field not to be included in full-text results, then that's done through the &lt;excludeField&gt; 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.


Florent, but why using the excludeField the field still return on CONTAINS('c3') query ? Im using mult repository solution, thats a problem ?

Then maybe the exact syntax used for configuration is wrong… Debugging inside Model.inferFulltextInfo would help if you have source code and a debugger.

I will try debug.