Changing the name of a category
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2009 04:54 PM
Hey all,
I'm having problems changing the name of an existent category named "Compliance". This category contains nodes and other sub categories associated to it. I could make a webscript that changed the name of this category from "Compliance" to "sox". The problem is that in other webscripts I was using a Lucene search to get the nodes inside this category, so I thought that just changing the part "cm:Compliance" to "cm:sox" in the Lucene query would be enough to keep this search webscript working.
Well, that was not the case, because the name of the category now seems to be both the old one and the new one. I mean, if I execute something like someNode.childByNamePath("sox") I get the correct node, but if I execute a Lucene query using the path of this node (e.g. +PATH:"/cm:generalclassifiable/cm:finance-hub/cm:sox") I get an empty array, BUT if I execute a Lucene search using the old name I get the correct node! (e.g. +PATH:"/cm:generalclassifiable/cm:finance-hub/cm:Compliance"). This is really weird since the "Compliance" node that I get using Lucene is the same node that I get using #childByNamePath("sox"). And if I read its 'name' property it returns "sox".
Let's put an example…
As you can see in this picture, I'm using a query that returns the nodes inside some subfolder of the 'Compliance' category:
[img]http://img261.imageshack.us/img261/8827/ex1u.th.jpg[/img]
In this second picture I'm executing the same query but using 'sox':
[img]http://img512.imageshack.us/img512/1276/ex2.th.jpg[/img]
And in this third picture what I try to show you is how the same node has both the old name and the new one!
[img]http://img341.imageshack.us/img341/1879/ex3.th.jpg[/img]
I need some help on this, what should I do in order to make the new name ("sox") the only one name? I mean, what should I do in order to make the Lucene search return the correct nodes when I use "sox" in the query?
I'm having problems changing the name of an existent category named "Compliance". This category contains nodes and other sub categories associated to it. I could make a webscript that changed the name of this category from "Compliance" to "sox". The problem is that in other webscripts I was using a Lucene search to get the nodes inside this category, so I thought that just changing the part "cm:Compliance" to "cm:sox" in the Lucene query would be enough to keep this search webscript working.
Well, that was not the case, because the name of the category now seems to be both the old one and the new one. I mean, if I execute something like someNode.childByNamePath("sox") I get the correct node, but if I execute a Lucene query using the path of this node (e.g. +PATH:"/cm:generalclassifiable/cm:finance-hub/cm:sox") I get an empty array, BUT if I execute a Lucene search using the old name I get the correct node! (e.g. +PATH:"/cm:generalclassifiable/cm:finance-hub/cm:Compliance"). This is really weird since the "Compliance" node that I get using Lucene is the same node that I get using #childByNamePath("sox"). And if I read its 'name' property it returns "sox".
Let's put an example…
As you can see in this picture, I'm using a query that returns the nodes inside some subfolder of the 'Compliance' category:
[img]http://img261.imageshack.us/img261/8827/ex1u.th.jpg[/img]
In this second picture I'm executing the same query but using 'sox':
[img]http://img512.imageshack.us/img512/1276/ex2.th.jpg[/img]
And in this third picture what I try to show you is how the same node has both the old name and the new one!
[img]http://img341.imageshack.us/img341/1879/ex3.th.jpg[/img]
I need some help on this, what should I do in order to make the new name ("sox") the only one name? I mean, what should I do in order to make the Lucene search return the correct nodes when I use "sox" in the query?
Labels:
- Labels:
-
Archive
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-26-2009 08:30 AM
Hi
PATH uses the localName in the child association, not the cm:name property.
You would also have to change the association.
Andy
PATH uses the localName in the child association, not the cm:name property.
You would also have to change the association.
Andy
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-26-2009 09:03 AM
Hi
PATH uses the localName in the child association, not the cm:name property.
I didn't know that, how can I work around this? Or how can I solve it?

You would also have to change the association.Sorry, but I don't get the point. Could you please explain what you mean?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2009 10:01 AM
Hey, any idea?
