I am working on the upgrade of a project from Sitecore 6.2 to Sitecore 7.
I have found out that in Sitecore 6.2, the highlighting of the search results are implemented with the Lucene.Net.Search.Highlight.Highlighter, QueryScorer and Formatter classes in sitecore.client dll.
Which classes and/or functions does Sitecore 7 provide to do highlighting in search results? I searched the web but I could not find the required information/examples.
Highlighting of results is not supported currently OOTB with Sitecore 7 (it will be coming in a later version). The issue is that we map the results back to objects using the DocumentMapper so you do not have raw access to the 'Document' objects like the older versions.
For now, if you want to dig into Lucene and get the results yourself you can find the Highlighting functionality inside the Lucene.net contrib library.
If you do use this there is a useful blog post here regarding Lucene DLL versions that you should be aware of:
http://laubplusco.net/sitecore-7-lucen-3-0-highlighted-results/
I'm not sure if is possible to hightlight in search results.
On this link you can see: This little beauty is a hidden gem within the LINQ layer and in future versions of Sitecore will be your gateway to getting Highlighted Terms, Spelling Suggestions etc.
Related
Does anyone know how "Search Application" functionality of Oracle APEX's Application Builder implemented. Are there any APIs that developer's can take advantage? I would like to search for a text in apex application source code.
Any suggestions would be of great help.
You can use Oracle Text to help find and markup results for hetergenous data. Here is my old session on the topic, and I've seen a few others around.
https://www.slideshare.net/ScottWesley/oracle-text-in-apex
Oracle's learning library:
https://apexapps.oracle.com/pls/apex/f?p=44785:24:6694877585964::NO:RP,24:P24_CONTENT_ID,P24_PREV_PAGE:8961,2
The results probably use the detail view of an IR, or a template defined for a classic report. In 5.2 the search feature uses different technology - Spotlight search.
APEX metadata can be found in a number of dictionary views, depending on what source code you're looking for. See apex_dictionary view.
Update Oct 2018
Daniel H has created a new plugin, leveraging the spotlight search functionality available in the 18.x app builder.
https://github.com/Dani3lSun/apex-plugin-spotlight
Currently Java Lucene has feature called “More Like This”, which is used to find representative terms of a document which can be further searched to find similar documents.
I looked in latest CLucene code, but could not find this functionality.
Is it there in CLucene or something related to it? If not then are there any plans to include it?
If someone has done some work on this or area similar to this on CLucene, It will be great to hear from them.
I guess CLucene is just dead.
Currently you can get CLucene in two flavors - one is the 0.9.21
release, which has been proven to be stable over time, but is only
compatible with Java Lucene 1.9.1. Another option is our current
working copy on git, which conforms with Java Lucene 2.3.2
And according to this quote from sourceforge - you will never get MoreLikeThis feature, cause port of Lucene 1.x or 2.x is just too old.
Code: http://sourceforge.net/p/clucene/code/ci/master/tree/ (look at the commit date)
We are currently running Sitecore CMS 6.5 (120706) with the shared source Item Buckets module installed from here:
https://github.com/jerrong/Sitecore-Item-Buckets/tree/master/sitecorepackages/ItemBuckets%206.5%20NET_40/Final
We wish to upgrade to CMS version 7.0. I'm told that there is currently no upgrade path and to expect one in a few months. However we would prefer not to have to wait on this.
Item buckets is used only for a single section of our site. Everything else is delivered via the standard content tree.
We have tried upgrading to 6.6 first as required by the documented upgrade procedure, despite it mentioning later in the instructions that the shared source item buckets module is unfortunately unsupported for upgrade. Confirmed that this definitely does not work, we receive the error:
Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Lucene.Net, Version=2.3.1.3, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
We also tried disabling Item Buckets by removing the .config files etc. but we had further problems, presumably because of the actual content/data template changes that were made by the Item Buckets update.
We are thinking of trying a clean install of CMS 7.0, and then migrating our custom code base, items in the content tree (including data templates, layouts, renderings, etc) with Sitecore packages to work around the issue.
Can someone validate this approach, or better still suggest a much less painful solution!?
Many Thanks
(this is not official Sitecore advice as that is still being worked on disclaimer,disclaimer!)
Some ideas that might help ..
First we need to work on the data side of things (forget front end code for a second)
You could Un-bucket your items so that they are again plain Sitecore items. You could then remove the item bucket module templates and fields as you mentioned before (by 'unbucketing' you should now have no reliance on the bucketing templates etc.)
You could also look at creating an 'anti-package' using Sitecore Rocks, either way this should give you a site closer to a site before the item buckets module.
You could then get a base/clean install of 6.5 (120706) and then compare it to your working copy 'master' database using a tool like Sitecore Courier.
Sitecore Courier - https://github.com/adoprog/Sitecore-Courier - Allows you to compare 2 versions of Sitecore DB against each other and make an update package of that difference.
This should make you an update package of all the changes that have been made to your 'master' database so that you can, in theory, install this into a fresh copy of Sitecore.
You could see how far this gets you when you install this update package, in theory then you can re-bucket your section that used the old buckets module but using the new built-in buckets.
Front-end code wise, the old item buckets modules way of accessing the search has been completely re-written as that it now uses Linq To Sitecore. Hopefully this will be easier to migrate and the buckets will still work in largely the same way (hopefully better hehe!)
Like Ruud I would be interested to hear about others techniques for doing this.
Any extra complexity could come from thing like :
1) How much customisation of the core database you have done
2) How many new field types and XAML applications you may have written
At this point, there is no good solution for this yet.
If you are actively using the module, there is no way to upgrade right now (not that I know of).
If you are not using the module at all, you can remove everything in Sitecore that has to do with ItemBuckets.
This is a manual job for now... (I've done this with success in a 6.5 environment).
To be sure you remove everything, open the item buckets installation package (the ZIP file) to see what items are installed and manually remove all those items from Sitecore (this will include templates, fields, field types, settings).
You can also use the search in the content editor to search for "itembucket" or "item bucket" and find related items that way.
Another way is to search with SQL directly in the master and core database.
Once you have removed everything in Sitecore and configuration that is related to the buckets, rebuild the link database and run a database cleanup (from control panel) and you should be good to go.
It's a dirty job...
If anyone has a better way, I'd love to hear about it!
the problem you are having there is that the item buckets code was compiled against Lucene.Net 2.9 and Sitecore 7 has v3.0.3.
You could add an assembley binding in in the web.config configuration/runtime section that maps the old version to the new and then fix any issues you get with deprecated methods etc...
You will probably also want to remove the Item Buckets module before the upgrade as suggested as the new bucket templates & items may conflict with the shared source versions. You would at least need to remove the Item buckets config and dll's from the bin folders as these could also conflict.
I don't think there is a simple way of doing it yet or Sitecore would have given out an upgrade path already.
There are two main schools of thought for doing A/B (Split) Testing:
Javascript-based solutions such as Optimizely, Google Analytics Content Experiments.
Server-side solutions such as Django-AB, Splango, and django-lean. (Also, writing your own.)
My understanding is that Javascript-based solutions are spectacular for "which color button converts better," but not so great for switching out entire page layouts, and completely unworkable for trying out large functional changes such as the sequence of pages in a funnel.
That leads me towards a server-side solution. I'm not crazy about coding my own, and will do so only if there is no other option. I'm trying to add value by improving the core functionality of my site, not by creating a better split-testing framework.
The Django apps I've found for split testing are various mixtures of unmaintained, undocumented, documented incorrectly, and incompatible with Django 1.5. This surprises me, because the Django and Python communities seem to have a strong focus on good documentation. I'm also very surprised that none of the testing frameworks I've tried has been compatible with Django 1.5 -- is testing not as core a part of the philosophy in the Django/Python world as it is in Rails?
Here's what I've found:
Splango https://github.com/shimon/Splango -- Not compatible with Django 1.5 (although most compatibility bugs I found were trivial to fix). Largely un-touched since October 2010, except for a fix August 2012 which claims to make sure templates get included in the install. Since templates don't get included in the install when Splango is installed via PyPI, either the fix didn't work or didn't get submitted to PyPI. Documentation is largely accurate, but doesn't completely cover how to set up tests and get reports. It tells you how to configure the template to gather the data, but there appears to be additional steps required in the admin interface which are completely undocumented, and I'm not sure I've done them properly.
Django-lean. Original at https://bitbucket.org/akoha/django-lean has not been updated since July 2010. There is an apparently "blessed" fork at https://github.com/anandhenry2002/django-lean which has not been changed since May 2012, when it was copied over from the original. The original's documentation is incorrect in ways that make following the examples impossible. (Though you can probably muddle your way through, as I did.) The new version's documentation has formatting problems that make it difficult to read on github. (This appears to be because it's the unchanged documentation from the old project, and BitBucket syntax doesn't work on Github.) The django-lean Google Group has not had a message since July 2012.
django-mini-lean https://github.com/DanAncona/django-mini-lean -- Updated as recently as February 2013, but undocumented.
Leaner - https://bitbucket.org/brianjinwright/leaner -- Last updated July 2012, and no docs.
Django-AB -- Last updated May 2009. Is not a package, and can't be installed via PIP or PyPI. After placing the checkout in my django app folder (and renaming the folder to ab) and following the installation instructions, I get an error loading the template loader that I have not tracked down further.
So far Splango appears to be the winner, as I've actually been able to get it more-or-less working (by manually installing the templates, and then editing them to fix Django 1.5 incompatibilities).
Can anyone point me to anything I've missed?
You have missed this app : https://github.com/mixcloud/django-experiments + https://github.com/disqus/gargoyle/
And then there's waffle: http://waffle.readthedocs.org/
It's simple, updated, maintained, but not very feature rich, it doesn't have any analytics/reporting stuff integrated. But then again, google analytics or mixpanel type of service is better for this.
I first looked at Django-AB and that is almost what I wanted, but I couldn't get it to work either. After looking at django-experiments and deciding I didn't want to mess around with redis yet, I decided to roll my own. I've tried to package it up nicely and make it easy to use for the beginner. It's super basic.
https://github.com/crobertsbmw/RobertsAB
You can swap out entirely different page layouts with Google Analytics Experiments (their default experiment setup will redirect users to a different URL for each variation you have), although in general its much easier to interpret why something is more successful if you test smaller things against each other.
You are right that testing different funnels and user flows against each other using Google Analytics would require a lot of manual setup; although theoretically you could do it by swapping out different links and tracking your users with UTM campaigns.
For smaller A/B tests within the same page, I ended up using Google Analytics Experiments and writing a custom Django CMS plugin for adding a few variant options to a template, which queries the Google Analytics API and displays the correct variant using Javascript.
I'm in the middle of developing a website using Sitecore 6.5 and when my company knew that Sitecore released version 6.6 they want to use the new version instead for the project, Is there a way to convert my Items created using sitecore 6.5(webform) to sitecore 6.6(mvc) so I wont redo my work?
General content items are not affected by switching to MVC .. it would be any presentation items that you would need to update if you did make a move to MVC. As #JayS says MVC is not mandatory and you can actually mix MVC and Webforms layouts within the solution so if you wanted to convert to MVC slowly over time it would be a possibility.
Just wanted to note that there is no such thing as 'recommended releases' any more (see: http://sdn.sitecore.net/support/versioning%20policy.aspx). Lots of customers already using 6.6 in production. The upgrade from 6.5 -> 6.6 should be straightforward (but this obviously depends on the complexity of your solution).
From my understanding, you do not need to use MVC in 6.6 if you do not want to. John West has a blog about the installer and how it enables MVC. You should be able to port your existing solution up to 6.6 relatively easily, but if you wish to take advantage of MVC you'll need to alter your solution.
Note, I believe that Sitecore has not marked 6.6 as a recommended release, so you may wish to inform your company of that.
UPDATE: Thanks to Stephen for pointing out that Sitecore has discontinued using the recommended release tagging. Some of their documentation online still needs to be updated regarding this :)