Skip to content

Releases: skttl/umbraco-fulltextsearch8

4.0.0

09 Dec 09:18
Compare
Choose a tag to compare

4 notable new features in Full Text Search for Umbraco

Full Text Search for Umbraco, is released in version 4.0.0 with a bunch of bugfixes, performance improvements, and some new languages. With great help from the community the package is now better than ever.

In this release there is 4 notable new features, that I will describe below. If you are interested, you can see the complete changelog.

Configure through appsettings.json

To improve DX, and make it a little bit easier to install, you can now configure FullTextSearch from your appsettings.json file. In addition to that, Full Text Search, will automatically "add it self" to your project. No more need for putting .AddFullTextSearch() in your Startup.cs file.

You can configure Full Text Search like this in your appsettings.json file:

{
  "Umbraco": {
    "FullTextSearch": {
      "DefaultTitleField": "searchResultTitle",
      "DisallowedContentTypeAliases": [ "verySecretContent" ],
      "DisallowedPropertyAliases": [ "hideInSearch" ],
      "Enabled": true,
      "FullTextPathField": "MyCustomPathField",
      "FullTextContentField": "MyCustomContentField",
      "HighlightPattern": "<span class=\"bold\">{0}</span>",
      "RenderingActiveKey": "HiEverybody!",
      "XPathsToRemove": [ "//script" ]
    },
  }
}

Full Text Search also now ships with an appsettings-schema.json file, so you'll get Intellisense when configuring through appsettings.json.

Pages are rendered using Http Client

Your pages are now being rendered using a Http Client, before being indexed by Full Text Search. This has the benefit, that route hijacked pages now actually works. Before, when we relied on Umbracos internal RenderTemplate method, it wouldn't pass through any custom controllers, and thus not get assigned any custom view models.

Because of this, it's required that your webserver can "call it self", in order to fetch the content of the pages. Usually this is not a problem, but if you can't, and you have no way of allowing it, you can revert back to the old rendering method.

This is done by registering RazorPageRenderer as the IPageRenderer. This is usually done in a composer, or in your Startup.cs file, eg.:

public void ConfigureServices(IServiceCollection services)
{
    // omitted...

    services.AddUnique<IPageRenderer, RazorPageRenderer>();
}

Use Full Text Search to search non-content

Previously Full Text Search, would only let you search published content with a template defined in Umbraco. But sometimes you might want to leverage the search helpers, to search other content from Examine, eg. custom indexes and stuff that might not be Umbraco content at all.

When configuring the search query, you can now use SetIndex(string index) to define which index to search (default is the default ExternalIndex in Umbraco), or SetSearcher(string searcher) to define a custom searcher to use. This lets you search custom indexes instead of the default ExternalIndex.

To allow searching content that maybe isn't published, is Umbraco content, or doesn't have a template, you can use SetContentOnly(bool contentOnly), SetPublishedOnly(bool publishedOnly) or SetRequireTemplate(bool requireTemplate). Or you could combine them all, by using SearchEverything(), which will set the search to NOT content only, NOT published only, and no required template.

And if you need some special Lucene query in your search query, you can now add SetCustomQuery(string customQuery), which will add the defined customQuery to your complete search query.

Listen for notifications when caching content

Full Text Search caches the rendered content of all pages, to make reindexing faster. Content gets cached everytime a node is published, to make sure to content is up to date.

We've now added notifications for this, so you can use Full Text Search, as a feeding mechanism for other providers, like Relewise, Algolia or others. The cache service sends a CacheSavingNotification when it starts saving content to the cache. In here you can also modify the content being cached. And when the content is saved to the cache, it sends a CacheSavedNotification, where you could hook in, and send the content to other providers too.

Thanks to all contributors

All this wouldn't have been possible without contributions from

4.0.0-alpha003

19 Sep 12:17
Compare
Choose a tag to compare
4.0.0-alpha003 Pre-release
Pre-release
  • #103 trims search terms before searching, to prevent exceptions with wildcard queries
  • #101 fixes for async event handlers / 🙏 enkelmedia

4.0.0-alpha002

14 Sep 11:28
Compare
Choose a tag to compare
4.0.0-alpha002 Pre-release
Pre-release

#94 Changed datatype of text column in database
#89 Fixed bug in backoffice, when searching with advanced options
#98 Fixed issue with notification handlers
#90 Added warning logging / 🙏 hfloyd
b760e1b adds notifications to CacheService
#67 publishedPropertySuffix is not case invariant

4.0.0-alpha001

01 Jul 15:40
Compare
Choose a tag to compare
4.0.0-alpha001 Pre-release
Pre-release
  • BREAKING #86 Changed the default rendering to use HttpClient, and abstracted the page rendering, so you can switch based on preferences / 🙏 enkelmedia
  • Asynced all the things, or at least a big chunk / 🙏 enkelmedia
  • Added tests / 🙏 enkelmedia
  • BREAKING 6d6ab68 Terminology around indexing / rendering. The IndexingActiveKey is now RenderingActiveKey, helper method IsIndexingActive is now IsRenderingActive. The old things are obsoleted, so should still work. Planning to remove them if we ever get to 5.0.0
  • BREAKING 6d6ab68 Detecting rendering/indexing is now based on a request header, instead of a key in HttpContext.Items.
  • #82 Adds configurable markup for highlighting of search terms in result summaries. / 🙏 enkelmedia

dotnet add package Our.Umbraco.FullTextSearch --version 4.0.0-alpha001

I want to sort out #74 and #67 before releasing 4.0.0 - but do take it for a spin, and let me know if the change to using HttpClient is causing any problems :)

v3.1.0

25 Mar 20:32
Compare
Choose a tag to compare
fix casing

3.0.0-beta002

20 Jun 19:34
Compare
Choose a tag to compare
3.0.0-beta002 Pre-release
Pre-release
v3.0.0-beta002

cleanup

3.0.0-beta001

20 Jun 19:20
Compare
Choose a tag to compare
3.0.0-beta001 Pre-release
Pre-release
v3.0.0-beta001

Update srces for ci

2.0.0

16 Oct 07:07
Compare
Choose a tag to compare

For umbraco 9

1.3.0

16 Oct 07:14
Compare
Choose a tag to compare

For Umbraco 8

1.3.0-beta

06 Oct 19:41
Compare
Choose a tag to compare
1.3.0-beta Pre-release
Pre-release
release/1.3.0-beta

version bump