U4-8368 - Examine v2 integration

Created by Shannon Deminick 25 Apr 2016, 12:03:10 Updated by Shannon Deminick 16 May 2018, 11:49:53

Subtask of: U4-8388


Shannon Deminick 02 May 2016, 16:40:39

Here's the PR for review: https://github.com/umbraco/Umbraco-CMS/pull/1247

Ok so here's the description/overview:

  • This is using Examine v2 - this is hosted on MyGet (TODO: I will upload tomorrow)
  • This is using Lucene 3.x instead of 2.9
  • This PR keeps the default indexes described in the examine config files but in future tasks we will be moving this to startup/code configured indexes/searchers
  • Added some overloads to ProfilingLogger.DebugDuration which means it will only output the log if the profiled time is larger than the supplied ms
  • QueryFactory now has an interface: IQueryFactory
  • Usages of the Query class have been replaced with IQuery (the way it should have been before)
  • The IQueryFactory is now exposed on the DatabaseContext - this is done because the IDatabaseFactory exposes it and is responsible for creating it
  • The GetPaged.... methods of the IMediaService and IContentService services have an overload replaced accepting an IQuery which is used as the query filter, this means that a string SQL does not need to be passed up and it is strongly typed (TODO: Need to implement this on the IMemberService)
  • UmbracoExamine has been updated to support the Examine v2 stuff so lots of obsoleted code has been replaced by new code including the usages of the above changes to IContentService/IMediaService to get the data to index - this changes from previous versions since now we query the db to get published content instead of querying the published cache which i think is better since this effectively is a published cache


  • Review code - look for anything critical, I don't expect everyone to understand all of the changes
  • Use an existing umbraco 8 db with data in it
  • Delete the whole App_Data/TEMP folder before launching the site (otherwise files will be locked)
  • Build the solution and launch the website
  • ensure that all indexes are rebuilt on startup
  • create a document
  • search for this document in the search bar in the back office - it should be found, might take 1 sec to index
  • change the document's name and make sure you can search on it
  • delete a document
  • ensure it's no longer found
  • Test list views, paging, sorting, etc....

Stephan 17 May 2016, 14:19:08

Testing Tree Search Bar = all ok. Now testing list views...

Stephan 17 May 2016, 17:03:23

Had to fix a good deal of queries after having merged dev-v8 because now with NPoco we don't do SELECT * FROM ... anymore but instead we specify each column explicitely and assign aliases columns. These aliases ''must'' be reused in the sort clause else it cannot find the column.

And then... still having two questions

  • sorting by "user name " for members... but members don't have a "userName" property, only a "loginName"?
  • sorting by "document type"... have you tested that one? The content type alias is not part of the base query for content items so I'm not sure it can work without either altering that base query, or modifying the list view query when sorting by content type alias.

Shannon Deminick 17 May 2016, 19:35:12

I'll have a look at this sorting stuff tomorrow - can't remember off the top of my head the details, will re-assign

Shannon Deminick 19 May 2016, 15:49:00

This is all merged in - regarding the issues you mentioned above it would appear that you've fixed those (or thrown an exception:) )

Stephan 19 May 2016, 16:50:32

all right then...

Priority: Normal

Type: Task

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 8.0.0

Sprint: Sprint 15

Story Points: