I had the problem that search snippet always returned the body. It turned out that besides another problem with views, the $hl_fl variable was FALSE, but the logic inside render checked for NULL.

workaround patch attached

Comments

digi24’s picture

StatusFileSize
new717 bytes

patch does not show

Taz’s picture

Priority: Normal » Major
Status: Needs review » Needs work

Patch didn't work on latest dev.

I applied it manually, but still didn't fix my issue, using latest Views 3 as well.

From what I can tell with minimal debugging, the value that should be inside the snippet is empty of real value, just puts "..." in the output when the empty() or is_null() logic is taken out of the field handler.

I know the body text has the test search word in it so... not sure what it is?

samipmallick’s picture

Has anyone been able to resolve this issue? Patch (manually applied) didn't work for me either.

From what I can tell the problem is that $hl_fl is not getting set correctly in this line: $hl_fl = $this->query->get_param('hl.fl');

$this->query->get_param('hl.fl') might need to be adjusted.

crosalot’s picture

StatusFileSize
new435 bytes

This patch work for me