<?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: Questions about search and database index in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/questions-about-search-and-database-index/m-p/127842#M34714</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/82366"&gt;@jeffreyman&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Great you got a solution &amp;amp; thanks for accepting the solution - helpful to other users.&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
    <pubDate>Mon, 15 Mar 2021 17:26:32 GMT</pubDate>
    <dc:creator>EddieMay</dc:creator>
    <dc:date>2021-03-15T17:26:32Z</dc:date>
    <item>
      <title>Questions about search and database index</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/questions-about-search-and-database-index/m-p/127836#M34708</link>
      <description>&lt;P&gt;We are doing migration from old system to ACS (community 6.2). We have custom content model which has 20 data types and all are indexed (index enabled="true" in content model). We found the database size is very big. Here is summary.&lt;/P&gt;&lt;P&gt;- 5.1 million files (TIFF and PDF format) in content store (target to import &amp;gt;30 million files)&lt;/P&gt;&lt;P&gt;- 15 million nodes in ALF_NODE table&lt;/P&gt;&lt;P&gt;- 24 GB on all tables in DB&lt;/P&gt;&lt;P&gt;- 139 GB on all indexes in DB&lt;/P&gt;&lt;P&gt;Here are the questions.&lt;/P&gt;&lt;P&gt;1. As far as I know, the default search mechanism is to look up database first and Solr later? Is it able to use Solr only?&lt;/P&gt;&lt;P&gt;2. We are using CMIS QL to search documents and only doing metadata search. No need to do full text search. Can Solr do metadata search using CMIS QL?&lt;/P&gt;&lt;P&gt;3. Is it able to stop building indexes in database when doing bulk importing?&lt;/P&gt;&lt;P&gt;4. We know how to re-build indexes in Solr. How to re-build indexes in database?&lt;/P&gt;&lt;P&gt;5. In the content model, can we change some data types from index to "non-index" (i.e. change it to non searchable) once the content model is activated and documents are already imported into ACS?&lt;/P&gt;&lt;P&gt;6. Why the number of nodes in database is different from the content store?&amp;nbsp;&lt;/P&gt;&lt;P&gt;7. How come the size of indexes in database is so big?&lt;/P&gt;&lt;P&gt;8. Is there any formula to calculate the database sizing for more than 30 million documents?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 06:53:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/questions-about-search-and-database-index/m-p/127836#M34708</guid>
      <dc:creator>jeffreyman</dc:creator>
      <dc:date>2021-03-09T06:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Questions about search and database index</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/questions-about-search-and-database-index/m-p/127837#M34709</link>
      <description>&lt;P&gt;Just to reply some questions, you can take a look at:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-blog/transactional-metadata-query-tmdq/bc-p/287006" target="_blank" rel="nofollow noopener noreferrer"&gt;https://hub.alfresco.com/t5/alfresco-content-services-blog/transactional-metadata-query-tmdq/bc-p/287006&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You'll find also valious information in the comments of this blog post.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 08:18:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/questions-about-search-and-database-index/m-p/127837#M34709</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2021-03-09T08:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: Questions about search and database index</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/questions-about-search-and-database-index/m-p/127838#M34710</link>
      <description>&lt;P&gt;1. You have to use EVENTUAL consistency for the search:&lt;/P&gt;&lt;PRE&gt;In alfresco-global.properties:
solr.query.cmis.queryConsistency=EVENTUAL
solr.query.fts.queryConsistency=EVENTUAL

In code:
final SearchParameters sp = new SearchParameters();
sp.setQueryConsistency(QueryConsistency.EVENTUAL);&lt;/PRE&gt;&lt;P&gt;2. Yes it works. We are using CMIS WorkBench tor the testing of CMIS queries:&amp;nbsp;&lt;A href="https://chemistry.apache.org/java/download.html" target="_self" rel="nofollow noopener noreferrer"&gt;https://chemistry.apache.org/java/download.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. We have dropped the indexes from the database to save space and are not using them (you have to use eventual consistency in all the searches).&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;-- alf_node:
drop INDEX idx_alf_node_mdq on alf_node;
drop INDEX idx_alf_node_cor on alf_node;
drop INDEX idx_alf_node_crd on alf_node;
drop INDEX idx_alf_node_mor on alf_node;
drop INDEX idx_alf_node_mod on alf_node;
 
-- alf_node_properties:
drop INDEX idx_alf_nprop_b on alf_node_properties;
drop INDEX idx_alf_nprop_d on alf_node_properties;
drop INDEX idx_alf_nprop_f on alf_node_properties;
drop INDEX idx_alf_nprop_l on alf_node_properties;
drop INDEX idx_alf_nprop_s on alf_node_properties;

