OrchardCore icon indicating copy to clipboard operation
OrchardCore copied to clipboard

Orchard corrupts Elastic stemmer configuration

Open Lenar-Avia opened this issue 5 days ago • 2 comments

Describe the bug

Customer Elastic analyzers configuration from OrchardCore_Elasticsearch block gets corrupt

Orchard Core version

1.8.2

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'OrchardCore_Elasticsearch' section in configuration
  2. Try to set up simple stemmer analyzer, SPANISH for example, as explained at: https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-lang-analyzer.html#spanish-analyzer
  3. Make sure you have both "analyzer" and "filter" sections inside "analysis" block
  4. Save and apply configuration
  5. Check out current GET .../_settings of elastic - to find out there is no "analysis.filter" area. i.e. actual settings now do not contain "filter" area (on the same level as "analyzer")
  6. Check out the termvectors to see that no handling happened to substrings.

Expected behavior

I would expect the termvectors to be created using stemmer. When directly setting config using PUT ../_settings , custom morphological analyzer can be applied.

Logs and screenshots

Please try to reproduce the following settings using OrchardCore_Elasticsearch:


"analysis": {
  "filter": {
	"spanish_stop": {
	  "type":       "stop",
	  "stopwords":  "_spanish_" 
	},
	"spanish_stemmer": {
	  "type":       "stemmer",
	  "language":   "light_spanish"
	}
  },
  "analyzer": {
	"default": {
	  "tokenizer":  "standard",
	  "filter": [
		"lowercase",
		"spanish_stop",
		"spanish_stemmer"
	  ]
	}
  }
}

Lenar-Avia avatar Jun 28 '24 13:06 Lenar-Avia