With an upcoming module I'm making it so that you can search in CCK text fields individually. This allows us to observe content_permission restrictions. I've discovered that our handling of snippets was not flexible enough to support this case. This patch fixes the limitation and also makes the logic a bit more robust. For example, 256 chars of the teaser or body are always shown, as this gives context to the search results.

Comments

robertdouglass’s picture

Version: 6.x-2.x-dev » 6.x-1.x-dev
Status: Needs review » Patch (to be ported)

#901720 by robertDouglass: Fixed Highlighting snippets in search results not flexible enough, and logic improvement.

Committing to 6.2, marking to be ported.

jpmckinney’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

Port to 7 first. Then port to 6.1.

jpmckinney’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new743 bytes
new4.09 KB

Also, a bug in 6.2 (using strlen instead of count). Port to 6.1 next.

jpmckinney’s picture

StatusFileSize
new4.11 KB

Marked #912454: Undefined variable $snippet on line 552 duplicate. Fixed the bug that was present in 6.2 (committed #912454-6: Undefined variable $snippet on line 552. Updated 7.1 patch. Port to 6.1 next.

jpmckinney’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Needs review » Patch (to be ported)

Needed this in 7.x. Committed

#901720 by jpmckinney | robertDouglass: Highlighting snippets in search results not flexible enough, and logic improvement.

pwolanin’s picture

not sure at this point it's worth porting this - is there a demand?

jpmckinney’s picture

Status: Patch (to be ported) » Fixed

We can wait for someone to raise the issue. Seems only Robert and I wanted this.

pwolanin’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.