-- alf_content_url:
drop INDEX idx_alf_conturl_sz on alf_content_url;&lt;/PRE&gt;&lt;P&gt;Should not be an issue to recreate the indexes after the import if you want to use them. Be aware that in the DB all the properties are indexed (doesn't matter what you set in your custom model).&lt;/P&gt;&lt;P&gt;4. Depends on the database you are using.&lt;/P&gt;&lt;P&gt;5. Didn't try it. Theoretically, you could change it to&amp;nbsp;&lt;A href="https://github.com/deas/alfresco-bulk-import/tree/alfresco-6-jar" target="_self" rel="nofollow noopener noreferrer"&gt;https://github.com/deas/alfresco-bulk-import/tree/alfresco-6-jar&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;index enabled="false"&amp;gt;&lt;/PRE&gt;&lt;P&gt;and do full rebuild of Solr indexes (be sure to delete also contents alfrescoModels).&lt;/P&gt;&lt;P&gt;6. Database has also nodes that represent folders and other objects and contentStore directory stores only content.&lt;/P&gt;&lt;P&gt;7.&amp;nbsp;Be aware that in the DB all the properties are indexed (doesn't matter what you set in your custom model).&lt;/P&gt;&lt;P&gt;8. Depends heavily on your custom model. How many properties are defined, what types of properties. All the values are indexed.&lt;/P&gt;&lt;P&gt;For your planned number of documents to migrate it can be done in two steps. Do test migration and see what changes you want to do for the production migration. You can estimate space needed for the DB and Solr indexes.&amp;nbsp;Using&amp;nbsp;&lt;A href="https://github.com/pmonks/alfresco-bulk-import/wiki" target="_self" rel="nofollow noopener noreferrer"&gt;https://github.com/pmonks/alfresco-bulk-import/wiki&lt;/A&gt;&amp;nbsp;or fork&amp;nbsp;&lt;A href="https://github.com/deas/alfresco-bulk-import/tree/alfresco-6-jar" target="_self" rel="nofollow noopener noreferrer"&gt;https://github.com/deas/alfresco-bulk-import/tree/alfresco-6-jar&lt;/A&gt;&amp;nbsp;you can easily migrate ~3 millions of documents/day (depends heavily on the old system and your HW).&lt;/P&gt;&lt;P&gt;You should also try to switch to search services 2.0 (&lt;A href="https://www.alfresco.com/events/webinars/tech-talk-live-123-discovering-search-services-2" target="_self" rel="nofollow noopener noreferrer"&gt;https://www.alfresco.com/events/webinars/tech-talk-live-123-discovering-search-services-2&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-blog/search-services-2-0-0-release/ba-p/301308" target="_self" rel="nofollow noopener noreferrer"&gt;https://hub.alfresco.com/t5/alfresco-content-services-blog/search-services-2-0-0-release/ba-p/301308&lt;/A&gt;&amp;nbsp;) because of this great change:&amp;nbsp;solr.content.dir (removed from Search Services 2.0)&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 10:22:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/questions-about-search-and-database-index/m-p/127838#M34710</guid>
      <dc:creator>sufo</dc:creator>
      <dc:date>2021-03-10T10:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Questions about search and database index</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/questions-about-search-and-database-index/m-p/127839#M34711</link>
      <description>&lt;P&gt;Hi sufo,&lt;/P&gt;&lt;P&gt;Thank you for your help. We still have questions to be clarified.&lt;/P&gt;&lt;P&gt;1. the parameter "solr.query.cmis.queryConsistency=EVENTUAL" takes effects on "Share" app only? or system wide?&lt;/P&gt;&lt;P&gt;As we are developing custom web app using CMIS java library (apache chemistry) to connect to ACS, there is no way to get SearchService object. How to set it using CMIS java library?&lt;/P&gt;&lt;P&gt;5. As I know, the "alfrescoModels" is downloaded from ACS, it is a temporary file that will be updated if content model is updated. Any way to manually set the content model in ACS as I tried to set it using admin tool, but failed.&lt;/P&gt;&lt;P&gt;8. The "solr.content.dir" is a snapshot of db indexes for Solr search? If the folder is deleted, it will automatically download it from database?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 04:12:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/questions-about-search-and-database-index/m-p/127839#M34711</guid>
      <dc:creator>jeffreyman</dc:creator>
      <dc:date>2021-03-11T04:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Questions about search and database index</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/questions-about-search-and-database-index/m-p/127840#M34712</link>
      <description>&lt;P&gt;1. It's system wide. You can set logging to DEBUG on this class&amp;nbsp;org.alfresco.repo.search.impl.solr.DbOrIndexSwitchingQueryLanguage to see where the search is executed.&lt;/P&gt;&lt;P&gt;5. Yes models are updated when changed or added, but you can do only "additive" changes. Do not try to change something that is already defined in the model. There are many ways to introduce your custom model. So I don't know what you have tried.&lt;/P&gt;&lt;P&gt;8. Yes there are zip files containing metadata to be indexed by Solr. Don't know if there is also text content stored for indexing. If you want to delete the folder, you should follow full-reindex steps and do it that way.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 21:57:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/questions-about-search-and-database-index/m-p/127840#M34712</guid>
      <dc:creator>sufo</dc:creator>
      <dc:date>2021-03-11T21:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Questions about search and database index</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/questions-about-search-and-database-index/m-p/127841#M34713</link>
      <description>&lt;P&gt;thanks a lot&lt;/P&gt;</description>
      <pubDate>Sat, 13 Mar 2021 07:32:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/questions-about-search-and-database-index/m-p/127841#M34713</guid>
      <dc:creator>jeffreyman</dc:creator>
      <dc:date>2021-03-13T07:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Questions about search and database index</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/questions-about-search-and-database-index/m-p/127842#M34714</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/82366"&gt;@jeffreyman&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Great you got a solution &amp;amp; thanks for accepting the solution - helpful to other users.&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 17:26:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/questions-about-search-and-database-index/m-p/127842#M34714</guid>
      <dc:creator>EddieMay</dc:creator>
      <dc:date>2021-03-15T17:26:32Z</dc:date>
    </item>
  </channel>
</rss>

