<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Executing a search (SolR) on Alfresco startup in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/executing-a-search-solr-on-alfresco-startup/m-p/298024#M251154</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Axel.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've enable the patch that adds the required indexes to the database (by adding the property system.metadata-query-indexes.ignored=false).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then I've started Alfreco without making my search (the patch is executed).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then I've restarted Alfresco with my search and I've the following error : The patch to add the indexes to support in-transactional metadata queries has not been applied&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My code is :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;final SearchParameters params = new SearchParameters();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;params.addStore(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;params.setLanguage(SearchService.LANGUAGE_CMIS_ALFRESCO);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;params.setQuery("select * from ins:secureDocument where ins:chrono IS NOT NULL");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;params.setQueryConsistency(QueryConsistency.TRANSACTIONAL);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;final ResultSet resultSet = searchService.query(params);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Emmanuel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Feb 2015 10:55:00 GMT</pubDate>
    <dc:creator>eroux</dc:creator>
    <dc:date>2015-02-27T10:55:00Z</dc:date>
    <item>
      <title>Executing a search (SolR) on Alfresco startup</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/executing-a-search-solr-on-alfresco-startup/m-p/298022#M251152</link>
      <description>Hello,I use Alfresco 5.0.0.3 (but the problem is the same on a version with SolR indexation) and I want to execute a lucene search on Alfresco startup but I have the following error "SOLR queries can not be executed while the repository is bootstrapping".Is there a possibility to execute a search du</description>
      <pubDate>Fri, 27 Feb 2015 07:06:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/executing-a-search-solr-on-alfresco-startup/m-p/298022#M251152</guid>
      <dc:creator>eroux</dc:creator>
      <dc:date>2015-02-27T07:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Executing a search (SolR) on Alfresco startup</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/executing-a-search-solr-on-alfresco-startup/m-p/298023#M251153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you can't execute full fledged searches during Startup and there is no way around it. But you can execute a restricted search based on the "transactional metadata query" feature available since Alfresco 4.2. In essence, you have to use fts-alfresco or cmis-alfresco (you should never ever use Lucene language anymore) and the query must not contain PATH, CONTAINS(), IN_TREE, OR, ISNULL and similarily complex fragments. You also have to enable the Feature by letting Alfresco create the neceesary database indices during Schema bootstrap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See &amp;lt;a href="&lt;/SPAN&gt;&lt;A href="http://docs.alfresco.com/5.0/concepts/intrans-metadata.html" rel="nofollow noopener noreferrer"&gt;http://docs.alfresco.com/5.0/concepts/intrans-metadata.html&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;transactional metadata query documentation&amp;lt;/a&amp;gt; for Details.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 09:10:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/executing-a-search-solr-on-alfresco-startup/m-p/298023#M251153</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2015-02-27T09:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Executing a search (SolR) on Alfresco startup</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/executing-a-search-solr-on-alfresco-startup/m-p/298024#M251154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Axel.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've enable the patch that adds the required indexes to the database (by adding the property system.metadata-query-indexes.ignored=false).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then I've started Alfreco without making my search (the patch is executed).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then I've restarted Alfresco with my search and I've the following error : The patch to add the indexes to support in-transactional metadata queries has not been applied&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My code is :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;final SearchParameters params = new SearchParameters();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;params.addStore(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;params.setLanguage(SearchService.LANGUAGE_CMIS_ALFRESCO);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;params.setQuery("select * from ins:secureDocument where ins:chrono IS NOT NULL");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;params.setQueryConsistency(QueryConsistency.TRANSACTIONAL);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;final ResultSet resultSet = searchService.query(params);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Emmanuel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 10:55:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/executing-a-search-solr-on-alfresco-startup/m-p/298024#M251154</guid>
      <dc:creator>eroux</dc:creator>
      <dc:date>2015-02-27T10:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Executing a search (SolR) on Alfresco startup</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/executing-a-search-solr-on-alfresco-startup/m-p/298025#M251155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Axel,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's working.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My code wasn't executed at the right place on Alfresco startup (I've put my code in my module "executeInternal()" method).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Big thanks for your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Emmanuel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 11:36:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/executing-a-search-solr-on-alfresco-startup/m-p/298025#M251155</guid>
      <dc:creator>eroux</dc:creator>
      <dc:date>2015-02-27T11:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Executing a search (SolR) on Alfresco startup</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/executing-a-search-solr-on-alfresco-startup/m-p/298026#M251156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FYI, Putting the code inside a bootstrap patch (org.alfresco.repo.admin.patch.Patch) does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For some reason,&amp;nbsp;OptionalPatchApplicationCheckBootstrapBean, which is responsible for determining if patch was applied, is never called, hene returning always false, which in turn causes the message "&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;he patch to add the indexes to support in-transactional metadata queries has not been applied" to be thrown. (Seems like a buggy behaviour in my opinion...)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;Using a module component as mentionned by Emmanuel (with the executeOnceOnly option set to true) made it work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2018 10:53:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/executing-a-search-solr-on-alfresco-startup/m-p/298026#M251156</guid>
      <dc:creator>jservajean</dc:creator>
      <dc:date>2018-03-29T10:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Executing a search (SolR) on Alfresco startup</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/executing-a-search-solr-on-alfresco-startup/m-p/298027#M251157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The OptionalPatchApplicationCheckBootstrapBean is called, but only very, very late in the startup process when most (if not all) of Alfresco has already been initialised. This means it will be called way after patches have been executed, which is why they cannot rely on this class. Even module components cannot rely on this bean to have already been called,&amp;nbsp;as they will be called as part of the "onBootstrap" event handling, and the ordering between module components / the patch check bootstrap is not guaranteed / may be dependent on operating system / file system / Spring file processing&amp;nbsp;order. In practice though, the default file order should be sufficient to make module components works as long as no one overrides&amp;nbsp;core Spring beans.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Mar 2018 11:37:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/executing-a-search-solr-on-alfresco-startup/m-p/298027#M251157</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2018-03-31T11:37:52Z</dc:date>
    </item>
  </channel>
</rss>

