ElasticSearch Essentials

ElasticSearch Essentials [Paid] 3.15.12

No permission to buy ($30.00)
If you are using docker; make sure it is export services to the global internet outside of your firewall configuration. This is a known common misconfiguration issue

Check that it isn't listening on a 0.0.0.0 which is all IPs for the host.

For any more troubleshooting, this is something you should post in:
 
@Xon I think I have fixed with this setting but I can not Re-Configure enhanced search. Before I have used MySQL database name is Index name but now can't update Index name in Admin CP.

Code:
cluster.name: forumsearch
node.name: node-forumsearch
http.port: 9200
xpack.security.enabled: false
#http.host: 0.0.0.0

Error via /admin.php?enhanced-search/indexes

ScreenShot00064.png
 
Last edited:
I'll investigate to see how my add-on's can be harden when elasticsearch isn't reachable.

I can enter Configure enhanced search with disabled Search Improvements addon but Add XenForo field in Admin Control Panel in field Elasticsearch Index Name then Test setting can not connection to Elasticsearch server when Elasticsearch server is still running. So for fix need disable cluster.name: in elasticsearch.yml files then Admin Control Panel in field Elasticsearch Index Name Test setting are working. Also how to fix Unassigned shards?

ScreenShot00065.png

Does this OK Allocated memory is 0 bytes? When Allocated memory is used? I have setting in /etc/elasticsearch/jvm.options

Code:
-Xms512m
-Xmx512m

ScreenShot00066.png
 
Last edited:
I can enter Configure enhanced search with disabled Search Improvements addon but Add XenForo field in Admin Control Panel in field Elasticsearch Index Name then Test setting can not connection to Elasticsearch server when Elasticsearch server is still running. So for fix need disable cluster.name: in elasticsearch.yml files then Admin Control Panel in field Elasticsearch Index Name Test setting are working.
Updating to Search Improvements v2.10.4 will fix elasticsearch not being accessible from blocking access to the index page.


Also how to fix Unassigned shards?

View attachment 289285

You need to run two commands.

This command will setup defaults for when the index is recreated:
Code:
curl -XPUT 'http://localhost:9200/_template/default' -H 'Content-Type: application/json' -d'{
  "template": "*",
  "settings": {
    "number_of_replicas": "0"
  }
}'

This will adjust the existing index:
Code:
curl -XPUT 'http://localhost:9200/_settings' -H 'Content-Type: application/json' -d '{
  "index" : { "number_of_replicas" : "0" }
}'

There is no point having any replicas when you've just the once elasticsearch instance.

Does this OK Allocated memory is 0 bytes? When Allocated memory is used? I have setting in /etc/elasticsearch/jvm.options

Code:
-Xms512m
-Xmx512m

View attachment 289286
Allocated memory is how much it is using for queries, this will be quite low if you don't have a any frequent queries happening that require a lot of buffering.
 
This command will setup defaults for when the index is recreated:

This command give me error result.

Code:
[root@na ~]# curl -XPUT 'http://localhost:9200/_template/default' -H 'Content-Type: application/json' -d'{
  "template": "*",
  "settings": {
    "number_of_replicas": "0"
  }
}'
{"error":{"root_cause":[{"type":"parse_exception","reason":"unknown key [template] in the template "}],"type":"parse_exception","reason":"unknown key [template] in the template "},"status":400}[root@na ~]#

I think This command are working?

Code:
[root@na ~]# curl -XPUT 'http://localhost:9200/_settings' -H 'Content-Type: application/json' -d '{
  "index" : { "number_of_replicas" : "0" }
}'
{"acknowledged":true}[root@na ~]#
[root@na ~]#

Does now OK? I see now Active shards: 3 (100%) but before Active shards: 1 (50%)

ScreenShot00067.webp

So Allocated memory is used automatically based on user Search?
 
This command give me error result.

Code:
[root@na ~]# curl -XPUT 'http://localhost:9200/_template/default' -H 'Content-Type: application/json' -d'{
  "template": "*",
  "settings": {
    "number_of_replicas": "0"
  }
}'
{"error":{"root_cause":[{"type":"parse_exception","reason":"unknown key [template] in the template "}],"type":"parse_exception","reason":"unknown key [template] in the template "},"status":400}[root@na ~]#
Elasticsearch keeps changing this stuff. Try:
Code:
curl -XPUT 'http://localhost:9200/_template/default' -H 'Content-Type: application/json' -d'{
  "settings": {
    "number_of_shards": "1",
    "number_of_replicas": "0"
  }
}'
The number of shards bit will take a re-index to apply.

