With parser:
<?php
$index 
Zend_Search_Lucene::open('/data/my-index');
$userQuery Zend_Search_Lucene_Search_QueryParser::parse($queryStr);
$hits $index->find($query);
?>

With API:
<?php
$userQuery 
Zend_Search_Lucene_Search_QueryParser::parse($queryStr);

$pathTerm  = new Zend_Search_Lucene_Index_Term('/data/doc_dir/' $filename'path');
$pathQuery = new Zend_Search_Lucene_Search_Query_Term($pathTerm);

$query = new Zend_Search_Lucene_Search_Query_Boolean();
$query->addSubquery($userQuery);
$query->addSubquery($pathQuery);

$hits $index->find($query);
?>