Create an advanced search that searches only on a field with search_api in drupal 7 I've successfully installed the search api module in drupal 7. I installed solar and it works fine. I need to create a custom search form that has various fields and those fields performs search only on the relitive field.

This means that if i have a content type with the following fields:

"job requested"

"previous exerience"

"city"

I want a searchh page with the same fields and when the user enter a value in the "city" field, it searches for that data only in that field: if I search the "city" field for "milan" I want to find only nodes with the word "milan" entered in the field "city" and not with the word "milan" entered in the body.

I think I need separete indexes for each fields, but structure the two forms?
You don't need separated indexes. In you callback handler, you need to build a new SearchApiQueryInterface instance and set conditions on the field using its condition method.

$index = search_api_index_load('custom_index_machine_name');
$query = $index-&gt;query(array(
  'language' =&gt; $GLOBALS['language']-&gt;language,
  'search id' =&gt; 'custom-search',
));
foreach($form_state['values']['filters'] as $field =&gt; $value) {
  if (!empty($value)) {
    $query-&gt;condition($field, $value);
  }
}
$result = $query-&gt;execute();