SSL for Sinequa's IIS


This document describes how to use Sinequa and how Sinequa is configured.

What is Sinequa?


Sinequa is a global search engine for enterprise. It can index a lot of type of documents (Web, xECM, Google Drive, Aodocs, …).

The Sinequa Company


The Sinequa engine is ed by the Sinequa Company:  http://www.sinequa.com

Sinequa documentation


You can find the documentation on this Web site:

URL:  https://acew1psinesin01.eua.solvay.com/doc/en/Content/en.index.html

Documentation from Sinequa website: https://doc.sinequa.com/en.sinequa-es.v11/Content/en.index.html

Release Notes: https://download.sinequa.com/release-notes

You can only access with the same credential used for the Sinequa Support portal.

Technology


Sinequa is a Windows application using IIS and .net framework. There is no databases server like SQL Server. Data are stored in files.

Version


The current version is the V11.10.0.2123

To see the build number of the version go to the menu Global options in the administration interface.

Software download


https://download.sinequa.com/home


login = lruault 

pwd = Solvay2016


Architecture


On the same server, there is the indexing engine and the interface for searching.

Indexation process


The connector process browses all documents of the given collection.

If the document is a html page the document is sent directly to the indexer process.

If the document is not a a html page the document is put in the folder F:\sinequa\temp. It's the queue for the converter process.

The converter process converts non html documents to a html documents and the converted document is sent to the indexer.

A process indexer is created for each indexation. The queue of the indexer in processed in memory (not temporary files). The max number of documents in the queue is 50. If the max number is reached during an indexation the browser/connector process will wait.

Software installation


The installation is describe in this document:

https://acew1tsinesin01.eua.solvay.com/doc/en/Content/en.sinequa-es.index.installation.html

For the configuration of SSO see this documentation:

https://doc.sinequa.com/en.sinequa-es.v10/Content/en.sinequa-es.how-to.implement-sso.html

See above for the login/password

At the end of the installation don't forget to execute this script:

Software update


To update the software with the last build version:

In AWS it's not possible to download a file from Internet. To do this, we must create a ticket in Service One.

Test environment


Sinequa server (acew1tsinesin01)


Production environment


Sinequa server (acew1psinesin01)


Search interface


Override user


If you want to see what can see a user you can override its account.

Connect on the search interface with the Admin account. Add these parameters in the URL:

&overrideuser=<user account>&overridedomain=<domain>

http://acew1psinesin01.eua.solvay.com/admin?user=admin&password=SINEQUA01

https://acew1psinesin01.eua.solvay.com/search?profile=xECM_FP_PRODUCTION_ECO&overrideuser=ltan&overridedomain=OpenText_Production

Change user interface language


The default user language interface is the Windows. If the Windows language is different of English, French, Portuguese, China or German it will be English.

During a session you can change the user interface language by adding the parameter uilanguage(eg: uilanguage=fr, uilanguage=de,...) in the URL.

Example: https://ehs-fp-search-eco.solvay.com/search?uilanguage=pt

Administration interface


URL


Here’s the URL of the administration interface: https://acew1psinesin01.eua.solvay.com/admin

If your AD account doesn’t have rights you can use this URL to connect with the Sinequa administrator account:

https://acew1psinesin01.eua.solvay.com/admin?user=admin&password=XXXXXX

or go to  https://acew1psinesin01.eua.solvay.com/login

(login= admin / password=XXXXXX) and then go to https://acew1psinesin01.eua.solvay.com/admin

Functions


Servers status


In this section you can delete and create index.

You can see the version of Sinequa.

Tasks status


In this section you can see the results of indexing tasks scheduled or not.

You can stop a running task of indexing.

Sessions status


In this section you can see all sessions.

Global options


In the tab General, you can see the version of Sinequa.

In the tab Indexes schema you can define the number of sourcecsv, sourcestr and sourcetree count (fields). If you change this value you have to click on the button Update indexes model.

After the update all indexes will be modified: new fields will be added.

Profiles


In this section you can see all profiles. A profile determines:

For a profile, you can specify the list of indexes, the list of sources, the list of collections

