Looping through list of IPublishedContent nodes to order them by Rank. c#
Hi guys,
I have two list of Nodes (IPublishedContent)
The first list is a list of Articles
The second list is a list of Tags
In Umbraco one of the properties on the Article Nodes has a Multi Node Tree Picker where the user can select multiple nodes from the content tree (the tags - also nodes in the tree)
In my application code I can get the list of Tag nodes from Umbraco - no problem.
However I would like to order them by 'Popularity' i.e the most used first.
Any Ideas on how can I do this?
I know Umbraco has a built in Tag Feature, but for other technical reasons I can't use this.
Ayo,
The gatheringnode does fire when someone publishes, so at that point you can replace the ids with node name, although thinking about it you could just replace the , with space and keep the id. Use bobo to facet and with the returned result set replace the ids with actual name of tag. I do recall if facet text has space it will split it. Have a bit of play see what works best.
Bobo is very very quick its used on faceting on linkedin the original was written in java but the link i sent has link to the .net port. I have played with it but I know a few people who have used it with great success.
I have used gathering node data to get all the text values of my multi-node picker and inject them in to the index, its working very well for searching.
But I'm still unclear how to insert them as Umbraco Tags.
Looping through list of IPublishedContent nodes to order them by Rank. c#
Hi guys,
I have two list of Nodes (IPublishedContent)
The first list is a list of Articles
The second list is a list of Tags
In Umbraco one of the properties on the Article Nodes has a Multi Node Tree Picker where the user can select multiple nodes from the content tree (the tags - also nodes in the tree)
In my application code I can get the list of Tag nodes from Umbraco - no problem.
However I would like to order them by 'Popularity' i.e the most used first.
Any Ideas on how can I do this?
I know Umbraco has a built in Tag Feature, but for other technical reasons I can't use this.
Ayo,
I would use gatheringnode data and inject into the index the tags for each document so the node ids in index as actual tag values. Next I would use bobobrowse.net faceting and create facets then you can sort those tags as well as show usage. For more information on gatheringnode see http://thecogworks.co.uk/blog/posts/2012/november/examiness-hints-and-tips-from-the-trenches-part-2/ and on bobo with umbraco see http://24days.in/umbraco/2014/search-with-bobo/
So bit of coding but that will be lightening quick as it uses the index.
Regards
Ismail
Thanks for your reply Ismail.
Just so I am clear..I'm hoping you can answer a few more questions..
when does the gathing node data event fire? every time someone clicks save and publish?
You said " tags for each document so the node ids in index as actual tag values"
Do you mean I should check what the user has selected, get all the Id's and then insert them as 'real' Umbraco tags?
By doing this, will I also be saving them against the document?
The second part around bobo, - I'm not to sure about how to with bobo reading now....
Thanks Ayo
Ayo, The gatheringnode does fire when someone publishes, so at that point you can replace the ids with node name, although thinking about it you could just replace the , with space and keep the id. Use bobo to facet and with the returned result set replace the ids with actual name of tag. I do recall if facet text has space it will split it. Have a bit of play see what works best.
Bobo is very very quick its used on faceting on linkedin the original was written in java but the link i sent has link to the .net port. I have played with it but I know a few people who have used it with great success.
Regards
Ismail
Hi Ismail,
I have used gathering node data to get all the text values of my multi-node picker and inject them in to the index, its working very well for searching.
But I'm still unclear how to insert them as Umbraco Tags.
I posted a question about it here : https://our.umbraco.org/forum/developers/api-questions/66621-insert-umbraco-tags-via-gathering-node-data
but I haven't had had a reply, can you give me any advice?
I'm tempted to do the ranking of the tags in the controller and cache the result, update it every hour or something...
Speed is important in this implementation, what do you think?
As stated earlier use bobo seehttp://24days.in/umbraco/2014/search-with-bobo/
Regards
Ismail
is working on a reply...