AnsweredAssumed Answered

How to make FTS queries on custom type on Alfresco 6?

Question asked by easy_bd_infra on Mar 27, 2019
Latest reply on Apr 2, 2019 by easy_bd_infra


I've configured a custom type on Alfresco 6, but I'm not able to make Full Text Searches on custom fields of the custom type.


This is the definition of the field in the "alfresco model manager":

<model xmlns="" name="premsa:ArxiuPremsa">

        <type name="premsa:Noticia">
                <property name="premsa:AP_TITOL">
                    <index enabled="true">
                        <constraint name="premsa:LENGTH_d32b06e3-d845-4337-83be-9dc616d49f20" type="LENGTH">
                            <parameter name="maxLength">
                            <parameter name="minLength">

First I've tried to perform the search in Alfresco Share with simple and advanced searches but they find no documents.


I'm able to perform transactional queries in CMIS like this one and I get 1 document:

SELECT * FROM premsa:Noticia where premsa:AP_TITOL='Llach treu una nova novel· la'

But I'm unable to find this document using FTS queries in CMIS, for example:

SELECT * FROM premsa:Noticia where contains('\'Llach\'')

SELECT * FROM premsa:Noticia where contains('premsa:AP_TITOL:\'Llach\'')

In SOLR, I've enabled the log level org.solr.client.AbstractQParser to DEBUG. And I see the following in the SOLR log corresponding to the last FTS query:

2019-03-27 08:15:51.162 DEBUG (qtp1528637575-17) [   x:alfresco] o.a.s.q.AbstractQParser AFTS QP query as lucene:           +(TYPE:{}Noticia) +(_dummy_:Llach text@s__lt@{}AP_TITOL:{ca}llach)^1000.0

If I perform this Lucene search against SOLR, it retrieves more than 10 results.

Why I'm not seing this results in Alfresco?