-->

How do I make Umbraco 5 ignore the bundled (with E

2019-08-08 12:01发布

问题:

I'm using a never version of Lucene.NET with Umbraco 5, but realized that it collided with the version bundled with Examine that is included with Umbraco 5 (See C#: Could not load types from assembly).

Rather than just removing Examine and the outdated Lucene.NET library from the \App_Plugins directory, I'm interested in a happy coexistence, where Examine uses my new version of Lucene.NET.

I've tried adding this to web.config, but the outdated Lucene.NET library was still used:

<dependentAssembly>
    <assemblyIdentity name="Lucene.Net" publicKeyToken="85089178b9ac3181" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-2.9.4.1" newVersion="2.9.4.1" />
</dependentAssembly>

The new version of Lucene.NET is 2.9.4.1.

Removing the old bundled Lucene.NET library causes an error.

回答1:

Did you get this to work?

I've tried to upgrade Examine in the past and encountered the same errors, causing me to give up in the end and reinstall the appropriate default Umbraco ones. I believe that you cannot just upgrade the library because it is tightly coupled to UmbracoExamine to get it working with Umbraco. If you do upgrade the Examine DLL's, you'll get errors.

Most of the searching can now be performed quickly by enabling the cache, and using the umbraco.uQuery namespace. We're actually aiming to look to other search providers such as Redis to make a fast, effective search layer for Umbraco. This kind of non-relational / NoSQL database / key-pair values are highly effective for searches like this, and do naturally what the database indexer Examine has to do through code. It is not uncommon for Examine to just stop indexing for no apparent reason. This is not a good situation to have on commercial projects, so I would suggest exploring alternatives.

Summary: reinstall or bake-your-own