get node by address field and part of name I have a content type which have a name field and address field.

I want to retrieve programmatically all the nodes in a specific city and wich contain in his name one or many keywords.

For example i want to search in "Paris" the node wich contain in name the word "beautiful" and/or "shop". Then i can retrieve theses results :
- "My beautiful shop of candies" in "Paris"
- "Fast shop" in "Paris"

The problem is that i don't know how to get nodes by a word containing in :/

Here is my current code :

$query  =  new EntityFieldQuery();

$entities  =  $query-&gt;entityCondition( 'entity_type', 'node' )
    -&gt;propertyCondition( 'status', 1)
    -&gt;fieldCondition( 'field_adress', 'locality', 'Paris', 'like' )
    -&gt;fieldCondition( 'field_name', 'value', array('beautiful', 'shop', 'money') )
    -&gt;execute();

dsm($entities);


I tried to change :

-&gt;fieldCondition( 'field_name', 'value', array('beautiful', 'shop', 'money') )


to

-&gt;fieldCondition( 'field_name', 'value', array('beautiful', 'shop', 'money'), 'CONTAINS' )


but I get this error :


  Warning : addcslashes() expects parameter 1 to be string, array given
  dans DatabaseConnection->escapeLike() (ligne 984 dans
  /Applications/MAMP/htdocs/fritr/includes/database/database.inc).
You could do this by building the query up in smaller chunks and using a loop to add the field conditions for the mulitple words .  I'm not sure how of how you'll be passing the data in but say you have an array of words in $words.  

$query = new EntityFieldQuery();
$query--&gt;entityCondition( 'entity_type', 'node' )
    -&gt;propertyCondition( 'status', 1)
    -&gt;fieldCondition( 'field_adresse', 'locality', 'Paris' );

foreach ($words as $word){
   $query-&gt;fieldCondition('name', 'value', $word, 'CONTAINS');
 }

$result = $query-&gt;execute();


This code isn't tested and I've written off the top of my head. https://api.drupal.org/api/drupal/includes!entity.inc/function/EntityFieldQuery%3A%3AfieldCondition/7.x