I'm using the GatheringNodeDataEvent and looping through the tags on the node. Instead of just a comma seperated list, I would like to add each tag as its own value on a field.
In Lucene I would do like this:
foreach (var tagId in tagIds) { var tag = new Node(Convert.ToInt32(tagId)); d.Add(new Field("Tag", tag.Name, Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.YES)); }
Where d i s my Lucene document. This works and adds several fields called Tag with different values on the document.
I've tried to do it like this:
foreach (var tagNode in tagNodes) { e.Field.Fields.Add("tag", tagNode.GetProperty("title").Value); }
This gives me the follwing error: "An item with the same key has already been added."
Do anybody have an idea on how to accomplish this through Examine?
Examine fields.add working same way as lucene?
I'm trying to add tags to a node through Examine.
I'm using the GatheringNodeDataEvent and looping through the tags on the node. Instead of just a comma seperated list, I would like to add each tag as its own value on a field.
In Lucene I would do like this:
Where d i s my Lucene document. This works and adds several fields called Tag with different values on the document.
I've tried to do it like this:
This gives me the follwing error:
"An item with the same key has already been added."
Do anybody have an idea on how to accomplish this through Examine?
is working on a reply...