Alter content of search api views I've used drupal7, Search API 7.x-1.16, Search views 7.x-1.16, Solr search
7.x-1.9, Apache Solr search
7.x-1.7.

I am listing contents of some content type. Now i want to trim description field only if the content belongs to some content type. 
How to do this using theme_preprocess_views_view_fields?
Is there a reason you want to use the theme_preprocess_views_view_fields hook?

Why not add the attribute Content: type to your View fields (see image), and then check the content type within a View template:



Then your code in views-view-fields--[my_view]--[my_display].tpl.php could look something like this:

&lt;?php 
  //check content type
  if($fields['content_type']-&gt;content == 'My content type') {      
    //trim description by 200 chars (respecting full words)
    $pos = strpos($fields['field_my_description]-&gt;content, ' ', 200);
    substr($fields['field_my_description]-&gt;content, 0, $pos); 
  }
?&gt;

&lt;h3&gt;&lt;?php print $fields['title']-&gt;content; ?&gt;&lt;/h3&gt;
&lt;div class="my-description"&gt;
  &lt;?php print $fields['field_my_description']-&gt;content; ?&gt;
&lt;/div&gt;


I haven't tested or tried the above code, but the proof of concept should be enough to help you along. 

Using a Views template instead of a hook is also easier for site builders / themers to debug or change.