Q:

How to add Levinshtein distance on PHP Solr field?

I'm having difficulty converting my query into PHP Solr, specifically the Levinshtein distance. I have this code in the query that works:
lev_dist:strdist("mario",first_name,edit)

But I am having an error in the PHP syntax for Solr:
 $query->addField('first_name')->addField('last_name')->addField('middle_name')->addfield('lev_dist:strdist(franco,first_name,edit)');

I got an error on the lev_dist:strdist part.

A:

Lev distance: 
fname_dist:strdist("<sample text to compare>",<field name>,edit)

