You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Kaj Kandler <Ka...@Conficio.com> on 2006/06/21 22:51:43 UTC

Lucene block does not store attributes when instructed so

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

For the lucene experts,
I tried to use the sample code and wanted to store some of my attributes
as described in
http://cocoon.apache.org/2.1/userdocs/concepts/xmlsearching.html

However, the notation of "element@attribute" did not work with the
LuceneIndexContentHandler. I believe I fixed it with the following code
lines 122 ff.

  String atts_lname = atts.getLocalName(i);
  String atts_value = atts.getValue(i);
  if (isFieldTag(lname + "@" + atts_lname)) {
     bodyDocument.add(Field.UnIndexed(lname + "@" + atts_lname,
atts_value));
  }
     bodyDocument.add(Field.UnStored(lname + "@" + atts_lname, atts_value));

The if-statement was missing.

Now my question, does this fix make sense? Can someone with experience
validate this?

Also, do you want me to create and issue and supply this towards it?

Kind regards,
Kaj
- --
KajKandler@Conficio.com
 http://conficio.blogspot.com/
 ================================================
 |  We teach software one screencast at a time  |
 ================================================
 http://www.conficio.com/
 Tel: +1 (781) 632 5773 - Fax: +1 (781) 207 9159
 Conficio
 P.O.Box 761062,  Melrose,
 MA 02176

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)

iD8DBQFEmbFeRDUvrJRNjTARAmgVAJ9mtaS9kKhUq60zwsKo15zHTC7G6wCdEeDv
oiRH79P6TyrNBwyN2G5TPC4=
=mcu9
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org