So Allocated memory is used automatically based on user Search?
yes.
 
Elasticsearch keeps changing this stuff. Try:

Still have Error.

Code:
[root@na ~]# curl -XPUT 'http://localhost:9200/_template/default' -H 'Content-Type: application/json' -d'{
  "settings": {
    "number_of_shards": "1",
    "number_of_replicas": "0"
  }
}'
{"error":{"root_cause":[{"type":"action_request_validation_exception","reason":"Validation Failed: 1: index patterns are missing;"}],"type":"action_request_validation_exception","reason":"Validation Failed: 1: index patterns are missing;"},"status":400}
[root@na ~]#
 
Still have Error.

Code:
[root@na ~]# curl -XPUT 'http://localhost:9200/_template/default' -H 'Content-Type: application/json' -d'{
  "settings": {
    "number_of_shards": "1",
    "number_of_replicas": "0"
  }
}'
{"error":{"root_cause":[{"type":"action_request_validation_exception","reason":"Validation Failed: 1: index patterns are missing;"}],"type":"action_request_validation_exception","reason":"Validation Failed: 1: index patterns are missing;"},"status":400}
[root@na ~]#

Code:
curl -XPUT 'http://localhost:9200/_template/default' -H 'Content-Type: application/json' -d'{
  "index_patterns": ["*"],
  "settings": {
    "refresh_interval": "5s",
    "number_of_shards": "1",
    "number_of_replicas": "0"
  }
}'
I think this will work, looks like it changed sometime in ES7
 
Code:
curl -XPUT 'http://localhost:9200/_template/default' -H 'Content-Type: application/json' -d'{
  "index_patterns": ["*"],
  "settings": {
    "refresh_interval": "5s",
    "number_of_shards": "1",
    "number_of_replicas": "0"
  }
}'
I think this will work, looks like it changed sometime in ES7

Yes this is Working. So this change will be apply when make new re-index? Also Allocated memory still 0 bytes. Why not using any memory, Does have any issue for this issue?
 
Yes, that command adjusts new index creation. The allocated memory stuff only matters if you've got a lot of concurrent requests (or a large posting volume happening at the one time)
 
where i can learn more about content weighting score modes (sum, multiply, avg) settings and how to set it up for the most relevant results?
 
where i can learn more about content weighting score modes (sum, multiply, avg) settings and how to set it up for the most relevant results?

Look for "score_mode", and frankly tuning this is very much an art-form and relies heavily on subjective assessment and iterative testing. It also depends on the options: "Weight by contents reactions"/"Weight by contents views"/"Weight by reply count (threads)", as the types and sizes of the scores matter.

The default of "sum" with a 0.4 weight for thread reply length works well enough. It biases to longer threads without completely outweighing other scoring signals.

There really aren't any decent tools to actually inspect the returned scores as XF discards that information fairly early in handling the elasticsearch response.
 
I notice that the Elasticsearch index get lost by itself after a certain time.

My envoirement:
- Elasticsearch v7.17.12 (via Docker Instance on Plesk Panel)
  • Search Improvements 2.10.4
  • ElasticSearch Essentials 3.15.8

Server error log.
1691390786081.webp
 
I notice that the Elasticsearch index get lost by itself after a certain time.

My envoirement:
- Elasticsearch v7.17.12 (via Docker Instance on Plesk Panel)
  • Search Improvements 2.10.4
  • ElasticSearch Essentials 3.15.8

Server error log.
View attachment 289548
You are exposing your elasticsearch instance to the internet. This is the default configuration of docket, where it will bypass most standard firewall setups.

Don't do that.
 
You are exposing your elasticsearch instance to the internet. This is the default configuration of docket, where it will bypass most standard firewall setups.

Don't do that.
How do I solve it ?
 
I don't use elasticsearch in a docker configuration, I recommend posting in this subforum about troubleshooting it:

Okey no Problem, I can also install it directly on my Webserver.
Which Elasticsearch version and configuration you recommend ?
 
Okey no Problem, I can also install it directly on my Webserver.
Which Elasticsearch version and configuration you recommend ?
Digital Ocean tend to have good tutorials on this:

If you just make it listen on localhost, you don't need todo any of the firewalling.
 
Hey guys, does anyone know which configurations I have to set so the search is more exact?

For example, I have an addon that uses XF's enhanced search but the search results are very exact (the way I want it).
1692947453444.png

However, using this awesome elastic search autocomplete addon, it returns
1692947428708.png

I tried these settings below:
Untitled.png
 
Top Bottom