Lucene doubles the child site's folder name in search results

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
7/8/2011 7:41:28 AM
Gravatar
Total Posts 60

Lucene doubles the child site's folder name in search results

Hi All,

I think this is a bug, although I'm hoping someone can show me a config I could change to fix it!

We've just gone live with a sub-site, and for the first time we're using
<add key="UseFoldersInsteadOfHostnamesForMultipleSites" value="true"/>
to give us sub-sites as sub-folders, i.e.
main site: www.cwr.org.uk
sub site: www.cwr.org.uk/training

So far so good.  However there seems to be a problem with Lucene - to reproduce it, go to:

http://www.cwr.org.uk/training/SearchResults.aspx?q=waverley and look at the target URL of the first result.  It should be http://www.cwr.org.uk/training/venue-waverley but Lucene tries to send you to http://www.cwr.org.uk/training/training/venue-waverley

To get around this for the time being I've created an IIS HTTP redirect on /training/training to redirect to the correct location (so if you click on the search results able they'll appear to work), but obviously it would be nice to fix it in Lucene itself. 

Has anyone else hit this problem?

Thanks

Ian

P.S. I HAVE rebuilt the index - several times!

OS: Win Server 2008
DB: MS SQL Server
MP: 2.3.6.4 MSSQL

7/8/2011 9:09:52 AM
Gravatar
Total Posts 18439

Re: Lucene doubles the child site's folder name in search results

Hi Ian,

Thanks for the bug report, I confirm it as a bug and it is now fixed in the source code repository so it will be fixed in the next release but will require rebuilding the index in the child site.

This bug has actually been reported before but I wasn't able to reproduce it the previous time(s). It turned out that is only happens when batch indexing and not when just indexing a single item and this is why I wasn't able to see it before. Batch indexing happens when you rebuild the index or when all the items for a page are re-indexed due to changes in view roles on a page, whereas item indexing happens when you update the content of a single item. When batch indexing it was including the folder segment in the url it indexed and this caused it to be duplicated since we add the folder segment when rendering the url on the search results page. Whereas when indexing a single item it was correctly not including the folder segment.

You can confirm this by finding a result for an html article that has the bad url in search results, go to the item and make a small edit, then wait a few minutes to allow time for the item to be re-indexed and you will see that if you then search for it it has the correct url.

I expect to make a new release within the next 2 weeks at latest which will have the fix.

Best,

Joe

7/8/2011 9:18:33 AM
Gravatar
Total Posts 60

Re: Lucene doubles the child site's folder name in search results

 

OK - that all makes sense, and no problem in the meantime as we have a work-around.  Ironic that rebuilding the index was making things worse rather than better.

 

Thanks for the incredibly rapid response & fix!

Ian

7/8/2011 9:22:17 AM
Gravatar
Total Posts 18439

Re: Lucene doubles the child site's folder name in search results

I'm just glad I was able to find it this time, this bug has probably been there for a long time but it was unclear what circumstances caused it. I just got lucky this time that the search index was empty on the child site I tested so it rebuilt it and then I saw the problem.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.