Global Search

Re: Global Search

by David Monllaó -
Number of replies: 5

Hi Cesar,

You could also try with https://github.com/catalyst/moodle-search_elastic

In reply to David Monllaó

Re: Global Search

by Shadi Aljendi -

Hello,

I already posted this as a separate message, but also thought that I might post it here.

I am trying to run Elasticsearch on my sandbox moodle (3.3) running on a virtual machine with Ubuntu Server 16.04.3 LTS. My problem is with indexing. when I try to index the content of my moodle site, I am getting # docs= 0, # records=n , ignored = n (the same number of records). The same thing happens if I force indexing in the terminal (using the php command line) which will return fro all entries: "No new documents to index for ... etc."). 

In order to index the content, I run Tika in a terminal, run elasticsearch service and then run indexing either from the terminal or from scheduled tasks. either way, it seems that it is running, but the # docs will stay = 0, and if I search for a word, will get "No results". If anybody can let me know what am I missing, I would really appreciate it!

Thanks!


In reply to Shadi Aljendi

Re: Global Search

by Ken Task -
Picture of Particularly helpful Moodlers

Not sure that ElasticSearch is the same thing as the Solr search in Moodle ... so one could be confusing things (I am by your posting.   Sorry ... not you necessarily ... don't run ElasticSearch).

So here's a question, since you have terminal access ...

What do you see when issuing: ps aux |grep java

Moodle's search uses apache solr which requires Java run time to be installed and running as a service.

And if you run the re-index from the Moodle Admin UI, what does it show/do?

'spirit of sharing', Ken


In reply to Ken Task

Re: Global Search

by Shadi Aljendi -

Thanks Ken,

ElasticSearch is not the same as Solr. It is a different plugin.

Because ElasticSearch is easier to install in moodle, I decided to use it, after running into a lot of issues with solr, not able to making it run! (last one was: "Error creating the Solr schema: Field "courseid" already exists in Solr schema.").

If you can kindly help with solr I can get back to it and try to get it work (maybe in a different forum entry?). Please let me know.

Thanks!


In reply to Shadi Aljendi

Re: Global Search

by Ken Task -
Picture of Particularly helpful Moodlers

@Shadi ...

Ok, realized, after reading your post via EMail, I should have read the thread for context (something Moodle has a lot of .... context that is).    So the alternative suggestion to running Apache Solr on a server came from this posting:

https://moodle.org/mod/forum/discuss.php?d=348979#p1459076

Your Ubuntu 16.04 LTS ... is it also in Amazon?  or is it in some other VM located else where?

Sometimes, VM's do make a diff.  especially when your server is @X and one is using Amazon located @A, B, or C.

There's a note in the setup of Amazon's ElasticSearch ...

"NOTE: The instructions below should only be used for test and dev purposes. Don't do this in production. For a production setup we recommend Elasticsearch running as a cluster, getting started documentation can be found here: https://www.elastic.co/guide/en/elasticsearch/reference/current/setup.html "

So do you have a cluster?

While I do have a site running Solr search, it's a sandbox, but found that the key was/is getting the SolrSearch server (a java app) running with the 'right' setup of the index for the moodle index.

Running cron job often enough so that whatever Solr is indexing is kept 'up to date' helps reduce the load.

So, what specifically, brought on the error you are kinda reporting?    I, also, have had issues that I couldn't resolve via the Moodle UI as admin, but finally got 'nasty' and removed the index entirely via command line, and rebuilt it.

Since you have Linux, think you could also do that.

Don't know that one could have the local Apache Solr running at the same time as ElasticSearch or not.

Will send a PM with a URL that you could look over.

'spirit of sharing', Ken