Microsoft Search Server Express 2008 – two issues
Recently we have started using Miscrosoft Search Server Express 2008 (MOSS) as a search engine for some of EPiServer based projects (replacing default EPiServer search engine). But the context of usage is not that important now.
To be clear - I think MOSS is a very nice product that is great for medium projects. But we encountered two issues with it - one already solved and one still not fixed.
Starting with solved one
It occurred that MOSS by default is not crawling pdf files. I'm not sure why - because pdf files are one of the most popular ones... I found solution to that on Nicholas's blog - Microsoft Search Server PDF iFilter Installation
You can read about details on his blog. Just to highlgiht those are steps to add pdf crawling to MOSS:
- you will need to install Acrobat Reader on the same machine where MOSS is installed
- modify some register keys
- add pdf extension to the list of files extensions to be crawled
That was quite easy
Update: Some times there might be still the problem with PDF crawling. It might be an issue with wrong CLSID of Adobe IFilter. Here can be found a solution to that: http://blogs.msdn.com/ifilter/archive/2007/03/29/indexing-pdf-documents-with-adobe-reader-v-8-and-moss-2007.aspx
Second issue is still waiting for solving.
What is the problem? Results sorting, not by rank but by chosen managed properties.
We are using QueryEx. According to MSDN it is possible to change default sorting of results returned by search server. You can see that the QueryPacket has element:
It should be possible to send QueryPacket with SortByProperties element set to something like this:
1 2 3 4 | <SortByProperties> <SortProperty name="Page" direction="ascending" order="1"></SortProperty> <SortProperty name="Heading" direction="ascending" order="2"></SortProperty> </SortByProperties> |
where both Path and Heading are managed properties that are available in results.
Unfortunately, there is no change in results sorting - they are still sorted by rank. We have even tried to add names of the properties in lowercase - as someone suggested in comments.
I'm still looking for a solution to the second problem - so, if you have any suggestion please, do not hesitate to let me know
Get LinkURL in context of choosen language
Recently I had a problem with getting URL of the page in context of the language different that master one.
I had a PageDataCollection with pages:
1 2 3 4 5 6 7 8 9 | LanguageSelector language = new LanguageSelector("EN") ; foreach (PageData childPage in DataFactory.Instance.GetChildren(startPage, language)) { ... } |
In the collection I had correct pages - children of startPage that had English language version.
Then for each page I wanted to write it's URL using childPage.LinkURL Unfortunately all those pages had different master language (Norwegian) and I was receiving URLs like "/no/mypage"
After searching for the solution for a while my colleague Robert told me how to do it. The solution is:
1 2 | string LanguageBranch = "EN"; string link = UriSupport.AddLanguageSelection(childPage.LinkURL, LanguageBranch); |
Now I get URLs that looks like this one: "/en/mypage"
Thank you Robert