Setting up Umbraco Indexes - umbraco

I've created a site using Umbraco 6.02, and I'm going over all the final configuration of the site now, and I've come to indexes. I've done some research, but I just cant find in simple terms what I need to include in each section and why.
Which fields I should include in the <IndexUserFields> section of the index? Is it just the fields I'll be using to search with, for example:currentNode.Children(x => x.bodyText.Contains("*"))? Or fields that I'll be using to sort nodes such as a date field for news articles? Or is there more to it than that?
Which document types do I need to put in the <IncludeNodeTypes> section and the <ExcludeNodeTypes> section and why?
And do I add my fields to one of the already created indexes, or do I create my own?

Old post but may help someone along the way.
http://umbraco.com/follow-us/blog-archive/2011/9/16/examining-examine.aspx
You can create custom indexes (if you desire) to lock down what types of searching you're doing. Many times you have a search box somewhere on your page and you only want to search certain doc types and their related content.
Keep in mind that you can create NEW index sets, but remember that you'll need to register them in the Config/ExamineSettings.config file as well as the Config/ExamineIndex.config file.
The link above is how I got mine to work correctly for just searching (2) different doc types (which Examine uses as NodeTypes) in the config.
The settings below were created using the already default ExternalIndexer, not a newly created custom one.
The file that you want to edit is in Config/ExamineIndex.config. The set that you want to edit is the ExternalIndexSet (by default). The path will point to the external temp folder
<IndexSet SetName="ExternalIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/External/">
For fields, that goes in the IndexUserFields section, which are custom properties that you have defined on your doc types
<IndexUserFields>
<add Name="itemNumber" /> <-- custom property
<add Name="productName" /> <-- custom property
</IndexUserFields>
The doc types (NodeTypes) that you want are whatever you named your document types. Remember that these are the alias, not the name
<IncludeNodeTypes>
<add Name="Product" /> <-- document type
<add Name="Variant" /> <-- document type
</IncludeNodeTypes>
Remember after setting this up you want to re-index your Examine. You can get to this by logging into the backend of Umbraco and going to Developer, then clicking on the tab that says Examine Management.
Please note that the interface is Umbraco 7 but the config file will still be applicable for v6.

Related

Suitelink Reference Table

I work with Wonderware software. One of the objects used to perform communication between Wonderware and the PLC is called Suitelink. In it, I have a table defined that has the name of one of my application fields on the left side and the name of the PLC tag providing its value on the right.
Once this saved and activated (deployed) the PLC tags will feed values in the field attributes to Wonderware.
Does anyone know where is this list saved in the system?
I am working at a web page and want to retrieve this list dynamically so I can have the page updated based on the current live value of the PLC tag being used.
I have looked in the database but could not find it.
C:\ProgramData\Wonderware\DAServer
Then within there you'll have several subfolders for your DA Servers. Open the subfolder to find a *.AAcfg file and your contents are in there in what looks like an XML format. You'll be hunting for all the <DeviceItem> tags

How to translate non-page content in Kentico

We recently upgraded our Kentico 8.2 instance to 9.0 and are now focusing on localizing our site into two additional cultures. The textual content of our site is primarily stored in one of three places:
Editable regions
Text fields in custom page types
Custom tables
We're using the Kentico EMS license and would like to leverage the built-in Translation Services app in order to translate content in each of these locations, however it appears that it only supports with content within editable regions. I know Kentico has an input control for translating text boxes but it forces the content editor to create a distinct resource key for it; we simply have so much content I'm concerned this will get out of control for editors.
Additionally, we had considered migrating some of our content into pages but they don't logically fit there, and there are some complex relationships that would cause duplicate content so I'd really prefer to keep the content where it is. The other thought I had was to build either a custom module or custom form control to do some dirty work under the covers but didn't want to reinvent the wheel if there was already a known approach.
Is there a Kentico recommended approach, or workaround, to managing content translations within custom tables and page type fields?
You can use Translation in Kentico to translate page type fields and send them for translation. Check this documentation page for an example. It can be more complex at first, but it should do the trick for you. I have just tested creating a simple translation request for my page type and the resulting XLF file contained all page type fields.
For custom tables I will have to dissapoint you because custom tables in Kentico are not culture specific. If performance is important for you the best way to create translations is to add CultureCode field to your table in order to specify which culture the item is for.
For example you can have table with columns: ItemID, Text, CultureCode
And then the data would look like:
1, Dog, en-US
2, Hund, ge-GE
3, Pes, cs-CZ
If you would want to go even step further I would recommend to create this not as a custom table, but as a Custom class which will sit inside a custom module for which you can create your own interface which would allow editors to easily create all culture versions for the items.
For the custom page types and custom tables, you can change those text fields to localized text fields at the field definition and it will allow you to enter different values per language without a resource key. This is the best route IMHO for page types and custom table translation. Although this still does not allow for "automatic" or built-in translation.
I am not sure what do you mean by content translation in page type fields - there is support for translating page type fields. You can find example on sample site in Kentico installation. (The site is called DancingGoat - see image example for page type field localization in english and spanish language).

