How to reference an array of scripts from another script in Unity

Just a quick and dirty tip (actually, more of a reminder for myself), probably there’s a better way but for now it worked for me… Basically in Unity I needed a quick way to reference a list of scripts from another script. The idea is to have a “main” script...

1 minute read

Multilanguage searching with Elasticsearch

This time I’ll start directly with the code.  First an utility method to create the connection: [csharp] private ElasticClient Connect(IEnumerable contents) { var defaultLanguageCode = “eng”; var uri = new System.Uri(ConfigurationManager.AppSettings[“ElasticSearchServer”]); var settings = new ConnectionSettings(uri).SetDefaultIndex(defaultLanguageCode); var client = new ElasticClient(settings); } [/csharp] And here’s the interesting part: [csharp] public...

1 minute read

Multilanguage indexing with Elasticsearch

This time I’m rambling about Elasticsearch. For those who still don’t know, Elasticsearch is a very interesting search engine based on Lucene. It’s structured to work as a NoSQL database and exposes a very nice RESTful web interface. Ok, that’s enough, let’s get started with the code! The first thing to do is...

2 minute read

SDL Tridion: how to get WebDAV url of an item

Suppose you have to reference an item and you don’t want to use the id. Or maybe you just need the full path. One simple way is to edit the item, go  to the Info tab and get it’s location: you should have something like this: [csharp]\910 Design HTML\Building Blocks\System\Templates\Assemblies[/csharp]...

1 minute read