In the Advanced tab, in the field Selection url patterns you can specified a sub-domain that will be associated to the profile (example: For the profile Silica Light ECM it's https://silica-search.solvay.com/).

Sources & collections


A source is a list of collections.

A collection describes data source to be indexed. It can be xECM, Aodocs,…

The name of the index is configured in the source.

In the tab General, the field Tree root indicates the location that will be used in the navigation box Sources.

In the tab Mappings, you can define the initialization of the variables.

You can start indexation by clicking on the button Start connector (the field Force reindexation must be checked).

In the tab Connection check  Change connection group name on timeout to avoid trouble if there is page in timeout (avoid that all next pages are considered in timeout (avoid an issue with Tridion)

Domains and partitions


A domain is a list of partitions.

A partition describes a connector to get a list of users (AD,…).

Domain mappings


In this module, you can map different partitions. 

Indexes


In this module you can find the list of the indexes. An index is a physical container that stores the result of the indexation.

Grid/nodes


List of Sinequa nodes.

Advanced/Advanced forms


In this module, you can define forms used in the advanced search.

Advanced/Skins


A skin describes a type of interface. All graphic elements are stored in the folder F:\sinequa\website\skins\<name of the skin>.

To configure the zone in the results search go in the tab Search Form.

In the section Custom html / Metadata html pattern if you type &nbsp; you will display nothing above the link Cached document. If there is nothing in the zone, Sinequa will put the default value that you can in the documentation.

The other solution is to insert this code in the search.cs plugin :


public override bool OnWriteDocMetadata(Doc doc)

        {

        if (Str.EQNC(Session.Profile.Name, "RhodiaGlobal") || Str.EQNC(Session.Profile.Name, "RhodiaInteractive"))

         { 

             return true;

          } 

          return false;

        }


Advanced/Plugins


List of the plug-ins.

A plug-in is a code that is executed during the indexation or the searching. The code replaces the normal execution to personalize treatment.

Crawler.cs


This plug-in concerns the indexation.

You can put code that will be executed during the indexation to make specific processing.

Example :There is a code to delete concurrencies of the parameter jsessionid (cleaning) in the URL.

search.cs


This plug-in concerns the searching interface.

The code makes these actions:

        public override bool OnWriteDocTitle(Doc doc)
        {
            
        //    string title = doc.SourceStr(13) + " " + doc.SourceStr(2) + " " + Ht.Text(doc.ResultTitle.Replace("_", " "));
                string title = Ht.Text(doc.ResultTitle.Replace("_", " "));
            
       
                       if (doc.SourceStr(13)=="0") {
                    Hm.Write("<span class="customtitle" rhodiatitle=\"", doc.SourceStr(13) ,"\">",title ,"</span>");
                    }
                   else if (doc.SourceStr(2)=="WD") {
                    Hm.Write("<span class="customtitle" rhodiatitle=\"", doc.SourceStr(2) ,"\">",title ,"</span>");
                    }
                     else {        
                   Hm.Write(title);
               }
            
            return true;
        }

=> This code will change the color of the title if the field SOURCESTR13 is equal to 0 or SOURCESTR2 is equal to WD

Advanced/Navigation boxes


In this module, you can manage all navigation boxes, native and custom.

If the first character of the name of the box is “_” it means that it’s a native box. You can't modify it. 

Advanced/Commands


In this module you can execute Sinequa commands:

Custom parameters


You can add parameters in all forms of the administration (profiles,...). These parameters could be used in plugins files to specific processing.

For example, the filter added in the boxes allowing to show box if the current treepath is a equal to a specific value was made by this method.

Content of G:\sinequa\data\configuration\form-override\box.list.xml overriding the form of the navigation box:

<?xml version="1.0" encoding="utf-8"?>
<Sinequa>
    <Inherit>box.list</Inherit>
    <Tab merge-type="merge" merge-attrname="id" merge-attrvalue="general">
        <Group merge-type="add">        
            <Entry><Display>{Lang("Hide box if items count >[fr]Cacher la boîte si le nombre d'item est >")}</Display><DataTag>HideMoreThanXRows</DataTag></Entry>
        </Group>
        <Group merge-type="add">        
            <Display>{Lang("Show box if filter[fr]Afficher la boîte si filtre")}</Display>
            <Grid>            
                <DataTag>ShowBoxIfSelectionValue</DataTag>                
                <Col><Title>{Lang("Box[fr]Boîte")}</Title><DataTag>boxname</DataTag><Width>50</Width><CellType>entrycombo</CellType><CellListName>listbox</CellListName></Col>
                <Col><Title>{Lang("Operator[fr]Opérateur")}</Title><DataTag>comp_operator</DataTag><Width>50</Width><CellType>entrycombo</CellType><CellListName>listcompoperator</CellListName></Col>
                <Col><Title>{Lang("Value[fr]Valeur")}</Title><DataTag>value</DataTag><Width>200</Width><CellType>input</CellType></Col>
                <Col><ShowPlus>true</ShowPlus><Width>16</Width><CellType>rowdelete</CellType><CellValue>rowdelete</CellValue></Col>
            </Grid>        
        </Group>
        <Group merge-type="add">        
            <Display>{Lang("Show box if is in tree[fr]Afficher la boîte si dans l'arbre")}</Display>
            <Grid>            
                <DataTag>ShowBoxIfAllInTreeNode</DataTag>                
                <Col><Title>{Lang("Box[fr]Boîte")}</Title><DataTag>BoxTreeName</DataTag><Width>50</Width><CellType>entrycombo</CellType><CellListName>listbox</CellListName></Col>
                <Col><Title>{Lang("Value[fr]Valeur")}</Title><DataTag>value</DataTag><Width>200</Width><CellType>input</CellType></Col>
                <Col><ShowPlus>true</ShowPlus><Width>16</Width><CellType>rowdelete</CellType><CellValue>rowdelete</CellValue></Col>
            </Grid>        
        </Group>
    </Tab>
    <List merge-type="add">
        <Name>listcompoperator</Name>        
        <Item><Name>Equals[fr]Est égal</Name><Value>=</Value></Item>
        <Item><Name>Contains[fr]Contient</Name><Value>contains</Value></Item>
    </List>
</Sinequa>

Part of the screen shot:

Data associated to these fields are used in the event OnWriteBoxList of the search plugin.

Jobs


In this module, you can schedule jobs (indexation of collections, partition synchronization, commands, list of jobs).

Logs


To reduce the log level for the WebApp, goto to Global options/Advanced and type 2 in the zone Sql log level (default 1). Otherwise, the size of the log files may be important.

If you want to activate logs for a module, you have to type 20 in the field Log level in the tab Advanced. The logs will be written in the folder F:\sinequa\log.

Translation of labels


If you want to translate English labels into French you have to put after the English label the characters “[fr]” and the French label.

Example: Keywords[fr]Mots clés

Replacement of labels


To replace label by a personalize label you have to put the replacement in the file G:\sinequa\data\configuration\lang\en.xml for English labels and in the file G:\sinequa\data\configuration\lang\fr.xml for French labels.

Example: The label in English in the bookmarks menu

<item> 
<key>Baskets[fr]Paniers</key> 
<value>Bookmarks</value> 
</item>

New language


If you want to add a new language (language LG), you need to translate labels.

Copy the file F:\sinequa\samples\en.sample.xml into F:\sinequa\samples\LG.sample.xml

Translate the tag values of the file F:\sinequa\samples\LG.sample.xml


Copy the file G:\sinequa\\data\configuration\lang\fr.xml into G:\sinequa\\data\configuration\lang\LG.xml

Translate the tag values of the file G:\sinequa\\data\configuration\lang\LG.xml

Need an IIS service restart to take it into account.

SCMD commands (Sinequa COMmand)

On the server, you can execute commands with SCMD exe.

Example of CSV export:

scmd execsqlcsv "select id,title,filename from idx_DocumentumEHS2 where text contains ' +(wercs)' and ((collection contains '/Documentum/rcsehs2_test/*')) and sourcestr13 contains 'historical' and SearchParameters='mac=100000;dlang=autodetect;langw=en/1.2/fr/1.1/es/1.0/it/1.0/nl/1.0/ko/0.8/*/0.9' count 2000000000 " f:\export_historical_wercs.txt

SQL requests


Sinequa as developed is own SQL language for indexes requests. You can use the SQL Console within the Sinequa Admin page.

The SQL Console can only be accessible if the user is defined as Administrator for the domain.

You will need to make sure you are the administrator for the domain "Rhodia_AD". 
If user is not able to find the SQL Console, make sure the user is added as the administrator of the "Rhodia_AD".


Example of request:

select id,databasealias,title,documentlanguages,authors,modified,indexationtime,version,keywords,size,treepath,filename,fileext,flags,collection,

docformat,doctype,containerid,msgfrom,msgto,remap(person),remap(company),remap(geo),url1,url2,accesslist1,

accesslist2,deniedlist1,sourcecsv1,sourcecsv2,sourcecsv3,

sourcecsv4,sourcecsv5,sourcecsv6,sourcecsv7,sourcecsv8,

sourcecsv9,sourcecsv10,sourcecsv11,sourcecsv12,sourcecsv13,

sourcecsv14,sourcecsv15,sourcecsv16,sourcecsv17,

sourcecsv18,sourcecsv19,sourcetree1,sourcetree2,sourcestr1,searchid,

from idx_CrawlInternet,idx_CrawlInternetDEV,idx_CrawlIntranet,idx_CrawlIntranetBasicHtml,

idx_CrawlIntranetBlog,idx_CrawlIntranetDEV,idx_Documentum,idx_Eroom

where  ((collection contains '/InteractiveInternetPublic/*') or (collection contains '/InteractiveIntranetPublic/*') or (collection contains '/Eroom/*') or (collection contains '/BasicHtmlIntranet/*') or (collection contains '/Documentum/*'))  and treepath contains '/Eroom/*'   order by modified desc skip 0 count 20

CSV Export of the content of index


For small export you can use the Engine Console (Menu: Session/ Save Results).

For huge export you can execute this example of script (inside a bat extension file):

F:\sinequa\website\bin\tools.engine.SQL-32.exe --host=acew1psinesin01 "--execute=select id,documentlanguages,treepath,title,filename, modified,indexationtime,docformat,sourcecsv1,sourcecsv2,sourcecsv3,sourcestr1,sourcestr2,sourcestr3,sourcestr4,sourcestr5,sourcestr6,sourcestr7,sourcestr9,sourcestr10,sourcestr11,sourcestr12,sourcestr13,sourcestr14,sourcestr15,sourcestr16,sourcestr17,sourcestr18,sourcestr19,sourcestr20,sourcestr20,sourcestr21,sourcestr22,sourcecsv20 from idx_Documentum where  treepath contains '/Documentum/RCSEHS/EHS/*' and sourcestr4 contains 'sds - europe'  order by modified desc skip 0 count 200000"  > ehsexport_sds_europe.dat

F:\sinequa\website\bin\tools.engine.SQL-32.exe --raw --host=acew1psinesin01 "--execute=select Id,DocumentLanguages,treepath,filename,modified,indexationtime,size,fileext,docformat,doctype,url1 from idx_solwebinternet where collection ='/SolwebInternet/Solvay.com/' order by indexationtime asc "  > exportcsv.dat

Sinequa for Solvay


Servers



 ServerFull name Description Environment
acew1dsinesin01 acew1dsinesin01.eua.solvay.com Sinequa main server Development
acew1tsinesin01 acew1tsinesin01.eua.solvay.com Sinequa main server QA
acew1psinesin01acew1psinesin01.eua.solvay.com Sinequa main server Production

Service accounts


The service accounts are all stored in this GDrive link.

This link is only accessible by the Sinequa team. To access the link, request for the permission.


List of accounts:

AccountServerEnvironment
EUA\SVC-DEV-SINEacew1dsinesin01DEVELOPMENT
EUA\SVC-TST-SINEacew1tsinesin01TEST
EUA\SVC-PRD-SINEacew1psinesin01PRODUCTION


Organization of directories



DirectoryDescription
H:\IIS_LogsLogs for IIS
F:\sinequa\All source files for Sinequa
F:\sinequa\websiteScripts for the Web interface search
F:\sinequa\ooo320Open office. Sinequa uses OO to convert document to html format (This folder is included in the software package)
F:\sinequa\website\skins\\SolvayV10Files for the skin SolvayV10
H:\SinequaLog\logSinequa log files
G:\sinequa\data\configurationAll files for the configuration of Sinequa
G:\sinequa\data\configuration\langFiles for the labels (French + English and others (PT & DE))
G:\sinequa\indexesIndex files
G:\sinequa_setup_backupDump of the index
G:\sinequa\data\configuration\delegated-admins List of administrators of the application



Accounts


Accounts for the Web Sinequa interface are linked to Active Directory of Rhodia.

Extra accounts (Sinequa administrator, Web Services) have been created in this file:

G:\sinequa\data\configuration\domains\Sinequa\DefaultPartition\content.xml

Extra accounts are not visible in the administration interface but they can be used to restrict access to data.

Piwik


Piwik ( Matomo) is a web analytics application to track online visits to one or more websites and display reports on these visits for analysis.

Piwik has been integrated in Sinequa by a js file inserted in the Skins:


Content of the file F:\Sinequa\website\skins\piwik.js


var domain=window.location.host; 
var subdomain = domain.toLowerCase();
var piwikcode ='';

if (subdomain=='4sight-search.solvay.com') {piwikcode = '1e8c74b2-6ea9-401a-b620-1f2ecb756536';}
if (subdomain=='4sight-search.syensqo.com') {piwikcode = '1e8c74b2-6ea9-401a-b620-1f2ecb756536';}


if (subdomain=='ehs-rm-search-eco.solvay.com') {piwikcode = '45d647d2-dc4f-4664-a35b-917cb452ee78';}

if (subdomain=='ehs-rm-search-sco.solvay.com') {piwikcode = 'a60bdd51-e9a7-405a-8ce4-dadd517115a8';}
if (subdomain=='ehs-rm-search.syensqo.com') {piwikcode = 'a60bdd51-e9a7-405a-8ce4-dadd517115a8';}

if (subdomain=='ehs-fp-search-eco.solvay.com') {piwikcode = '2ecb8888-6455-4566-8c77-c19cbff134b6';}

if (subdomain=='ehs-fp-search-sco.solvay.com') {piwikcode = 'd134c535-9467-4e2e-a00d-93b3397f15ad';}
if (subdomain=='ehs-fp-search.syensqo.com') {piwikcode = 'd134c535-9467-4e2e-a00d-93b3397f15ad';}

if (subdomain=='global-intelligence-search-tool.solvay.com') {piwikcode = '004c78e9-1f7b-42d6-b9c1-7716448fec0b';} 
if (subdomain=='global-intelligence-search-tool.syensqo.com') {piwikcode = '004c78e9-1f7b-42d6-b9c1-7716448fec0b';} 

if (subdomain=='productinformation-eco.solvay.com') {piwikcode = '8eb50a2a-824f-4665-a2f5-66e39ea90fc7';}

if (subdomain=='productinformation-sco.solvay.com') {piwikcode = 'a598c042-33d1-44e3-8fb3-cbbddc084cbe';}
if (subdomain=='productinformation.syensqo.com') {piwikcode = 'a598c042-33d1-44e3-8fb3-cbbddc084cbe';}

if (subdomain=='regwatch-search.solvay.com') {piwikcode = '7fcb6570-b17f-4d2b-a2ac-f5ebbbb3e315';}
if (subdomain=='regwatch-search-eco.solvay.com') {piwikcode = '7fcb6570-b17f-4d2b-a2ac-f5ebbbb3e315';}

if (subdomain=='regwatch-search-sco.solvay.com') {piwikcode = '7fcb6570-b17f-4d2b-a2ac-f5ebbbb3e315';}
if (subdomain=='regwatch-search.syensqo.com') {piwikcode = '7fcb6570-b17f-4d2b-a2ac-f5ebbbb3e315';}


if (subdomain=='silica-search.solvay.com') {piwikcode = '4e6050e9-38db-4e10-893e-c7a2c9da4755';}
       
     
if (piwikcode !=''){
  
    (function(window, document, dataLayerName, id) {
    window[dataLayerName]=window[dataLayerName]||[],window[dataLayerName].push({start:(new Date).getTime(),event:"stg.start"});var scripts=document.getElementsByTagName('script')[0],tags=document.createElement('script');
    function stgCreateCookie(a,b,c){var d="";if(c){var e=new Date;e.setTime(e.getTime()+24*c*60*60*1e3),d="; expires="+e.toUTCString();f="; SameSite=Strict"}document.cookie=a+"="+b+d+f+"; path=/"}
    var isStgDebug=(window.location.href.match("stg_debug")||document.cookie.match("stg_debug"))&&!window.location.href.match("stg_disable_debug");stgCreateCookie("stg_debug",isStgDebug?1:"",isStgDebug?14:-1);
    var qP=[];dataLayerName!=="dataLayer"&&qP.push("data_layer_name="+dataLayerName),isStgDebug&&qP.push("stg_debug");var qPString=qP.length>0?("?"+qP.join("&")):"";
    tags.async=!0,tags.src="https://solvay.containers.piwik.pro/"+id+".js"+qPString,scripts.parentNode.insertBefore(tags,scripts);
    !function(a,n,i){a[n]=a[n]||{};for(var c=0;c<i.length;c++)!function(i){a[n][i]=a[n][i]||{},a[n][i].api=a[n][i].api||function(){var a=[].slice.call(arguments,0);"string"==typeof a[0]&&window[dataLayerName].push({event:n+"."+i+":"+a[0],parameters:[].slice.call(arguments,1)})}}(i[c])}(window,"ppms",["tm","cm"]);
    })(window, document, 'dataLayer', piwikcode);
   
   
   console.log('piwikcode=' +piwikcode);
 
}
 
 

Marquee Replacement


As Marquee feature is obsolete and may be removed at any time, a replacement for marquee feature is needed. (Marquee tag is used for text moving animation in web browser)

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/marquee


Keyframes is used to replace marquee feature:

https://css-tricks.com/snippets/css/keyframe-animation-syntax/


Below code is added to F:\Sinequa\website\skins\rhodiainteractive\rhodia.css

/* New Marquee */
/* define the animation */
@-webkit-keyframes new_marquee {
  0%   { -webkit-transform: translate(268px, 0); }
  100% { -webkit-transform: translate(-100%, 0); }
} 
@-moz-keyframes new_marquee {
  0%   { -moz-transform: translate(268px, 0); }
  100% { -moz-transform: translate(-100%, 0); }
} 
@keyframes new_marquee {
  0%   { transform: translate(268px, 0); }
  100% { transform: translate(-100%, 0); }
} 

/* define your limiting container */
.new_marquee {
  white-space: nowrap;
  overflow: hidden;
  border-color: #0aa2e3;
  box-sizing: border-box;
  width: 268px;
  height:20px;
}
/* this is the tray moving around your container */
.new_marquee span {
  display: inline-block;
  text-indent: 0;
  font-size: 13px;
  font-weight: bold;
  color: #808080;
  -webkit-animation: new_marquee linear infinite; /* here you select the animation */
  animation: new_marquee linear infinite; /* here you select the animation */
}
/* pause the animation on mouse over */
.new_marquee span:hover {
  -webkit-animation-play-state: paused;
  animation-play-state: paused;  
}


In Sinequa plugin search.cs, below code is added:

string LogoTitle = Sys.Lang(Rhodia_LogoTitle);
string len = (LogoTitle.Length * 7).ToString();
string duration = ((LogoTitle.Length / 70) * 15).ToString();
if (duration == "0") {
	duration = "15";
}

Hm.Write("<p class=\"new_marquee\"><span style=\"animation-duration:", duration, "s;\">", LogoTitle, "<span></p>");

Logic above:

  1. Get LogoTitle from search profile
  2. Get length of LogoTitle
  3. Calculate duration for the keyframes transform animation to scroll the text (Basically every 70 chars needed 15 seconds)
  4. Write html code to call new marquee class

Change default images


Default images of the folder F\sinequa\website\images (icons,...) can be replaced by new ones. You just have to create the new images with the same name in the folderF\sinequa\website\images2

This folder is never overwritten by new upgrade of the software.

With this method we changed the default bookmark (basket) icon (basket.gif) and the new bookmark (basket) icon (new11.gif).

If you add new files in the folder images2 you need to restart IIS.

Specific settings


SolvayOne: Excluding indexation of the text "Google Translate" and "For a better display of Solvay ONE, please switch to Chrome browser" (no longer used)


Excluding the text "Google Translate"

Exclude the indexation of the SolvayOne by indicating the div in the XPath setting in the Collection > Mappings > XPath 

//div[@class="labelTranslate"]

Excluding the text "For a better display of Solvay ONE, please switch to Chrome browser"

Exclude the indexation of the SolvayOne by performing the indexation with Chrome agent.

Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36




QUALITY MODOPE: integration in the custom fulltext of the values of multivalued dictionaries (no longer used)


For the project  Quality modope the keyuser wants that the values of a multivalued dictionary are included in the custom fulltext.

To do this we modified the Method OnConnectorStart of the plugin connector documentum.cs:

For each dictionary a file is generated in the folder G$\sinequa\data\configuration\files\filemapping

Each file contains for each key a line of the list of values in each language and the key.

Example: First lines of the file DTC.csv.DIC QUALITE_MODOP Keywords.txt:

2-DIMETHYLAMINOETHYLE METHACRYLATE 2-DIMETHYLAMINOETHYLE METHACRYLATE ;2-DIMETHYLAMINOETHYLE METHACRYLATE
2-HYDROXYPROPYLE ACRYLATE 2-HYDROXYPROPYLE ACRYLATE ;2-HYDROXYPROPYLE ACRYLATE
4-VINYLE GAÏACOL 4-VINYLE GAÏACOL ;4-VINYLE GAÏACOL
5-ETHYL-EVA 5-ETHYL-EVA ;5-ETHYL-EVA
ACETALDEHYDE ACETALDEHYDE ;ACETALDEHYDE
ACETATE D'ETHYLE ETHYL ACETATE ;ACETATE D?ETHYLE
Acetate de butyle BUTYL ACETATE ;Acetate de butyle
ACETATE DE PROPYLE PROPYL ACETATE ;ACETATE DE PROPYLE
ACIDE ACETIQUE ACETIC ACID ;ACIDE ACETIQUE
ACETIQUE ANHYDRE ACETIC ANHYDRIDE ;ACETIC ANHYDRIDE

In the plugin search.cs  we created this new function:

// Function MultiFileMapping used in the mapping section of a collection // Used for multi-valued fields
    public class MultiFileMapping : FunctionPlugin
   {
       public override string GetValue(IDocContext ctxt, params string[] values)
       {
           if (values.Length < 2) return "ERROR";
           string filemapping = values[0];
           ListStr l = ListStr.ListFromStr(values[1], ';');
           ListStr res = new ListStr();
           foreach (string val in l)
           {
               res.Add(CC.Current.FileMapping(filemapping, val));
           }
           return res.ToStr(';');
       }
   }

In the section  Custom Fulltext  of the tab Mappings of the collection /Documentum/quality_modeop/ we added this expression:


Replace(MultiFileMapping("DTC.csv.DIC QUALITE_MODOP Keywords",property.keywords),";"," ")

Force language for Deeg Project (no longer used)


For the interface Deeg (profile=DCT_QUALITY_DGI) , code in the plugin search.cs (OnPageStart() event) have been added to force the interface language to English if the language of the browser is different of  French, German or English.

  if (Session.SessionUiLangStr != "fr" && Session.SessionUiLangStr != "de" && Session.SessionUiLangStr != "en" && (Session.Profile.Name == "DCT_QUALITY_DGI_TEST" || Session.Profile.Name == "DCT_QUALITY_DGI")) {
          Session.SetUiLanguage("en");
          Session.RecalculateSessionUiLang();
}

EHS xECM interfaces 


Add links in the menu with different color (no longer used)


To do this:

In the profile we added the links:

In the associated skin we added the files skins/gecdoc.js and skins/rhodiainteractive/gecdoc.css

Content of the file skins/gecdoc.js

$(document).ready(function() {
    $("#dm0m0i2td td:contains('GECDOC Contents')").each(function () {
        $(this).addClass( "gecdocZone1" );
    });
    $("#dm0m0i3td td:contains('GECDOC Contents')").each(function () {
        $(this).addClass( "gecdocZone1" );
    });
        
    $("#dm0m0i3td td:contains('GECDOC training')").each(function () {
        $(this).addClass( "gecdocZone1" );
    });
    $("#dm0m0i4td td:contains('GECDOC training')").each(function () {
        $(this).addClass( "gecdocZone1" );
    });
    $("#dm0m0i4td td:contains('Intranet GEC')").each(function () {
        $(this).addClass( "gecdocZone2" );
    });
    $("#dm0m0i5td td:contains('Intranet GEC')").each(function () {
        $(this).addClass( "gecdocZone2" );
    });
    $("#dm0m0i6td td:contains('Industrial Intranet')").each(function () {
        $(this).addClass( "gecdocZone2" );
    });
    $("#dm0m0i5td td:contains('Industrial Intranet')").each(function () {
        $(this).addClass( "gecdocZone2" );
    });
    $("#dm0m0i7td td:contains('Material Code')").each(function () {
        $(this).addClass( "gecdocZone3" );
    });
    $("#dm0m0i6td td:contains('Material Code')").each(function () {
        $(this).addClass( "gecdocZone3" );
    });
});

Content of the file skins/rhodiainteractive/gecdoc.css:

.gecdocZone1 {
     
    background-color:#97BE0E!important;
    cursor:pointer;
}

.gecdocZone2 {
    cursor:pointer;
    background-color:#9ACCE5!important; 
}

.gecdocZone3 {
    cursor:pointer;
    background-color:#FF7F27!important; 
}

#search-input{
    width:105px;
}

Box Process guide chapter (no longer used)


The box Process guide chapter is displayed only if the user has chosen the item PROCESS ENGINEERING in the box Discipline.

Setting of the box DCT_GEC_rho_dgi_process_guide (Process guide chapter):

CSV export


The export CSV is activated:

The fields that are exported is listed in the tab Export CSV of the profile:

Search on title in Advanced search (Issue with diacritical) (no longer used)


In the advanced search users can make search  on title through a suggestion:

The title is stored in the field sourcestr19.

In the method GetSqlOverride we added this code:

    else if (Str.EQNC(Session.Profile.Name, "DCT_QUALITY_GECDOC")){
        //and sourcestr4 contains
        
        colls = Regex.Matches(sql, "sourcestr([\\w]+) contains '([^']+)'");
        foreach (Match m in colls)
        {
          if (Str.Contains(m.Value, "sourcestr10"))
          {
              sql = Str.Replace(sql, m.Value,"sourcestr" +  m.Groups[1].Value + " regexp '" + m.Groups[2].Value + ".*'");
          }
          if (Str.Contains(m.Value, "sourcestr18"))
          {
              sql = Str.Replace(sql, m.Value,"sourcestr" +  m.Groups[1].Value + " regexp '" + m.Groups[2].Value + ".*'");
          }
          if (Str.Contains(m.Value, "sourcestr19"))
          {
             string valuegroup = RemoveDiacritics(m.Groups[2].Value);
             sql = Str.Replace(sql, m.Value,"sourcestr" +  m.Groups[1].Value + " regexp '" + valuegroup + ".*' 'd'");
          }
 
        }
        
    }

We created the function RemoveDiacritics to replace diacritics to fix issue :


// Remove Diacritics for regexp function
    private string RemoveDiacritics(string result)         
        {
            result = result.Replace('à', 'a');
            result = result.Replace('á', 'a');
            result = result.Replace('ä', 'a');
            result = result.Replace('â', 'a');
            result = result.Replace('ã', 'a');
            result = result.Replace('å', 'a');
            result = result.Replace('é', 'e');
            result = result.Replace('è', 'e');
            result = result.Replace('ê', 'e');
            result = result.Replace('ë', 'e');
            result = result.Replace('ì', 'i');
            result = result.Replace('í', 'i');
            result = result.Replace('ï', 'i');
            result = result.Replace('î', 'i');
            result = result.Replace('ò', 'o');
            result = result.Replace('ó', 'o');
            result = result.Replace('ô', 'o');
            result = result.Replace('ö', 'o');
            result = result.Replace('û', 'u');
            result = result.Replace('ü', 'u');
            result = result.Replace('ù', 'u');
            result = result.Replace('ú', 'u');
            result = result.Replace('ý', 'y');
            result = result.Replace('ÿ', 'y');
            result = result.Replace('ç', 'c');
            result = result.Replace('ñ', 'n');            
            return result;
        }

Multiple treesource1 value for GECDoc  (no longer used)

In order for the document type for the same documents in GECDoc to appear in both tree source "2. DISCIPLINE DOCUMENT" and "3. RELATED DOCUMENTS" branch "TEMPLATE", special configuration is required.
 

In the filemapping/GEC.DocumentType, Documentum value "TEMPLATE" will map to "/2. DISCIPLINE DOCUMENT/TEMPLATE~/3. RELATED DOCUMENTS/TEMPLATE". As the multiFileMapping function cannot support retrieving value which contains ";", "~" is used to replace the special character ";". 

In the Collection's mapping, using the replace function to replace "~" with ";" so as to store the value as a multi-value source tree.

Replace(MultiFileMapping("GEC.DocumentType",property.rho_doctype),"~",";")


Force language for Qualité R&D project (DCT_QUALITY_QRD) (no longer used)


For the interface Qualité (profile=DCT_QUALITY_DGI) , code in the plugin search.cs (OnPageStart() event) have been added to force the interface language to French if the language of the browser is different of  French.

            if (Session.SessionUiLangStr != "fr" && Session.Profile.Name == "DCT_QUALITY_QRD") {
                     Session.SetUiLanguage("fr");
                Session.RecalculateSessionUiLang();
                         }

Linked documents for Qualité R&D project (DCT_QUALITY_QRD) (no longer used)


In the results list linked documents can be displayed (in French Documents associés):

During the indexation the content of the property rrd_q_linked_documents is set in the field sourcecsv4 and the content of the property property.rrd_q_i_linked_id is set in the fieldsourcecsv5.

The property rrd_q_linked_documents contents the list (label) of the linked documents (ex: 4SREAMO003;4SREAMO002).

The property rrd_q_i_linked_id contents the list (id) of the linked documents (ex: 090166358004807a;0901663580048079).

In the search.cs plugin we added a code for the display (OnWriteDocBeforeResultLinks):

public override void OnWriteDocBeforeResultLinks(Doc doc){
    
    if (Str.EQNC(Session.Profile.Name, "DCT_QUALITY_QRD")){
        Hm.Write("<br>");
        Hm.Write("<span style=\"color:#000;\" >Document(s) associé(s) : </span>");
        
    int  i,numberofdocsassoc;
        string[] turl;
         
        turl = doc.Url1.Split('=');
        
    ListStr listLibelle = ListStr.ListFromStr(doc.SourceCsv4, ';');
    ListStr listId = ListStr.ListFromStr(doc.SourceCsv5, ';');
    
    numberofdocsassoc = listLibelle.Count;
    
    if (listId.Count < numberofdocsassoc) numberofdocsassoc = listId.Count;
    
    if (listLibelle.Count > 0 && listId.Count > 0 && numberofdocsassoc > 0) {
        for (i = 0; i < numberofdocsassoc; i++)
        { 
            if(Str.EQNC(listId[i],"0000000000000000")){
                Hm.Write(Ht.Text(listLibelle[i])," ");
            }
            else {
            Hm.Write("<a target=\"_blank\" href=\"",turl[0],"=", Ht.Text(listId[i]) ,"\" style=\"color:#0095D8;\">",Ht.Text(listLibelle[i]),"</a> ");
              }
        }      
        }
    } 
}

Rewritings : allow search on synonym

With Sinequa it's possible to manage a list of synoms on which you can search.

An how-to page explains how yo implent it: https://acew1tsinesin01.eua.solvay.com/doc/en/Content/en.sinequa-es.how-to.rewritings.html?Highlight=rewriting

We implement it for two search interfaces : 

Example:

In http://ehs-search.solvay.com if you search the word PDMB you will find documents that contains PARADIMETHOXYBENZENE:

rewriting expression for thie example:

<rewriting lang="en,fr">
<patterns>
<form>Paradimethoxybenzene</form>
<form>PDMB</form>
</patterns>
<actions>
<erase when="q"></erase>
<gen>%Paradimethoxybenzene%</gen>
</actions>
</rewriting>


Il you add new entries in a rewriting files you will have:

Storage of the rewrtings expressions :  Indexing > Files > Rewritings

Public documents access for Documentum EHS application


We put in place a specific rule for "public" documents in Documentum: anybody of the AD can see documents that can be seen by the Documentum account intranet_generic_user. This account is member of the Documentum group ehs_intranet_users.
Access permissions are set by the import batch in Documemtum according to a security matrix.  
If a document can be seen by the members of the group group ehs_intranet_users in Documentum it could be seen in Sinequa. 
Note that users can open documents via Sinequa because no Documentum account is needed for this operation.

This rule was done in the domain mapping section:
 

External Website for Carechem (not used now, replaced by new app Sachem)


For Carechem (new name  NCEC), we gave an access to Sinequa for users outside the Rhodia network.

Users can access to the profile http://carechem-search.solvay.com (http://acew1psinesin01.eua.solvay.com/ search?profile=FdsCarechem) by this url:

https://fds-carechem-search.solvay.com/SnqCarechem/search

They need an AD account. Login / password: eua\carechem / tHHv871@zQ3

The reverse proxy had been configured to map connections.

To do this, in IIS we created the WebSite Extranet on the port 8081:

The security settings:

In the website Extranet where created an application SDS:


In the file F:/sinequa/sinequa.xml we added this section:

 <WebAppInfo>
 <Name>WebAppVirtualSiteacew1psinesin01</Name>
 <Path>F:\Sinequa\local-data-8081</Path>
  <URLPaterns>http://*/Sinequa/*</URLPaterns>
 </WebAppInfo>

 

Content of F:/sinequa/sinequa.xml on 03.08.2017: 

<?xml version="1.0" encoding="utf-8"?>
<Sinequa>
<DataPath>G:\Sinequa\data</DataPath>
<WebAppName>WebAppacew1psinesin01</WebAppName>
<NodeName>Nodeacew1psinesin01</NodeName>
<NodeData>
<Identities>
<Identity>
<Number>0</Number>
<User>SINEQUA_SVC_PRD</User>
<Domain>EUA</Domain>
</Identity>
<Identity>
<Number>1</Number>
<User>SINEQUA_SVC_PRD</User>
<Domain>EUA</Domain>
</Identity>
</Identities>
</NodeData>
<WebAppInfo>
<Name>WebAppAutoCompletionacew1psinesin01</Name>
<Path>F:\Sinequa\local-data-8089</Path>
<URLPatterns>http://*/SnqAutoCompletion/*</URLPatterns>
</WebAppInfo>
<WebAppInfo>
<Name>WebAppSnqChemtrecacew1psinesin01</Name>
<Path>F:\Sinequa\local-data-8080</Path>
<URLPatterns>http://*/SnqChemtrec/*</URLPatterns>
</WebAppInfo>
<WebAppInfo>
<Name>WebAppSnqCarechemacew1psinesin01</Name>
<Path>F:\Sinequa\local-data-8081</Path>
<URLPatterns>http://*/SnqCarechem/*</URLPatterns>
</WebAppInfo>
<WebAppInfo>
<Name>WebAppSnqNrccacew1psinesin01</Name>
<Path>F:\Sinequa\local-data-8082</Path>
<URLPatterns>http://*/SnqNrcc/*</URLPatterns>
</WebAppInfo>
<WebAppInfo>
<Name>WebAppSnqNrccacew1psinesin01</Name>
<Path>F:\Sinequa\local-data-8083</Path>
<URLPatterns>http://*/SnqDivestitures/*</URLPatterns>
</WebAppInfo>
</Sinequa>

 

We created the file F:\sinequa\website\bin\sinequa_filter.cfg containing these data:

//configuration for subsite 'sinequa' (http://localhost/sinequa/)
+sinequa

Content of the file F:\sinequa\website\bin\sinequa_filter.cfg on 03.08.2017:

//configuration for subsite 'sinequa' (http://localhost/SnqSuggestions/)
+Sinequa
+SnqNrcc
+SnqCarechem
+SnqChemtrec
+SnqAutoCompletion
+SnqDivestitures

 

We created the folder F:\sinequa\local-data-8081 by duplicating the folder F:\sinequa\local-data and after deleting the folders F:\sinequa\locla-data-8081\configuration and F:\sinequa\local-data-8081\status

In the Sinequa administration we created the WebApp WebAppVirtualSiteacew1psinesin01 (section Grid/WebApps)

The URL for the viewing of the document is change in the profile.


TESTPRODUCTION
 External URL

http://qa-carechem-search.solvay.com/carechem-sinequa

NOT DISPONIBLE ON INTERNET

https://fds-carechem-search.solvay.com/SnqCarechem/
 Internal URLhttp://carechem-search-test.solvay.com:8080/sinequa/http://carechem-search.solvay.com:8081/sinequa/
 Expression for the URL display Concat("http://qa-carechem-search.solvay.com/FetchDoc/component/internetdrl?objectId=",SubStringFromEnd(id,0,16))Concat("http://fds-ecm.solvay.com/FetchDoc/drl.html?objectId=",SubStringFromEnd(id,0,16))
 URL display http://qa-carechem-search.solvay.com/FetchDoc/component/internetdrl?objectId=XXXhttps://fds-ecm.solvay.com/FetchDoc/drl.html?objectId=XXX
 Reverse proxy associatedfrlbiswt01.ema.priv.rhodia.com
(FRPARIST07 &  FRPARIST06)
WDCISP04

Note:

If the configuration of Sinequa is changed, the changes will take effect on the WebSite Extranet (8081) after the restart of IIS or after a change by the admin:
http://acew1psinesin01.eua.solvay.com:8081/ sinequa/admin

(Login: eua\dtc_xxx )

Note #1

We are waiting for agreement (Documentum team) to add 2 new external access:

Study information : 

Note #2 added the 23.01.2017 by LR

After the removal of the prefix eua in all domains (operation done week 3-2017) the Carechem interface was not working.

Operations done to fix the issue by LR:

 

 

SILICA ROCS - display the contact of a site (no longer used now)


For the interface http://silica-search.solvay.com/search when a user selects a site in the box PRODUCTION SITE  the contact associated to the site will be displayed in the box SITE CONTACT.

We created the file (Files/File Mappings) Sites_Contacts_SILICA_ROCS (G:\sinequa\data\configuration\files\filemapping\Sites_Contacts_SILICA_ROCS.txt) :

DELPORTE Isabelle;Collonges
PALHARES Luciana;Paulinia
ARCE Jesus;Barquisimeto
SHI Feng;Qingdao Chengyang
STRICKLER Rachel;Chicago Heights
PARENTI Matteo;Livorno
SHI Feng;Qingdao Licang
LEE Sung-Ho;Incheon

This file contains the list of contacts for each sites.

For the collection /Documentum/silica_rocs/ in the Mapping tab we added this entry:

sourcestr26

FileMapping("Sites_Contacts_FAST_SILICA_ROCS",property.sol_doc_site)

For the box DCT_FAST_site_contact we added this line:



In the plugin search.cs we modified the function IsUsed :


public bool IsUsed(Result result, string boxname, string comp_operator, string value)
        {
            bool bok = false;
            int c = result.Query.GetSelectionCount();
            int i = 0;
            for (i = 0; i < c; i++)
            {
                Selection sel = result.Query.GetSelection;
                if (sel.Type == SelectionType.Simple)
                {
                    SelectionSimple simple = (SelectionSimple)sel;
                    if (Str.EQNC(simple.BoxName, boxname))
                    {
                        if (Str.EQ(comp_operator, "="))
                        {
                            if (Str.EQNC(simple.Value, value)) return true;
                        }
                        else if (Str.EQ(comp_operator, "notempty"))
                        {
                            
                            //Sys.Log2(1, "BINGO " + simple.Value );
                            //if (!Str.IsEmpty(simple.Value)) Sys.Log2(1, "BINGO2 " + simple.Value );
                            
                            if (!Str.IsEmpty(simple.Value)) return true;
                        }
                        else
                        {
                            if (Str.IndexOfNoCase(simple.Value, value) > -1) return true;
                        }
                    }
                }
            }

            return bok;
        }


Synonym - Searching for similar words


In order to include search words with the similar meaning, in Sinequa, we used the "synonyme" in the "Synonyms" under the "Advanced" → "Files".

Synonym words
america;americas

Implement Info Box in RCSEHS skin


User request to add a special note in RCSEHS search profile:

Related CSS is implemented in F:\Sinequa\website\skins\rhodiainteractive\rhodia.css

.confluence-information-macro {background:#fcfcfc;border:1px solid #ccc;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;color:#333;margin:10px 0 1em 0;min-height:20px;padding:10px 10px 10px 36px;position:relative}

.confluence-information-macro-tip {background-color:#f3f9f4;border-color:#91c89c}
.confluence-information-macro .confluence-information-macro-icon.aui-iconfont-approve {color:#14892c}
.confluence-information-macro>.confluence-information-macro-body>p:empty{display:none}
.aui-icon-small {line-height: 0;position: relative;vertical-align: text-top;}
.aui-icon-small:before {
color: inherit;
font-family: "Atlassian Icons";
font-weight: normal;
-webkit-font-smoothing: antialiased; /* Improves the rendering of icons */
font-style: normal;
left: -30;
line-height: 1;
position: absolute;
text-indent: 0;
speak: none; /* This prevents screen readers from pronouncing the pseudo element text content used to trigger the icon font */
top: 8;
}
.aui-iconfont-approve:before{content:url("tips.gif")}


A new image is introduced in F:\Sinequa\website\skins\rhodiainteractive\tips.gif

A new javascript is implemented in F:\Sinequa\website\skins\rhodiainteractive\config_rcsehs2_only.js

// Create a flashing banner based on user request

var txt = "For some countries we have to use a dedicated SDS variant to comply with local regulations. For the others, we rely on the more generic \"United Nations\" variant (\"SDS_UN\"). to consult which variant is appropriate for which country, click on the button \"List of SDS variants by country\" above";

// create elements <table> and a <tbody>

var body = document.getElementById("search-table");

var tr = body.insertRow(1); var td = tr.insertCell(0);

var td2 = tr.insertCell(1);

td2.innerHTML = ("<div class=\"confluence-information-macro confluence-information-macro-tip\"><span class=\"aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon\"></span><div class=\"confluence-information-macro-body\"><p>" + txt.fontsize(2) + "</p></div></div>");


RegWatch

The search interface RegWatch is based on a AoDocs library. Some documents have several files attached. When Sinequa indexes documents having several files it creates a record for each files in the index. The key user wanted to group files to the document.

Display for a document having 3 files attached:


To implement this feature, we created a script executed after the indexation. ( \\acew1tsinesin01\works\regwatch_ECO\regwatch.cmd )

echo %date% %time% ++ Start of regwatch.cmd >> F:\works\regwatch_ECO\regwatch.log
call F:\works\regwatch_ECO\export_sourcestr22.cmd 
PowerShell -File F:\works\regwatch_ECO\updatesinequa.ps1
call F:\Sinequa\website\bin\scmd.exe execsql  @F:\works\regwatch_ECO\update_main_doc.sql localhost 10300 > F:\works\regwatch_ECO\update_main_doc.sql.log
echo %date% %time% ++ End of regwatch.cmd >> F:\works\regwatch_ECO\regwatch.log


F:\works\regwatch_ECO\export_sourcestr22.cmd :

F:\Sinequa\website\bin\scmd.exe ExecSqlCsv "select sourcestr22 from idx_AoDOcs where collection='/AoDocs/RegWatch Database/' and sourcestr22 <> '' group by  sourcestr22  order by sourcestr22 asc" F:\works\regwatch_ECO\export_sourcestr22.csv ";"   localhost 10300 


export_sourcestr22.sql :

sourcestr22;cachehit;rowfetchtime;processingtime;matchingrowcount;postgroupbymatchingrowcount
https://ao-docs.appspot.com/?aodocs-domain=solvay.com&#Menu_libraryHome/LibraryId_SyHKCxq19n8V1Rw9Ij;0;1.44 ms;53.31 ms;12487;7202
https://ao-docs.appspot.com/?aodocs-domain=solvay.com&#Menu_viewDoc/LibraryId_SyHKCxq19n8V1Rw9Ij/DocumentId_TdlqFys0RfK94j8csS
https://ao-docs.appspot.com/?aodocs-domain=solvay.com&#Menu_viewDoc/LibraryId_SyHKCxq19n8V1Rw9Ij/DocumentId_Tdq2zYdsZ2PUJ0vvMw
https://ao-docs.appspot.com/?aodocs-domain=solvay.com&#Menu_viewDoc/LibraryId_SyHKCxq19n8V1Rw9Ij/DocumentId_Te2OU2TuK3CWdKodUY
https://ao-docs.appspot.com/?aodocs-domain=solvay.com&#Menu_viewDoc/LibraryId_SyHKCxq19n8V1Rw9Ij/DocumentId_TezgeKmuWVtgRYhyvX
https://ao-docs.appspot.com/?aodocs-domain=solvay.com&#Menu_viewDoc/LibraryId_SyHKCxq19n8V1Rw9Ij/DocumentId_Tf4UYKd7BtJ4lOXSNl

....


This file contains the list of documents in AoDocs (not the files).


The script updatesinequa.ps1 genrates a file like this wich  is executed:

update idx_AoDocs set sourcestr23 = 'Main',sourcecsv6='' where collection ='/AoDocs/RegWatch Database/' and id='/AoDocs/RegWatch Database/|document/TdlqFys0RfK94j8csS/1nsOoz7nVPRx_SoPdxbLsL_LsulauCTXntHHUW6Os3wc' ;


update idx_AoDocs set sourcestr23 = 'Main',sourcecsv6='https://docs.google.com/document/d/17c49izfceHzbct_TzFkqSeAfht_LNVUBn_GuVeBS43M/edit?usp=drivesdk;https://docs.google.com/document/d/1ptLzdVsOqgZ0rkblIgPuS5L6E_BA81tpsQzi7NlDP2E/edit?usp=drivesdk;https://docs.google.com/spreadsheets/d/1WLoZN2yJjwC9An41WyzOOVn9w13RBIUZJKj2AaP-UrM/edit?usp=drivesdk' where collection ='/AoDocs/RegWatch Database/' and id='/AoDocs/RegWatch Database/|document/Tdq2zYdsZ2PUJ0vvMw/1F52JwGoon5Um9w_tDrUlLx8mq1RhRNAUfYZirAspZdM' ;


update idx_AoDocs set sourcestr23 = 'Main',sourcecsv6='' where collection ='/AoDocs/RegWatch Database/' and id='/AoDocs/RegWatch Database/|document/Te2OU2TuK3CWdKodUY/1vE2Lhek6F281jjta1F4ITIgQn6rfj1RV' ;


update idx_AoDocs set sourcestr23 = 'Main',sourcecsv6='' where collection ='/AoDocs/RegWatch Database/' and id='/AoDocs/RegWatch Database/|document/TezgeKmuWVtgRYhyvX/1GNXpDm_NkJN08LZ3MoOj0FSuYcL64P_7' ;


update idx_AoDocs set sourcestr23 = 'Main',sourcecsv6='https://drive.google.com/file/d/1UCFuweka0BKNpCfgB576zlaH0_QPpeHy/view?usp=drivesdk;https://drive.google.com/file/d/1oHhF9HFBH8xvKhFag2q5lmDUZcSh6V52/view?usp=drivesdk;https://drive.google.com/file/d/10_04bLyjYIkeew582ac_xQyaEJWKebCz/view?usp=drivesdk;https://drive.google.com/file/d/1o6FeYipl98Tus3776JaCl84LIjRJqaVy/view?usp=drivesdk;https://drive.google.com/file/d/1ehNkXIUgzDSe1uq9iHA9U0Ukr3zfPhWg/view?usp=drivesdk;https://drive.google.com/file/d/1LHv24BDdG74XhHpxrm8-mk-GCEVYIr8S/view?usp=drivesdk;https://drive.google.com/file/d/1JkdKCqug2m-fUXHDrC-JbzpoTnrcMFLc/view?usp=drivesdk' where collection ='/AoDocs/RegWatch Database/' and id='/AoDocs/RegWatch Database/|document/Tf4UYKd7BtJ4lOXSNl/1IKKnR1gq3NvrHdIgmHAvAUY7AlsjXEuH' ;

...


Salesforce integration in MySolvayPortal

MySolvayPortal (previously CEP) is a customer portal developed in Salesforce environment. Customers and distributors can search for documents  (SDS, TDS,...) and download them.

Documentation Salesforce developer done during the project:

MySolvayPortal - Sinequa : technical specifications to search documents in Sinequa with rest API

MySolvayPortal - Documentum: get and display content of a document stored in Documentum (SDS, RDS & TDS)



Salesforce is able to make search with Sinequa API Rest.

Example of query:


  "method": "search.profile",
  "profile": "DCT_RCSEHS_SDS_CEP",
  "responseType": "SearchResult",

    "query": { "text": "oxygen" ,

            "advanced": [{"type": "simple",
                            "name": "sourcestr41",

                            "op": "eq",
                            "value": "EN"

                            },

{"type": "simple",

                            "name": "sourcestr26",
                            "op": "eq",
                            "value": "USA"

                            },

                          {"type": "multi",
                            "name": "sourcestr2", 
                            "op": "eq", 
                          "Values": [ "P00000021959 ", "P00000019931", "P00000033143", "P00000028144", "P00000015289", "P00000000334", "P00000031407", "P00000031406" 

]}  

                        ]

            }  

}



URLs and accounts


INTEGRATION

TEST (=UAT = PRE-PRODUCTION)

PRODUCTION


Sinequa URL Rest

http://product-documentation-search-test.solvay.com:8088/xrest

http://product-documentation-search-test.solvay.com:8088/xrest

http://product-documentation-search.solvay.com:8088/xrest


URL for test display (html)

http://product-documentation-search-test.solvay.com:8088/search?profile=XXX

http://product-documentation-search-test.solvay.com:8088/search?profile=XXX

http://product-documentation-search.solvay.com:8088/search?profile=XXX


login

(used by Webmethod)

EUA\Wsinequa

EUA\Wsinequa

EUA\Wsinequa (used by Webmethod)  


Webmethodhttps://b2bsim.solvay.com:443/rest/SolvayDocumentation/output/webservice/searchDocumentshttps://b2bsim.solvay.com:443/rest/SolvayDocumentation/output/webservice/searchDocumentshttps://b2b.solvay.com:443/rest/SolvayDocumentation/output/webservice/searchDocuments
Login Webmethod (used by salesforce)salesforcecrm / salesforcecrmsalesforcecrm / salesforcecrmsalesforcecrm / ****** (ask password to Webmethod team or salesforce team)

Profiles created for Salesforce

 

Use

INTEGRATION

TEST

PRODUCTION

Comment

get SDS (docbase RCSEHS)

DCT_RCSEHS_SDS_CEP_INT

DCT_RCSEHS_SDS_CEP_TEST

DCT_RCSEHS_SDS_CEP


get certificates (docbase RCSEHS)

DCT_RCSEHS_CERTIFICATES_CEP_INT

DCT_RCSEHS_CERTIFICATES_CEP_TEST

DCT_RCSEHS_CERTIFICATES_CEP


get RDS (docbase RCSEHS)

DCT_RCSEHS_RDS_CEP_INT

DCT_RCSEHS_RDS_CEP_TEST

DCT_RCSEHS_RDS_CEP

Only Novecare
get TDS (docbase RCSDOC)

DCT_RCSDOC_TDS_CEP_INT

DCT_RCSDOC_TDS_CEP_TEST

DCT_RCSDOC_TDS_CEP

Only Novecare

Not used ?

get TDS, Statement & Brochure (docbase FAST)

DCT_FAST_PRODOC_CEP_INT

DCT_FAST_PRODOC_CEP_TEST

DCT_FAST_PRODOC_CEP


Postman configuration example

SSL for Sinequa's IIS

https://drive.google.com/drive/folders/1PBbRI28FrcGwe2hTZKl7OqbaiUhVuON6

Pre-requisite:

Adding/Removing domains from the SSL

  1. Update the "[ alt_names ]" within sinequa-test.cnf or sinequa-prod.cnf file.
  2. Execute the "generateCSR.bat" to generate the sinequa-test/prod.csr
  3. Send the CSR to ad.operations@solvay.com team to get the signed CSR.
  4. You will receive the signed CSR as .cer file.
  5. Execute the "convertCERtoPFX.bat" to convert the .cer to .pfx file.
    You will be asked to enter the password for encoding the key into this .pfx. Use "Solvay".
  6. Install the pfx into the IIS and bind the port 443 and 8085 with this cert.
  7. No need to restart the IIS.

I:\SSL\

<TBD>


WERCS

In the AWS FSX folder \\amznfsxv6cy69eg.eua.solvay.com\share\WERCS, 182362 SDS are stored for archive purpose. These files were indexed one time and can be search in the https://ehs-all-search.solvay.com/ interface.


The files must be kept in the index. No need to reindex them.

If you want to reindex them (after Syensqo migration), you need to start the connector of the the collection /AWS FSX/WERCS/

Then you have to run the script F:\works\wercs\sql\execute.bat in order to update metaproperties.

Redirection page redirect.aspx


The redirect page redirect.aspx has been created in the folder F:\sinequa\website\

The page is used to search and open directly the document if there is only one document found. This page can be inserted in the intranet to avoid to manage internal id of the Documentum documents (EHS interface).

 <%@ Page Language="VB" Debug="true" %>

 <%

'http://ehs-search.solvay.com/redirect.aspx?text=&advanced=1&precision=&strategy=&sort=globalrelevance.desc&sourcestr2=W7&sourcecsv2=P00000000477&sourcestr22=FR&sourcestr23=SDS_FR

Dim UrlIfNotfound 


if("ACEW1PSINESIN01" = HttpContext.Current.Server.MachineName) then
    UrlIfNotfound = "https://ehs-search.solvay.com"
else
    UrlIfNotfound = "https://ehs-fp-search-test.solvay.com/"
end if

Dim DomainName = "" 


DomainName = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority)

Dim rho_sds_dh_repstatus = ""
if (Request.QueryString("sourcestr2") IsNot Nothing ) then
    rho_sds_dh_repstatus = Request.QueryString("sourcestr2")
end if
if rho_sds_dh_repstatus = "W7" then rho_sds_dh_repstatus = "Released"

Dim rho_sds_rh_specification = ""
if (Request.QueryString("sourcecsv2") IsNot Nothing ) then
    rho_sds_rh_specification = Request.QueryString("sourcecsv2")
end if

 
Dim rho_sds_dh_sbgvid = ""
if (Request.QueryString("sourcestr23") IsNot Nothing ) then
    rho_sds_dh_sbgvid = Request.QueryString("sourcestr23")
end if

Dim language = ""
if (Request.QueryString("sourcestr22") IsNot Nothing ) then
    language = Request.QueryString("sourcestr22")
end if

Dim profile = ""
if (Request.QueryString("profile") IsNot Nothing ) then
    profile = Request.QueryString("profile")
else
    profile = "xECM_SDS_REDIRECTASPX"
end if


Dim URLSinequa = DomainName + "/search?text=&advanced=1&precision=&strategy=&sort=globalrelevance.desc"

URLSinequa = URLSinequa + "&sourcestr13=" + rho_sds_dh_repstatus

URLSinequa = URLSinequa + "&sourcestr2=" + rho_sds_rh_specification

URLSinequa = URLSinequa + "&sourcestr31=" + rho_sds_dh_sbgvid  

URLSinequa = URLSinequa + "&sourcestr41=" + language  

URLSinequa = URLSinequa + "&profile=" + profile  


'response.write (URLSinequa)
'response.end


   %>
 
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" /> 
  <title>Redirect page from Sinequa to Documentum</title>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  
      <style>
        .loader { border: 16px solid #f3f3f3; border-top: 16px solid #3498db; border-radius: 50%; width: 280px; height: 280px; animation: spin 1s linear infinite; position: fixed; top: 40%; left: 40%; }
        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
    </style>
    
</head>
<body> 

<div class="loader" id="sk-loader"></div>

<p style="text-align:center;">
Sinequa opener. Close this page after the opening of the document.<br><br>
  
<b>Total Count:</b>
<span id="idTotalCount"></span><br>    </p>
<script> 
$(document).ready(function() { 
  
var UrlOrigine = '<%response.write(URLSinequa)%>';
  
UrlXml = UrlOrigine + '&type=rest';

console.log('<% response.write(URLSinequa)%>');
console.log(UrlXml);
 

$.ajax({
  type: "GET",
  url: UrlXml,
  dataType: "xml",
  success : function(data) {
                var xml = data;

                var TotalCount = $(xml).find( "TotalCount" ).text();
              
                $('#idTotalCount').html(TotalCount);

                if (TotalCount=="1"  ) { 
                    $( ".loader" ).hide();
                    var UrlDocumentum = $(xml).find( "Url" ).first().text();
                    //alert(UrlDocumentum);
                    window.location.href = UrlDocumentum;
                    //window.close();
                    //window.open(UrlDocumentum); 
                }
                else {
                    window.location.href = '<% response.write(UrlIfNotfound)%>';
                }
            }
});
});

</script>
 
</body>
</html>

From the following link:

http://ehs-search.solvay.com/search?text=&advanced=1&precision=&strategy=&sort=globalrelevance.desc&after=&before=&docformat=&phonetics=1&fuzzysearch=1&sourcestr4=&sourcestr12=sds+for+france&sourcescsv3=&sourcecsv2=&sourcestr7=&sourcecsv1-0=fr+%28french%29&sourcecsv1-1=&sourcestr8=&sourcestr9=&sourcestr10=&sourcestr15=&sourcecsv20=81770

http://ehs-search.solvay.com/search?text=&advanced=1&precision=&strategy=&sort=globalrelevance.desc&after=&before=&docformat=&phonetics=1&fuzzysearch=1&sourcestr4=&sourcestr12=sds+for+france&sourcescsv3=&sourcecsv2=&sourcestr7=&sourcecsv1-0=fr+%28french%29&sourcecsv1-1=&sourcestr8=&sourcestr9=&sourcestr10=&sourcestr15=&sourcecsv20=81770

you can create the following link:

http://ehs-search.solvay.com/redirect.aspx?text=&advanced=1&precision=&strategy=&sort=globalrelevance.desc&after=&before=&docformat=&phonetics=1&fuzzysearch=1&sourcestr4=&sourcestr12=sds+for+france&sourcescsv3=&sourcecsv2=&sourcestr7=&sourcecsv1-0=fr+%28french%29&sourcecsv1-1=&sourcestr8=&sourcestr9=&sourcestr10=&sourcestr15=&sourcecsv20=81770

Anti-virus


It's important that the directory of the indexes (G:\Sinequa\indexes) and the temp folder ( F:\Sinequa\Temp ) are excluded of the scope of the anti-virus.

Tips


Add email in the target link


To add the email in the target link to the document change this line in this Profile / Display:

Force reindexation for all documents in a collection


If the collection has a lot of documents (like EHS), the reindexation process will take days to complete. If possible, don't reindex the whole collection if there are many documents to be reindexed.

Remember to uncheck the box "Force re-indexing" after usage.

You can force the reindexation for all documents in a collection by checking on the "Force re-indexing" in the Collection setting.

Force reindexation for some documents (for not forced reindexation)


You can force the reindexation by changing the value of the field version (backdate the document):

update idx_documentum set version = '1980-01-01'
where collection = '/Documentum/rcsehs/'
and (
filename = 'BBE23952BED08A59E10000000A8F7698.doc'
or filename = '10E53952BED08A59E10000000A8F7698.doc' )

During the next indexation the documents will be processed.

Known issues


2 profiles affected to the same sub-domain


It's important that a sub-domain (ex: magda-search.solvay.com) is affected to only one profile. If not, when you will access to the sub-domain the interface displayed will be randomly one of the tow profiles.

This problem can happen easily when you make a copy of an existing profile to create a new one.

Engine can not start


If the engine can not start open the engine log.

If there is a message like this FATAL: index 'idx_XXX' was not cleanly stopped it means that the index is corrupted.

The only solution is to delete the index (G$\Sinequa\indexes\idx_XXX.hdb) and restart the engine.

You need to create the index and index the collections linked to this index.

This issue can occur if the engine is not correctly stopped (crash server).



Files in "F:\sinequa\temp" folder are not cleared.


The files in the temp folder is cleared at a regular interval set in the node page. If no value is set, the files will only be cleared in 3 hours interval.

Diagnostic a problem


The main issue is that an user call the support to say that he can't see a particular document in Sinequa. For this issue there is two explications: the document was not indexed or the user don't have right to see the document.

Here's the way to diagnostic the problem:

Get from the user the id, the title of the document and its treepath (the Sinequa folder where the document should be) .

Determine in which index it should be (idx_Documentum,...).

Make a request with the ConsoleEngine tool.

For example:



 Request Description
select * from idx_Documentum
 where treepath contains '/Documentum/RCSEHS/EHS/SDS/BU-01/R&D/*'
 limit 30
 List the 30th documents of the treepath /Documentum/RCSEHS/EHS/SDS/BU-01/R&D/ if the index idx_Documentum
select * from idx_Documentum
where filename =  'B9F9414D78DB3226E10000000A8F7697.doc'
 List the document wich has a filename equal to B9F9414D78DB3226E10000000A8F7697.doc



If the document have not been found it can be be explained by these reasons:

    - the document was not in the original application => check in the application

    - the document was not indexed by Sinequa because an exclusion rules => check in the collection configuration the tab General (last section)

Identify the right of the users on Sinequa:

If the document is in the index you have to check the access.

Get the AD id of the user in the file G:\sinequa\data\configuration\domains\Rhodia_AD\<AD name>\content.xml

<AD name> can be one of these values: br-spo, fr-rhodia, sg_rhodia or us-crn

Use this URL to see the effective rights of the user:

http://acew1psinesin01.eua.solvay.com/ custompage?action=userrights&id=Rhodia_AD| <AD ID>

(The Rhodia ID is like that S-1-5-21-2074683374-75502006-538272213-79994)

Compare the date of ACL change in the indexed application with the last date of importation of accounts in Sinequa. If the change have been made after the import start the job of importation of accounts (domain).

Check if the user is in the file of the domain associated to the collection. Open the file G:\sinequa\data\configuration\domains\<domain name>\content.xmland look at his name.

You must find the user and the groups that he belongs. Compare with the ACL of the application => make a request to get the fields accesslist1, accesslist2 and deniedlist1 and compare with the ACL of the user.

See the debug variables of Sinequa:

Sinequa provide a page to see all the variables for debugging purposes.

https://acew1psinesin01.eua.solvay.com/requestdebug

http://acew1tsinesin01.eua.solvay.com/requestdebug

Enable RequestDebug feature:

Maintenance


Stop the application on the Sinequa server


Start the application on the Sinequa server


Issues


Tasks are not launched (scheduler)


Stop Sinequa services (not IIS)

Delete the content of the folders F:\sinequa\locla-data & F:\sinequa\locla-data-8080

Restart the Sinequa services

Not able to access Sinequa with Windows (NTLM / KERBEROS) (no longer used)


Symptoms:

What to do:

  1. Stop IIS service.
  2. Start IIS service.

Cause:

  1. The scheduled recycling of the application pool in IIS will occasionally caused the Sinequa to use another WebApp (due to the load-balancing). 
  2. The swapped WebApp does not support NTLM authentication. Resulted to user being redirected to the login page.

Resolution:

  1. Introduced a script to monitor on the "Sinequa WebApp Name" displayed on the /requestdebug page.
  2. To know more about the script, you can read this wiki.

Logs


The directories of the logs is cleaned automatically by an Infra script. Only the last 10 days are kept.

In case the infra script is not running, perform the following:

  1. Inform Infra (Data centre team) to investigate on the issue.
  2. Manually run the cmd which can clear 7 days of log files.

    forfiles -p "H:\SinequaLog" -s -m *.log -D -7 /C "cmd /c del @path"

Shrink of the indexes


Every week the index files have to be reorganize (shrink).

A command is scheduled. 

Jobs control


Tasks status


In the Tasks Status you can see the list of all scheduled tasks with the status (Column Result). The link Log show you the report of the job. 

Backup & restoration of the indexes


The files of the servers Sinequa are saved every day like all Rhodia's servers.

To have a valid backup  of the folder of the indexes G:\sinequa\indexes the service Sinequa must be stopped during the backup.

However, the Sinequa command Backup can create a valid copy of the index.

Every night, the scheduled command backup (Job Backup indexes) copies the folder of the indexes in the folder G:\sinequa_indexes_dump

There is one subfolder for each index (<name of the index> + ".hdb").

To restore one index you must :

    - check that the folder G:\sinequa_indexes_dump\<name of the folder>.hdb exists 

    - stop the Sinequa services

    - delete the folder G:\sinequa\indexes\<name of the folder>.hdb

    - copy the folder G:\sinequa_indexes_dump\<name of the folder>.hdb into the folder G:\sinequa\indexes\<name of the folder>.hdb

    - start the Sinequa services

After, you can restart the indexation to have fresh data.

Tasks


 TaskWho can do it Comment
 Check the indexationSinequa administratorCheck the log files  every day 
 Create a new collectionSinequa administratorConfigure a new collection and a new partition
 Update the softwareSinequa administratorMake it the test server first and test
If test ok make it on the production server
 Diagnostic a problemSinequa administratorSee the diagram

Deployment from test server to production server


All configuration settings are stored in xml files (G:\Sinequa \data\configuration).

There are different ways to apply changes on the production server.

Note that if you change or add an xml files you will not see the change in the administration interface. To see them you have to make pseudo change (like a Unix touch) in the administration interface. For example go to menu Global options, click on the button  and click on the Save button.