How do I treat the phrase as individual words in Search? I have a problem in our Search results. We are using Search API and Search API Solr modules running in drupal 8.

We have successfully indexed our content in Solr and is pretty working.

For example, I have a term called "Jakarta Law firm" and it will display the results like: Jakarta Law Firm in 2000, Jakarta Law Firm in 2001, etc.

However, if I searched "law firm Jakarta", it will return no results. Can you please tell me if there are any configurations in Solr or in the module so that it will search whatever the order of the search words? Or may I know what is the Solr term functionality that will handle that? Or any hooks that we can use?

I really appreciate your help about this!
When adding text fields to your search index, you need to indicate it's usage by specifying if you want it to be a Fulltext field or a String field.



You can add the field twice, once a String and once as a Fulltext field.

If you are using views, you'll want to make sure your full text search exposed filter includes the Fulltext version of this field, and is set to "Contains any of these words"