Umbraco: custom member types using config file

I am creating member type using config file as below:
<membertype alias="custommember" name="Custom Member">
<tab alias="general" name="General Details">
<property alias="contactphone" name="Contact Phone Number" type="Umbraco.Textbox" datatype="nvarchar" description="Either Mobile or Landline. If a mobile is enters SMS notifications are provided"/>
<property alias="emailaddress" name="Email Address" type="Umbraco.Textbox" datatype="nvarchar" description="The primary contact email address of the member" />
</tab>
i am trying to add validation property in phone and email address, any idea which property i need to call?
like for phone only number are allowed and for email : 11xx#xx.com only this format allowed.
Thanks
You can create custom member types (or edit the default) directly inside Umbraco 7, you don't have to do it through a config file. Inside Umbraco there's a validation field and everything.
Under Members, right click Member Types, choose Create, and voila :-)
If nothing else, you might be able to spot what changes (if any, but I don't think config files are used anymore) are made to config files when you create a custom membertype inside Umbraco, and use those changes elsewhere.

Searching other fields in the internal backoffice search box - v7.1.0

My aim is to add additional fields to the searching parameters for the internal search - I have amended ExamineIndex.config to index the new property:
<IndexSet SetName="InternalIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/Internal/">
<IndexUserFields>
<add Name="briefing"/>
</IndexUserFields>
</IndexSet>
However, after rebuilding the internal index, it seems as though the internal search is only using the node name.
Is it possible to search multiple properties with the internal search?
You are quite right - the Content and Media searches only take into account the Node Name, along with a path restriction if the current user has a starting node specified.
Member search also includes the following additional fields:
email
loginName
As a reference, see the implementation here:
https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/src/Umbraco.Web/Editors/EntityController.cs#L227-L283
If you want to implement a custom search, you'd have to create a plugin or dashboard that would allow you to implement the search features you want.
For some ideas, checkout the MemberListView project (which uses custom examine searching to populate the list): https://github.com/robertjf/umbMemberListView

Multi language, intelligent link conversion

I'm pretty new to Umbraco, so my question may turn out to be pretty simple, but I wasn't able to find any simple guide on it online.
I'm building a simple website with one domain and structure as follows
Content
- en
-- products
-- contacts
- cs
-- produkty
-- kontakty
and so on. My first question is: since I want to accomplish some nice results in SEO, I need to (i) assign meta language to contents of "en" and "cs" nodes, as well as some keywords. How should I do this?
Second: Say that in the future, I decide to add a new language, ex. Russian. So what I would need to do is to make a copy of the "en" node and its contents while the links included in the newly created copy should be rewritten to point at the copy and not the original (original would be /en/anotherpage, which should be rewritten to /ru/anotherpage). Is this possible?
Thanks,
Ondrej
You could build the content structure as a single root node and then have multiple Language homepage nodes directly beneath the content root.
To assign a language, you could create a custom datatype that simply displays all the .Net cultures, e.g. en-GB, fr-FR etc. Include that data type as a field on the language homepage document type and then output this value in the markup on the homepage and each descendant.
In the Language homepage document type, you can add a textstring property called 'umbracoUrlName'. You can then use this property to override the Url name. E.g. So you could call the page www.domain.com/en/ instead of www.domain.com/en/english-home/
With regards to duplicating the site at a later date, this is a difficult one. If the links are created using data types like the media picker and uComponent's multi node tree picker, then you will have no option but to inherit the links from the copied branch. However, if the links are created dynamically in the Razor or XSLT, then you should be able to make the links relative to the Language homepage or the current page. E.g. in XSLT getting the children of the parent language homepage would be something like $currentPage/ancestors-or-self::* [#level = '2']/child::* . In other words you can avoid hard coding links by using a clever bit of relative traversal.
This should give you a good start on creating multilingual sites in Umbraco
http://our.umbraco.org/wiki/how-tos/running-multi-lingual-sites-under-a-single-domain
If you was to create a Russian version in the future you would do exactly what you have mentioned above, its that easy.
To set the language meta data I would store this in a property on the langauge root node eg: /en/ to get the language page property from any page:
var langNode = new Node(int.Parse(node.Path.Split(',')[1]));
langNode.GetProperty("languageCode");
As for copying the English version to the Russian version and fixing all the links, I'm not aware of anything in umbraco to help you with this, you could write something yourself to find all the links and node references and fix them. you could use the relations API to keep track of what was copied from where to where. You'll need to be aware that you could end up copying nodes more than once.
If you don't have too much data, manually fixing links may be quicker.

Resources