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 have this multi language website, lets say english and japanese.
On the root of the each site, i have setup "Culture and hostnames", and it's all working fine, except search. When I was testing search functionality I noticed that it was retrieving English contents on the Japanese site search.
My code for the search looks like this.
public IList<SearchDto> Search(string keyword)
var list = new List<SearchDto>();
var manager = new SearchManager();
foreach (IPublishedContent item in Umbraco.Search(keyword))
Is there any way of just searching the site your currently in? than searching the whole website in the cms database?
okay i manage to get it working.
This is what i've done
<IndexSet SetName="en-AU-ExternalIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/External-en-NZ" IndexParentId="2856" />
<add name="en-NZ-ExternalIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine" />
<add name="ExternalSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine" />
var searcherName = CultureInfo.CurrentCulture + "-ExternalSearcher";
var searcher = ExamineManager.Instance.SearchProviderCollection[searcherName];
var results = searcher.Search(q, false);
Only my concern is this search result returns type of ISearchResults and not iPublishedContent, but i can live with that :)
Only thing with this is i have to have Examine index setup for all extra language and define the site root ID identified in the ExamineIndex.config, so if there's any other way, please feel free to share your idea :)
Your way works fine, one advantage this way is you could implement japanese analyser see http://stackoverflow.com/questions/2643348/lucene-search-for-japanese-characters however one other way would be you have one index and you use gatheringnode data event to inject in a new field called searchable path which is has the path field and then you as part of your query tell it to restict the search to the root id of the language see http://thecogworks.co.uk/blog/posts/2012/november/examiness-hints-and-tips-from-the-trenches-part-2/ on how to do this.
We are having a problem getting search work on our Japanese website. From what I can find by searching, it appears that you need to use a Japanese-specific analyser for Examine to be able to work with Japanese.
I'm having trouble finding a suitable .NET analyser, though - most of the things I can find appear to be for Java.
Does anyone know where I can get an Examine-friendly Japanese analyser?
I had quick look at it, and i think i found something for .net
But can you read japanese??
dll file here
there's some sample code on page 2 and 3.
Let me know how it go, I'll probably have to implement this when i start building more Japanese sites.
on the site, it also said something about MeCab, which go and fixes japanese characters. I'm not quite sure what it is. I just did google translate and the translation was quite spot on
I found a blog, he talks about his experience on using this:
he talks about what he did to improve performance, etc.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted