Skip to main content

Solr commands

On an Ubuntu 20.02 system with Nginx, you can utilize the following commands to handle Solr:

Solr clearing out the data

Cleaning out or clearing data in Solr can be done in a few different ways, depending on your specific requirements.

 

Delete All Documents

You can use the Solr Admin interface or send a DELETE request to remove all documents from a Solr core.

How to remove .DS_Store from your git repo

Working from the bases that .DS_Store has not been added to your git repository, then you can add it to your .gitignore file.

touch .gitignore

In the .gitignore file add the following

# Hide the DS_Store files
**/.DS_Store

However, if it's already there, then in Terminal you will need to write:

VS Code - Unable to locate phpcs

phpcs issue in Visual Studio Code, I'm receiving this warning in VS Code:

phpcs: Unable to locate phpcs. Please add phpcs to your global path or use composer decency manager to install it in your project locally.

 

How to fix

You can install phpcs by using composer global command:

composer global require squizlabs/php_codesniffer

Then in VS Code, go to 

Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead

Oh the treasure of a client coming to you with a site they have removed the previous dev on... treasure hunt.  Not.

Anyway, gaining access to an old site, working through the errors I came across this deprecated code

Deprecated function: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in common_check_language() (line 306 of /path/to/file).

 

Creating a CI/CD that uses GitHub Actions for Laravel

Do you want set up a CI/CD process using GitHub Actions?

This is a walk-through basic setup to automate your integrations and deployments for your projects.

 

GitHub Actions

GitHub Actions allows for your code can be built, tested and deployed from GitHub.  Let's explore an approach in managing CI/CD processes using GitHub Actions.

 

Could not open input file: artisan

If like me you tried the command

php artisan

However, you had the following “Could not open input file: artisan” error when starting the Laravel service using the above command.

 

How come “Could not open input file: artisan” error is showing up in Laravel

There are a few causes behind this error.

How To Install Apache Solr 8.11 on CentOS/RHEL 7

Looking to install Solr on your server?  Not sure if it worth the effort?  Well, Apache Solr is the open-source, popular, super fast open source enterprise search platform from the Apache Lucene project.  Written in Java, Solr is highly scalable, providing fault-tolerant distributed search and indexing.

Let's walk through the steps I went through to install Solr on Centos 7.

 

Step 1: Java

Check if Java is installed on your server:

Subscribe to 8.x