Product sku and searching

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
Hi I was wondering if there were some better options for searching... we're getting really inconsistent results for SKU based searching. If you searchcertain words that you know will narrow down the search it does not recognise the second word and just brings up everything relating to the first word
6 years ago
There are some plugins in the marketplace that use either lucene or raven (lucene under the hood) however they're not free.

You could roll-your-own which is what we do and the search is far more reliable, not to mention you can get aggregates (facets) for filtering.
6 years ago
Thanks Sean
Any tips on where to begin rolling your own?
6 years ago
thomen wrote:
Thanks Sean
Any tips on where to begin rolling your own?


You have a few options however i would follow the guidelines and implement any code in a plugin. We've made the mistake of altering core code and are now forever maintaining some older versions of nop.

We use ravendb because the api is much easier than low level lucene but each to their own.

Anyway, you can either have a nop scheduled task that updates your index or respond to data changes by subscribing to the various events nop fires when data changes.

In your plugin you are probably going to inherit from the core ProductService and override the Search methods accordingly. Register your type with autofac.

Here is a video from nop days 2016 in amsterdam where Marianna showed this technique.
https://www.youtube.com/watch?v=pyMZFYKnlGU&index=4&list=PLnL_aDfmRHwt_6bP-8bd1rNPNIwWz86K2

Workshop files
http://www.nopcommerce.com/workshop2016.zip
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.