-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

are there any plans to rewrite the highlighting code so it is more
customizable (in terms how the exact HTML/string returned will look
like)? For flexibility and easy integration into any kind of application
we find the current returned HTML fragments unsuitable.

In desperate need we've now written our own version and maybe it makes
sense to join forced (maybe our version is unsuitable for the rest of
the world, too, let's see ;)

I found http://framework.zend.com/issues/browse/ZF-1788 on this,
basically it says the same I'm doing here right now.

One of the main difference to what currently is in
Zend_Search_Lucene_Document_Html is that we aren't using DomDocument et
all. We're just dealing with native strings, in our experience we just
don't see the value in abstracting this kind of information. So whether
the resulting string is HTML, XML or something else isn't specified anyway.

The flexibility of formatting would be done with sprintf syntax. E.g.
you define something like

$highlightingTemplate = array(
  '<strong class="search-match-1">%s</string>',
  '<strong class="search-match-2">%s</string>',
  '<strong class="search-match-3">%s</string>',
);

So different colors could be done anyway, e.g. with CSS in this example.
But I can understand that some will not like this corset either, then it
would probably be best if Z_S_L would provide just the most native
methods so anyone can do it themselves: give back an array with the
strings results for matching/non-match/surrounding text, etc.

Ideas, Feedback on this?

thanks,
- - Markus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHO5dh1nS0RcInK9ARAqIwAKCCtWEnkZYRzVmK1evEnYMycUr0tQCfc3Ob
thbajC5F31XPmH/DSqTWBWk=
=HPnF
-----END PGP SIGNATURE-----

Reply via email to