I'm going to start using your plugin, but I have question about multiple hostnames:
websitename/en
websitename/de
websitename/dk
How I can index separately this content and search directly in relevant index. Is it possible to add multiple indexes, or we can manage this in single?
Thanks for this, currently I'm using the same structure for Examine. I see that Azure Search plugin has a bit different config with single Index name. Also free tier support up to 3 indexes.
I'd take the approach of filtering results at query level, the package doesn't support multiple indexes.
You can use the search client to filter results based on the Path field in the index (which is a list of Ids), or filter based on the Url property in the index - using a wildcard. e.g.
client.Filter("path", 1042).Results();
or client.Filter("Url", "/en/*").Results();
A slightly nicer way to do it may be to store the country name for a node in a custom field in the index and filter on that - there is an indexing event that allows you to add custom fields - just be careful not to do anything to inefficient in an indexing event, or the process will slow right down.
As mentioned I'm away from the office just now. I could put together a real code example when I am back - the snippets above are guessed/from memory.
What about multiple root nodes
Hi Darren,
I'm going to start using your plugin, but I have question about multiple hostnames:
websitename/en
websitename/de
websitename/dk
How I can index separately this content and search directly in relevant index. Is it possible to add multiple indexes, or we can manage this in single?
Thanks, Mike
In your /config/ExamineIndex.config you'll see the current indexes.
You can create a new index per language:
Noting the IndexParentId=1250, that would be the ID of the root node for the language you want to index.
Hi Rayan,
Thanks for this, currently I'm using the same structure for Examine. I see that Azure Search plugin has a bit different config with single Index name. Also free tier support up to 3 indexes.
Thanks, Mike
Hi Ryan,
I'd always advise against doing this if using Examine. The more indexes you have - the slower Umbraco is to startup.
A better way is to filter at query level, ensuring that the parent node Id is in the path.
Thanks.
Hi Mike,
Sorry for the delay. I'm on holiday just now.
I'd take the approach of filtering results at query level, the package doesn't support multiple indexes.
You can use the search client to filter results based on the Path field in the index (which is a list of Ids), or filter based on the Url property in the index - using a wildcard. e.g.
client.Filter("path", 1042).Results();
or client.Filter("Url", "/en/*").Results();
A slightly nicer way to do it may be to store the country name for a node in a custom field in the index and filter on that - there is an indexing event that allows you to add custom fields - just be careful not to do anything to inefficient in an indexing event, or the process will slow right down.
As mentioned I'm away from the office just now. I could put together a real code example when I am back - the snippets above are guessed/from memory.
Thanks.
is working on a reply...