Sounds like a fuel delivery problem or you have air in the line. If you vent the Racor (primary filter) then pump the lift pump, you are probably putting air into the system. The racor is under a slight vacuum so opening the lid hold down screw and pumping the lift pump can draw air into the system.
Open the vent on the secondary filter on the side of the engine (pressure side of the lift pump) and activate the lift pump to purge air. If air has gone past the secondary filter you will have to purge up to the high pressure pump and maybe even to the injectors. Consult your Yanmar manual for bleeding the HPOP and injector lines.
Your Racor should have 0 pressure (maybe even a slight negative pressure) as it is between the lift pump and the fuel tank, unless you have a boost pump (not common).
If you get little or no flow from the secondary filter while bleeding, your lift pump may need to be replaced. Your symptoms sound similar to mine when the diaghram in the lift pump went out.