In moodle, when I do a global search of *.* I get the same results. If I put in 'title:practice' I also get results. If I just put in 'practice' I get no results. I cannot figure out why! Surely it can't be required of the users to prepend their search with 'title' or 'content' in order to get results.
Moodle: Moodle 3.7+ (Build: 20190620)
OS: CentOS Linux release 7.6.1810 (Core)
Database: mysql Ver 15.1 Distrib 10.2.26-MariaDB, for Linux (x86_64) using readline 5.1
PHP: PHP 7.1.31 (cli)
Am going to venture a guess that your question is beyond the intended scope of these forums and is more a Solr question than a moodle one.
Having said that ... maybe the following will help:
*.* suggest thinking like DOS/Windows ... a global all?
Wonder what that would return (if solr/lucene could) to a browser and if the browser could actually handle all that data? (all of internet?)
'Deep dive' into Solr Search:
http://www.solrtutorial.com/solr-query-syntax.html
On page above:
Wildcard matching
Note that Lucene doesn't support using a * symbol as the first character of a search.
http://www.solrtutorial.com/schema-xml.html
And saw a warning that once a site is indexed, should not change scheme.xml.
Will defer this response to any programmer of Moodle that worked on Solr search, however!
'SoS', Ken
I don't know that this is a 'solr' problem per se. I guess I need to know in what format moodle sends it's regular one-word queries to solr. I did a bunch of config to solr in order to set up a default search field. Within the solr UI I could punch in my keyword of 'practice' by itself and get the appropriate results. Within moodle I still got no results. I don't know what moodle is sending to solr to get results but maybe it's modifying it in some way?
When I used to run it, the only thing I re-call doing was the solr command to create the moodle index. No tweaking out side of that.
Isn't there a setup screen in moodle for solr search that has an 'index' link? If not, there is a CLI way @
https://docs.moodle.org/37/en/Global_search
General Setup section #5
which says:
You now need to populate the created Solr index with your site's data. You can do it via the web interface by going to Site administration > Reports > Global search info or from the CLI by running the search/cli/indexer.php script. The CLI script is the recommended option for big sites.
# sudo -u www-run php search/cli/indexer.php --forceComment: because of the additional setup/software ... java, etc ... which, to me, added to the attack vectors of server, I opted to use the now built in "Simple Search". Yes, probably not as powerful, but maybe just enough?
'SoS', Ken
Experiencing the exact same issues here Tyler.
- Moodle 3.5.10
- Solr 5.5.5
- Ubuntu 16.04
- MySQL 5.7.17
Have you made any progress with this?
Sadly, I never got this to work and switched back to Simple search.