Hello,
I am stuck with some weird results on Alfresco FTS search queries using Solr 6 and my custom alfresco model with d:text properties defined with Indexing Free Text.
Looking at my alfresco model the property "edm:dxuid" is defined as:
<property name="edm:dxuid">
<index enabled="true">
<tokenised>TRUE</tokenised>
<facetable>false</facetable>
</index>
</property>
In the Alfresco Solr schema this maps to the dynamic field "text@s__lt@":
"text@s__lt@{http://www.doc-process.com/model/eArchiveDocumentModel/1.0}dxuid"
<fieldType name="alfrescoFieldType" class="org.alfresco.solr.AlfrescoFieldType" />
<dynamicField name="text@s__lt@*" type="alfrescoFieldType" indexed="true" omitNorms="false" stored="false" multiValued="false" />I have no clue how the alfrescoFieldType tokenises my values and when I try to run the analyzer on Solr Admin Console with alfrescoFieldType I get a NullPointerException:
2020-03-18 15:07:41.666 INFO (qtp1151020327-15) [ x:alfresco] o.a.s.c.S.Request [alfresco] webapp=/solr path=/analysis/field params={analysis.fieldvalue=DX01&analysis.showmatch=true&wt=json&analysis.fieldtype=alfrescoFieldType&_=1584544061607} status=500 QTime=9
2020-03-18 15:07:41.670 ERROR (qtp1151020327-15) [ x:alfresco] o.a.s.s.HttpSolrCall null:java.lang.NullPointerException
at org.alfresco.solr.AlfrescoAnalyzerWrapper.getWrappedAnalyzer(AlfrescoAnalyzerWrapper.java:76)My Solr core is created using the rerank solr template and I am not sure if this could have an impact on my unexpected behavior or not.
I can reproduce the same wrong behavior with
Alfresco Community 5.2.0 (re21f2be5-b22) / Alfresco Search Services 1.1.0 (Solr 6.3.0) 1.2.2 (Solr 6.6.0) 1.3.0.9 (Solr 6.6.5)
All my documents are indexing metadata only (content indexing is disabled)
When I use the current model with edm:dxuid defined as Free Text in Alfresco I get the following results:
e.g. my property values are of the form edm:dxuid
X01_099_20200117_04994145
qt: /afts
q: edm:dxuid:*
Hits=4751 <--- CORRECT VALUE !!!
2020-03-18 15:13:26.853 DEBUG (qtp1151020327-16) [ x:alfresco] o.a.s.c.S.Request [alfresco] webapp=/solr path=/afts params={q=edm:dxuid:*&indent=true&wt=json&_=1584544406795}
2020-03-18 15:13:26.855 DEBUG (qtp1151020327-16) [ x:alfresco] o.a.s.q.AbstractQParser AFTS QP query as lucene: (PROPERTIES:{http://www.doc-process.com/model/eArchiveDocumentModel/1.0}dxuid)^1.0
2020-03-18 15:13:26.856 DEBUG (qtp1151020327-16) [ x:alfresco] o.a.s.q.AbstractQParser AFTS QP query as lucene: (content@s__lt@{http://www.alfresco.org/model/content/1.0}content:{en}rerank_query_from_context)^1.0
2020-03-18 15:13:26.856 DEBUG (qtp1151020327-16) [ x:alfresco] o.a.s.h.c.QueryComponent process: carrot.url=id&spellcheck.collateExtendedResults=true&indent=true&carrot.produceSummary=true&spellcheck.maxCollations=3&spellcheck.maxCollationTries=5&spellcheck.alternativeTermCount=2&spellcheck.extendedResults=false&hl.qparser=rrafts&q=edm:dxuid:*&defType=afts&spellcheck.maxResultsForSuggest=5&rqq={!rrafts}RERANK_QUERY_FROM_CONTEXT&spellcheck=false&carrot.outputSubClusters=false&spellcheck.count=5&wt=json&carrot.title=mltext@m___t@{http://www.alfresco.org/model/content/1.0}title&carrot.snippet=content@s___t@{http://www.alfresco.org/model/content/1.0}content&_=1584544406795&spellcheck.collate=true&rq={!alfrescoReRank+reRankQuery%3D$rqq+reRankDocs%3D500+scale%3Dtrue+reRankWeight%3D3}
2020-03-18 15:13:26.856 DEBUG (qtp1151020327-16) [ x:alfresco] o.a.s.s.s.LocalStatsCache ## GET {carrot.url=id&spellcheck.collateExtendedResults=true&indent=true&carrot.produceSummary=true&spellcheck.maxCollations=3&spellcheck.maxCollationTries=5&spellcheck.alternativeTermCount=2&spellcheck.extendedResults=false&hl.qparser=rrafts&q=edm:dxuid:*&defType=afts&spellcheck.maxResultsForSuggest=5&rqq={!rrafts}RERANK_QUERY_FROM_CONTEXT&spellcheck=false&carrot.outputSubClusters=false&spellcheck.count=5&wt=json&carrot.title=mltext@m___t@{http://www.alfresco.org/model/content/1.0}title&carrot.snippet=content@s___t@{http://www.alfresco.org/model/content/1.0}content&_=1584544406795&spellcheck.collate=true&rq={!alfrescoReRank+reRankQuery%3D$rqq+reRankDocs%3D500+scale%3Dtrue+reRankWeight%3D3}}
2020-03-18 15:13:26.856 INFO (qtp1151020327-16) [ x:alfresco] o.a.s.c.S.Request [alfresco] webapp=/solr path=/afts params={q=edm:dxuid:*&indent=true&wt=json&_=1584544406795} hits=4751 status=0 QTime=3
2020-03-18 15:13:26.857 DEBUG (qtp1151020327-16) [ x:alfresco] o.a.s.s.HttpSolrCall Closing out SolrRequest: {carrot.url=id&spellcheck.collateExtendedResults=true&indent=true&carrot.produceSummary=true&spellcheck.maxCollations=3&spellcheck.maxCollationTries=5&spellcheck.alternativeTermCount=2&spellcheck.extendedResults=false&hl.qparser=rrafts&q=edm:dxuid:*&defType=afts&spellcheck.maxResultsForSuggest=5&rqq={!rrafts}RERANK_QUERY_FROM_CONTEXT&spellcheck=false&carrot.outputSubClusters=false&spellcheck.count=5&wt=json&carrot.title=mltext@m___t@{http://www.alfresco.org/model/content/1.0}title&carrot.snippet=content@s___t@{http://www.alfresco.org/model/content/1.0}content&_=1584544406795&spellcheck.collate=true&rq={!alfrescoReRank+reRankQuery%3D$rqq+reRankDocs%3D500+scale%3Dtrue+reRankWeight%3D3}}
=-=-=-=-=-=-=-=
qt: /afts
q: edm:dxuid:*DX01*
Hits: 1000 <--- WRONG VALUE !!! EXPECTED VALUE = 4751 !!!
2020-03-18 15:15:49.346 DEBUG (qtp1151020327-20) [ x:alfresco] o.a.s.c.S.Request [alfresco] webapp=/solr path=/afts params={q=edm:dxuid:*DX01*&indent=true&wt=json&_=1584544549264}
2020-03-18 15:15:49.351 DEBUG (qtp1151020327-20) [ x:alfresco] o.a.s.q.AbstractQParser AFTS QP query as lucene: (_dummy_:*DX01* text@s__lt@{http://www.doc-process.com/model/eArchiveDocumentModel/1.0}dxuid:{en}*dx01*)^1.0
2020-03-18 15:15:49.352 DEBUG (qtp1151020327-20) [ x:alfresco] o.a.s.q.AbstractQParser AFTS QP query as lucene: (content@s__lt@{http://www.alfresco.org/model/content/1.0}content:{en}rerank_query_from_context)^1.0
2020-03-18 15:15:49.352 DEBUG (qtp1151020327-20) [ x:alfresco] o.a.s.h.c.QueryComponent process: carrot.url=id&spellcheck.collateExtendedResults=true&indent=true&carrot.produceSummary=true&spellcheck.maxCollations=3&spellcheck.maxCollationTries=5&spellcheck.alternativeTermCount=2&spellcheck.extendedResults=false&hl.qparser=rrafts&q=edm:dxuid:*DX01*&defType=afts&spellcheck.maxResultsForSuggest=5&rqq={!rrafts}RERANK_QUERY_FROM_CONTEXT&spellcheck=false&carrot.outputSubClusters=false&spellcheck.count=5&wt=json&carrot.title=mltext@m___t@{http://www.alfresco.org/model/content/1.0}title&carrot.snippet=content@s___t@{http://www.alfresco.org/model/content/1.0}content&_=1584544549264&spellcheck.collate=true&rq={!alfrescoReRank+reRankQuery%3D$rqq+reRankDocs%3D500+scale%3Dtrue+reRankWeight%3D3}
2020-03-18 15:15:49.353 DEBUG (qtp1151020327-20) [ x:alfresco] o.a.s.s.s.LocalStatsCache ## GET {carrot.url=id&spellcheck.collateExtendedResults=true&indent=true&carrot.produceSummary=true&spellcheck.maxCollations=3&spellcheck.maxCollationTries=5&spellcheck.alternativeTermCount=2&spellcheck.extendedResults=false&hl.qparser=rrafts&q=edm:dxuid:*DX01*&defType=afts&spellcheck.maxResultsForSuggest=5&rqq={!rrafts}RERANK_QUERY_FROM_CONTEXT&spellcheck=false&carrot.outputSubClusters=false&spellcheck.count=5&wt=json&carrot.title=mltext@m___t@{http://www.alfresco.org/model/content/1.0}title&carrot.snippet=content@s___t@{http://www.alfresco.org/model/content/1.0}content&_=1584544549264&spellcheck.collate=true&rq={!alfrescoReRank+reRankQuery%3D$rqq+reRankDocs%3D500+scale%3Dtrue+reRankWeight%3D3}}
2020-03-18 15:15:49.359 INFO (qtp1151020327-20) [ x:alfresco] o.a.s.c.S.Request [alfresco] webapp=/solr path=/afts params={q=edm:dxuid:*DX01*&indent=true&wt=json&_=1584544549264} hits=1000 status=0 QTime=13
2020-03-18 15:15:49.360 DEBUG (qtp1151020327-20) [ x:alfresco] o.a.s.s.HttpSolrCall Closing out SolrRequest: {carrot.url=id&spellcheck.collateExtendedResults=true&indent=true&carrot.produceSummary=true&spellcheck.maxCollations=3&spellcheck.maxCollationTries=5&spellcheck.alternativeTermCount=2&spellcheck.extendedResults=false&hl.qparser=rrafts&q=edm:dxuid:*DX01*&defType=afts&spellcheck.maxResultsForSuggest=5&rqq={!rrafts}RERANK_QUERY_FROM_CONTEXT&spellcheck=false&carrot.outputSubClusters=false&spellcheck.count=5&wt=json&carrot.title=mltext@m___t@{http://www.alfresco.org/model/content/1.0}title&carrot.snippet=content@s___t@{http://www.alfresco.org/model/content/1.0}content&_=1584544549264&spellcheck.collate=true&rq={!alfrescoReRank+reRankQuery%3D$rqq+reRankDocs%3D500+scale%3Dtrue+reRankWeight%3D3}}
=-=-=-=-=-=-=-=
qt: /afts
q: edm:dxuid:*DX01_0*
Hits: 1000 <--- WRONG VALUE !!! EXPECTED VALUE = 3113 !!!
2020-03-18 15:19:40.475 DEBUG (qtp1151020327-11) [ x:alfresco] o.a.s.c.S.Request [alfresco] webapp=/solr path=/afts params={q=edm:dxuid:*DX01_0*&indent=true&wt=json&_=1584544780434}
2020-03-18 15:19:40.479 DEBUG (qtp1151020327-11) [ x:alfresco] o.a.s.q.AbstractQParser AFTS QP query as lucene: (_dummy_:*DX01_0* text@s__lt@{http://www.doc-process.com/model/eArchiveDocumentModel/1.0}dxuid:{en}*dx01_0*)^1.0
2020-03-18 15:19:40.604 DEBUG (qtp1151020327-11) [ x:alfresco] o.a.s.q.AbstractQParser AFTS QP query as lucene: (content@s__lt@{http://www.alfresco.org/model/content/1.0}content:{en}rerank_query_from_context)^1.0
2020-03-18 15:19:40.605 DEBUG (qtp1151020327-11) [ x:alfresco] o.a.s.h.c.QueryComponent process: carrot.url=id&spellcheck.collateExtendedResults=true&indent=true&carrot.produceSummary=true&spellcheck.maxCollations=3&spellcheck.maxCollationTries=5&spellcheck.alternativeTermCount=2&spellcheck.extendedResults=false&hl.qparser=rrafts&q=edm:dxuid:*DX01_0*&defType=afts&spellcheck.maxResultsForSuggest=5&rqq={!rrafts}RERANK_QUERY_FROM_CONTEXT&spellcheck=false&carrot.outputSubClusters=false&spellcheck.count=5&wt=json&carrot.title=mltext@m___t@{http://www.alfresco.org/model/content/1.0}title&carrot.snippet=content@s___t@{http://www.alfresco.org/model/content/1.0}content&_=1584544780434&spellcheck.collate=true&rq={!alfrescoReRank+reRankQuery%3D$rqq+reRankDocs%3D500+scale%3Dtrue+reRankWeight%3D3}
2020-03-18 15:19:40.605 DEBUG (qtp1151020327-11) [ x:alfresco] o.a.s.s.s.LocalStatsCache ## GET {carrot.url=id&spellcheck.collateExtendedResults=true&indent=true&carrot.produceSummary=true&spellcheck.maxCollations=3&spellcheck.maxCollationTries=5&spellcheck.alternativeTermCount=2&spellcheck.extendedResults=false&hl.qparser=rrafts&q=edm:dxuid:*DX01_0*&defType=afts&spellcheck.maxResultsForSuggest=5&rqq={!rrafts}RERANK_QUERY_FROM_CONTEXT&spellcheck=false&carrot.outputSubClusters=false&spellcheck.count=5&wt=json&carrot.title=mltext@m___t@{http://www.alfresco.org/model/content/1.0}title&carrot.snippet=content@s___t@{http://www.alfresco.org/model/content/1.0}content&_=1584544780434&spellcheck.collate=true&rq={!alfrescoReRank+reRankQuery%3D$rqq+reRankDocs%3D500+scale%3Dtrue+reRankWeight%3D3}}
2020-03-18 15:19:40.605 INFO (qtp1151020327-11) [ x:alfresco] o.a.s.c.S.Request [alfresco] webapp=/solr path=/afts params={q=edm:dxuid:*DX01_0*&indent=true&wt=json&_=1584544780434} hits=1000 status=0 QTime=130
2020-03-18 15:19:40.606 DEBUG (qtp1151020327-11) [ x:alfresco] o.a.s.s.HttpSolrCall Closing out SolrRequest: {carrot.url=id&spellcheck.collateExtendedResults=true&indent=true&carrot.produceSummary=true&spellcheck.maxCollations=3&spellcheck.maxCollationTries=5&spellcheck.alternativeTermCount=2&spellcheck.extendedResults=false&hl.qparser=rrafts&q=edm:dxuid:*DX01_0*&defType=afts&spellcheck.maxResultsForSuggest=5&rqq={!rrafts}RERANK_QUERY_FROM_CONTEXT&spellcheck=false&carrot.outputSubClusters=false&spellcheck.count=5&wt=json&carrot.title=mltext@m___t@{http://www.alfresco.org/model/content/1.0}title&carrot.snippet=content@s___t@{http://www.alfresco.org/model/content/1.0}content&_=1584544780434&spellcheck.collate=true&rq={!alfrescoReRank+reRankQuery%3D$rqq+reRankDocs%3D500+scale%3Dtrue+reRankWeight%3D3}}
=-=-=-=-=-=-=-=
qt: /afts
q: edm:dxuid:*DX01_09*
Hits=740 <--- CORRECT VALUE !!!
2020-03-18 15:22:58.176 DEBUG (qtp1151020327-14) [ x:alfresco] o.a.s.c.S.Request [alfresco] webapp=/solr path=/afts params={q=edm:dxuid:*DX01_09*&indent=true&wt=json&_=1584544978131}
2020-03-18 15:22:58.182 DEBUG (qtp1151020327-14) [ x:alfresco] o.a.s.q.AbstractQParser AFTS QP query as lucene: (_dummy_:*DX01_09* text@s__lt@{http://www.doc-process.com/model/eArchiveDocumentModel/1.0}dxuid:{en}*dx01_09*)^1.0
2020-03-18 15:22:58.190 DEBUG (qtp1151020327-14) [ x:alfresco] o.a.s.q.AbstractQParser AFTS QP query as lucene: (content@s__lt@{http://www.alfresco.org/model/content/1.0}content:{en}rerank_query_from_context)^1.0
2020-03-18 15:22:58.190 DEBUG (qtp1151020327-14) [ x:alfresco] o.a.s.h.c.QueryComponent process: carrot.url=id&spellcheck.collateExtendedResults=true&indent=true&carrot.produceSummary=true&spellcheck.maxCollations=3&spellcheck.maxCollationTries=5&spellcheck.alternativeTermCount=2&spellcheck.extendedResults=false&hl.qparser=rrafts&q=edm:dxuid:*DX01_09*&defType=afts&spellcheck.maxResultsForSuggest=5&rqq={!rrafts}RERANK_QUERY_FROM_CONTEXT&spellcheck=false&carrot.outputSubClusters=false&spellcheck.count=5&wt=json&carrot.title=mltext@m___t@{http://www.alfresco.org/model/content/1.0}title&carrot.snippet=content@s___t@{http://www.alfresco.org/model/content/1.0}content&_=1584544978131&spellcheck.collate=true&rq={!alfrescoReRank+reRankQuery%3D$rqq+reRankDocs%3D500+scale%3Dtrue+reRankWeight%3D3}
2020-03-18 15:22:58.190 DEBUG (qtp1151020327-14) [ x:alfresco] o.a.s.s.s.LocalStatsCache ## GET {carrot.url=id&spellcheck.collateExtendedResults=true&indent=true&carrot.produceSummary=true&spellcheck.maxCollations=3&spellcheck.maxCollationTries=5&spellcheck.alternativeTermCount=2&spellcheck.extendedResults=false&hl.qparser=rrafts&q=edm:dxuid:*DX01_09*&defType=afts&spellcheck.maxResultsForSuggest=5&rqq={!rrafts}RERANK_QUERY_FROM_CONTEXT&spellcheck=false&carrot.outputSubClusters=false&spellcheck.count=5&wt=json&carrot.title=mltext@m___t@{http://www.alfresco.org/model/content/1.0}title&carrot.snippet=content@s___t@{http://www.alfresco.org/model/content/1.0}content&_=1584544978131&spellcheck.collate=true&rq={!alfrescoReRank+reRankQuery%3D$rqq+reRankDocs%3D500+scale%3Dtrue+reRankWeight%3D3}}
2020-03-18 15:22:58.191 INFO (qtp1151020327-14) [ x:alfresco] o.a.s.c.S.Request [alfresco] webapp=/solr path=/afts params={q=edm:dxuid:*DX01_09*&indent=true&wt=json&_=1584544978131} hits=740 status=0 QTime=14
2020-03-18 15:22:58.191 DEBUG (qtp1151020327-14) [ x:alfresco] o.a.s.s.HttpSolrCall Closing out SolrRequest: {carrot.url=id&spellcheck.collateExtendedResults=true&indent=true&carrot.produceSummary=true&spellcheck.maxCollations=3&spellcheck.maxCollationTries=5&spellcheck.alternativeTermCount=2&spellcheck.extendedResults=false&hl.qparser=rrafts&q=edm:dxuid:*DX01_09*&defType=afts&spellcheck.maxResultsForSuggest=5&rqq={!rrafts}RERANK_QUERY_FROM_CONTEXT&spellcheck=false&carrot.outputSubClusters=false&spellcheck.count=5&wt=json&carrot.title=mltext@m___t@{http://www.alfresco.org/model/content/1.0}title&carrot.snippet=content@s___t@{http://www.alfresco.org/model/content/1.0}content&_=1584544978131&spellcheck.collate=true&rq={!alfrescoReRank+reRankQuery%3D$rqq+reRankDocs%3D500+scale%3Dtrue+reRankWeight%3D3}}Has anyone in this forum encountered the same issues on d:text and Indexing Free Text custom model fields?
Alfresco FTS Solr searches are not behaving as I would expect and I would like to know if I am doing something wrong on my side or not.
Any help would be much appreciated as I am running out of ideas here.
Thanks in advance,
Luis