Solr search result changes depending on browser used

cancel
Showing results for 
Search instead for 
Did you mean: 
Giuliano
Active Member II

Solr search result changes depending on browser used

Just intalled a new instance of Alfresco 6.2...Loaded some documents into

With the same said running server, performing the test simultaneously with different devices:

  • IF I perform a query from the laptop (ubuntu + Firefox 85.01) the rusult shows all the files CONTAINING that(those) word INSIDE  the document or in the filename
  • IF i perform a query from the laptop (ubuntu + Chrome  88.0.4324.150) the result shows all the files that has the FILENAME containing that word
  • IF i perform a query from and Android tablet (Firefox or Chrome ) the result shows all the files that has the FILENAME containing that word

There are no error in catalina log  nor in solr log... ( well... actually firefox is getting the expected results...)

strange indeed...

 

Does this strange behaviour suggest what could be wrong in the solr/alfresco configuration ?

May the different user agent make Solr answer in a different way ?

 

Thanks in advance for your help...

Giuliano

4 Replies
arjunmony
Established Member

Re: Solr search result changes depending on browser used

Hello,

Please check your locale values,

# Data types that support cross locale/word splitting/token patterns if tokenised
alfresco.cross.locale.datatype.0={http://www.alfresco.org/model/dictionary/1.0}text
alfresco.cross.locale.datatype.1={http://www.alfresco.org/model/dictionary/1.0}content
alfresco.cross.locale.datatype.2={http://www.alfresco.org/model/dictionary/1.0}mltext

GitHub - keensoft/alf-21940-repo: Alfresco SOLR issue when using multiple locales 

sufo
Established Member II

Re: Solr search result changes depending on browser used

As arjunmony writes, it depends on different locales used. It does not depend on user agent but on a language that is set in your browser (most probably, you have different language set in tablet compared to laptop). So for example if you search in EN you can get different results compared to search in DE, but it will match filenames because for the name property cross locale is already enabled:

# Data types that support cross locale/word splitting/token patterns if tokenised
alfresco.cross.locale.property.0={http://www.alfresco.org/model/content/1.0}name
alfresco.cross.locale.property.1={http://www.alfresco.org/model/content/1.0}lockOwner

https://docs.alfresco.com/search-community/concepts/solr-shared-properties.html 

Giuliano
Active Member II

Re: Solr search result changes depending on browser used

Hi
followed (... or I believe !) your hints, but still NO SUCCESS :-(

premise:

When installing the server, I DID SET the current SERVER LOCALE to italian, as in my github extension to @jpotts ansible scritp (thanks jpotts for sharing the scripts !)

https://github.com/Giuliano69/ansible-alfresco/blob/master/ans_mngd_node.sh

See function system_configuration() {.....  sudo locale-gen "$LOCALESUPPORT" .... )

So i "believe" Alfresco is "aware" of the local server language...

I tooke the suggestion to set set the server locale for alfresco, following  @loftux  scritp https://github.com/loftuxab/alfresco-ubuntu-install , made for ACS 6.1

 


Procedure operatad following your hint (hope I understood correctly!)

  • 1- changed ..../solrhome/conf/shared.properties as follows



Spoiler

# Shared Properties file

#Host details an external client would use to connect to Solr
solr.host=localhost
#If not set then solr.port will be the jetty.port
#solr.port=8983
solr.baseurl=/solr
solr.content.dir=/opt/alfresco/alf_data/solr6

# Properties treated as identifiers when indexed

alfresco.identifier.property.0={http://www.alfresco.org/model/content/1.0}creator
alfresco.identifier.property.1={http://www.alfresco.org/model/content/1.0}modifier
alfresco.identifier.property.2={http://www.alfresco.org/model/content/1.0}userName
alfresco.identifier.property.3={http://www.alfresco.org/model/content/1.0}authorityName
alfresco.identifier.property.4={http://www.alfresco.org/model/content/1.0}lockOwner

# Suggestable Propeties
#alfresco.suggestable.property.0={http://www.alfresco.org/model/content/1.0}name
#alfresco.suggestable.property.1={http://www.alfresco.org/model/content/1.0}title
#alfresco.suggestable.property.2={http://www.alfresco.org/model/content/1.0}description
#alfresco.suggestable.property.3={http://www.alfresco.org/model/content/1.0}content

# Data types that support cross locale/word splitting/token patterns if tokenised
alfresco.cross.locale.property.0={http://www.alfresco.org/model/content/1.0}name
alfresco.cross.locale.property.1={http://www.alfresco.org/model/content/1.0}lockOwner

# Data types that support cross locale/word splitting/token patterns if tokenised
alfresco.cross.locale.datatype.0={http://www.alfresco.org/model/dictionary/1.0}text
alfresco.cross.locale.datatype.1={http://www.alfresco.org/model/dictionary/1.0}content
alfresco.cross.locale.datatype.2={http://www.alfresco.org/model/dictionary/1.0}mltext

alfresco.model.tracker.cron=0/10 * * * * ? *

 

  • 2- removed solr alfresco/archive index as @jpotts script


https://github.com/jpotts/ansible-alfresco/blob/master/removeSolrIndexMetadata.yml

 

  • 3- reindexed

as suggested from @arjunmony  in the  @keensoft repo https://github.com/keensoft/alf-21940-repo

  • 4 - Test search :-(

Tried accessing form laptop-Firefox in anonymous mode, ... and everything works.

But fails from laptop+chrome or tablet+firefox/chrome

 

Open QUESTIONS on locale problem:

  • a-DID I perform the CORRECT procedure you intended to do to fix the locale sol6 problem ?
  • b -how can I check WHICH is the CURRENT LOCALE used by SOLR?
  • c- how can I check (and SET) WHICH is current LOCALE in BROWSERS  to match solr6 expectations ?
  • d- IF I would activate suggestable properties, should I reindex AGAIN the solr6 index, or is it not necessary ?
  • e - IS the setting of server locale (used in ACS 6.1) still needed/suggested in ACS 6.2  ?

Thanks again for your precious help !

cristinamr
Intermediate II

Re: Solr search result changes depending on browser used

I have something similar long time ago and my solution was config tomcat's locale and also being sure about the local of the database (this step depend on which datavase are you using).

 

--
Check our products: AQuA : https://aqua.venzia.es | Seidoc : https://seidoc.es