Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.1.9
-
None
-
None
-
Normal
-
Patch available
Description
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
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