Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm going to start using your plugin, but I have question about multiple hostnames:
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?
In your /config/ExamineIndex.config you'll see the current indexes.
You can create a new index per language:
<IndexSet SetName="en_SiteSearchIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/enSiteSearch/" IndexParentId="1250" >
<add Name="id" />
<add Name="updateDate" />
<add Name="writerName" />
<add Name="loginName" />
<add Name="email" />
<add Name="nodeTypeAlias" />
Noting the IndexParentId=1250, that would be the ID of the root node for the language you want to index.
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 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.
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.
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.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted