0

After the creation a page test for item, which is recorded to SOLR index, in Experience Optimization and creation some page versions to test against (during the test creation), when I get items from that index in code (using indexContext.GetQueryable<SearchResultItem>()) to display their content, I get all versions of the item involved in page test. How should I determine which version to choose and display? And based on what rules are certain versions of pages displayed to certain users?

  • Hi bavad - first question I have is to clarify if there are any business rules around your versioning or is it assumed the latest version is to be displayed? If so, you could use the __Updated or __Created fields from your index to select the version. As to the users, I'm not sure exactly that is being asked. Are you asking an for an example, advise or again is there a business process you can clarify for us? Thanks. Best Wishes. – Justin Bradley Feb 19 at 22:44
  • You can filter by _latestversion version field on query search – Cuong Nguyen Feb 20 at 5:09
  • @JustinBradley I don't have any custom business rules around my versioning. Several versions of the item are used to test against each other in page test, so that one version should be displayed to some users, another version should be displayed to other users (I didn't find information if there are any default rules in Sitecore to make it possible or versions are chosen randomly).The question is - how should I determine which version to choose to display to facilitate the correct Sitecore page testing - should I choose them randomly or retrieve some rules from Sitecore and apply them somehow? – bavad Feb 20 at 9:04
  • @bavad - Thanks for the details. I personally don't believe this is a good case for using tests like this. One suggestion if you wanted to try it out would be to create a datasource for your items that has a settings field that can actually be executed as a solr query and so for each item it queries a different version based on that field. Does this make sense? Best Wishes. - Justin – Justin Bradley Feb 20 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.