4.0.0 #115
skttl
announced in
Announcements
4.0.0
#115
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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:
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 theIPageRenderer
. This is usually done in a composer, or in your Startup.cs file, eg.: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), orSetSearcher(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)
orSetRequireTemplate(bool requireTemplate)
. Or you could combine them all, by usingSearchEverything()
, 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 definedcustomQuery
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 aCacheSavedNotification
, 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
This discussion was created from the release 4.0.0.
Beta Was this translation helpful? Give feedback.
All reactions