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.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 901720-4.patch | 4.11 KB | jpmckinney |
| #3 | 901720-7.1.patch | 4.09 KB | jpmckinney |
| #3 | 901720-6.2.patch | 743 bytes | jpmckinney |
| better_snippets.patch | 3.22 KB | robertdouglass |
Comments
Comment #1
robertdouglass commented#901720 by robertDouglass: Fixed Highlighting snippets in search results not flexible enough, and logic improvement.
Committing to 6.2, marking to be ported.
Comment #2
jpmckinney commentedPort to 7 first. Then port to 6.1.
Comment #3
jpmckinney commentedAlso, a bug in 6.2 (using strlen instead of count). Port to 6.1 next.
Comment #4
jpmckinney commentedMarked #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.
Comment #5
jpmckinney commentedNeeded this in 7.x. Committed
#901720 by jpmckinney | robertDouglass: Highlighting snippets in search results not flexible enough, and logic improvement.
Comment #6
pwolanin commentednot sure at this point it's worth porting this - is there a demand?
Comment #7
jpmckinney commentedWe can wait for someone to raise the issue. Seems only Robert and I wanted this.
Comment #8
pwolanin commented