Search

The errors for Session/Query log should be easily fixed by adding another _ , so the function call is __('Text here')

@brendo, this solution fixes the session and query log errors. Thanks!

On the other hand, I am still running into my machine freezing completely when I'm in the middle of re-indexing the "Speeches" section. My guess is that the "Speeches" dataset is so large and the ElasticSearch settings on my local development machine are probably not properly tailored for a local machine.

Since, I'm a newbie with ElasticSearch, I'm unsure where the problem can be.

Has anyone else been able to re-index the "Speeches" section of @nickdunn's Surfin' Shakespeare demo on their local development machine? If so, would you mind sharing your ElasticSearch setup, especially if you made any tweaks to the ElasticSearch config for a local machine?

Thanks!

Got it to work. In the elasticsearch.yml file that is found on your machine's elasticsearch config folder (not the Symphony extension), I disabled the index.number_of_shards and index.number_of_replicas.

index.number_of_shards: 0
index.number_of_replicas: 0

This seemed to fix the freezing problem, and I was able to re-index all of the "Speeches" entries.

@designermonkey, my mappings are pretty much a carbon-copy of Nick's, with the field names changed obviously..

One of them (for searching across job listings) is as follows:

{
    "jobs": {
        "properties": {
            "title": {
                "type" : "multi_field",
                "store": "yes",
                "fields": {
                    "title": {"type" : "string"},
                    "symphony_fulltext" : {"type" : "string", "analyzer": "symphony_fulltext"},
                    "symphony_autocomplete" : {"type" : "string", "analyzer": "symphony_autocomplete"}
                },
                "boost": 3.0
            },
            "description": {
                "type" : "multi_field",
                "store": "yes",
                "fields": {
                    "description": {"type" : "string"},
                    "symphony_fulltext" : {"type" : "string", "analyzer": "symphony_fulltext"}
                },
                "symphony_highlight": "yes"
            }
        }
    }
}

The odd thing is that for a particular job listing I can search on one term and get highlighted results, but then searching on a word in a subsequent paragraph returns results missing highlights..??

Thanks for your help, really appreciate it.

Was just poking through Nick's README and it mentioned configuration for highlighting is stored in the config file? Perhaps you could look at playing with those variables and reindexing the entries?

Thanks @brendo, I played with those settings early on but no joy.. I'll keep digging.. I still think that the issue is down at the ES service level..

Forgive me for the stupid questions.

  • Has anyone gotten this to work well on a small VPS?
  • I have a Linode 512MB account and was wondering if anyone else has had success on 512Mb?
  • Also, on that specific web server, what type of web server (ex. Apache, Nginx, Litespeed, Hiawatha) are you running and what other services do you have running on that machine?
  • Also what is your min/max memory set to in your ES settings? Also, what is index.numberofshards: set to? And index.numberofreplicas: ?

I have a Linode 512MB account and was wondering if anyone else has had success on 512Mb?

Yes, I run it on a Linode of the same size.

what type of web server are you running and what other services do you have running on that machine?

Ubuntu 10.04, Apache. Other services include: MySQL, Varnish, ElasticSearch, ffmpeg, some crappy control panel (poor mans cPanel), a heap of cron tasks.

Also what is your min/max memory set to in your ES settings? Also, what is index.numberofshards: set to? And index.numberofreplicas

Off the top of my head, no idea, whatever the defaults are.

Has anyone gotten this to work well on a small VPS?

Yes. At first I had everything on a 512MB VPS, but I switched to 1024MB mostly because of storage and bandwidth. Memory was fine.

Also, on that specific web server, what type of web server (ex. Apache, Nginx, Litespeed, Hiawatha) are you running and what other services do you have running on that machine?

Debian 6, Hiawatha, PHP FCGI, Mysql, backup scripts (cron'ed). Nothing much really.

Also what is your min/max memory set to in your ES settings? Also, what is index.numberofshards: set to? And index.numberofreplicas: ?

Just the defaults. I haven't had problems with them (yet), so I don't think there's much reason to change.

FYI: Even GitHub uses Elasticsearch

To get back to this: the traffic on the website has gone up quite a bit, as is the number of articles in the index.

I am now glad I have switched to the 1024MB vps, as ES is taking around 400MB, with (seemlingly) random spikes of up to 600MB. Now, together with the OS, Hiawatha, PHP, Mysql and Varnish, I am steadily using 800MB of ram.

ElasticSearch is working very well, but I do recommend writing your own datasource for it. ES is very, very powerful, and the datasource provided with this extension just shows the tip of the iceberg.

@michael-e: FYI there also was some mystical stuff going on concerning RSA keys :)

AFAIK, that was not mystical at all. People had pushed RSA keys to public repos, and Elasticsearch found them. :-)

Is there a way to set a crontab to automatically reindex all the entries? I have a small personal project that archives all my different content feeds (twitter, delicious, pocket, &c), but at the moment I manually reindex when I remember, but would like to reindex on a daily basis.

Is there any reason you'd need to reindex ll of the entries?

The extension indexes every new entry created, so if you've indexed all of your previous ones for the first time, then it should add to the index when you create another.

Odd. It isn’t adding to the index (searching for things I know are in new entries does not show up until I reindex, nor does the number of entries tick up). I suppose that means I need to check my config…

How are you adding the entries? The ES extension hooks itself into a few delegates, but it is of course possible that your method of importing does not fire these delegates.

Ah, interesting.

I’m using crontabs to launch XML importers via symphony/extension/xmlimporter/importers/run/[importer]/?auth-token=[token]

Aha!

Then Elastic Search doesn't subscribe to those delegates.

Booo, a problem that doesn’t have an immediate fix.

Yeah! I know where to look!

I guess it’s time for me to start digging into the delegates API. Thanks for the assistance.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details