nopDynamics Forum

Installation and Configuration

Stephan.Kaluza 6 Posts 6 Karma
Admin
Stephan.Kaluza posted this 18 September 2013

Discussions on installing and configuring.

0
kineredward 1 Posts 3 Karma
kineredward posted this 11 October 2013

How to extend Lucene.net Full Text Support by adding custom fields?

1
joerg.hubacher 12 Posts 12 Karma
Admin
joerg.hubacher posted this 11 October 2013

Hi Edward,

nopCommerce has a pretty powerfull event architecture. There is a very simple approach to hook on an event. Just add a class that implements IConsumer<DocumentCreatedEvent>.

Than you get the Lucene document which you can use to add as many fields as you wish. Use the config page of our plugin to add fieldboost values for your custom fields.

That's it.

using Lucene.Net.Documents;
using Nop.Services.Events;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Nop.Plugin.FulltextSearch.Lucene;

namespace TestPlugin
{
    public class DocumentCreatedEventConsumer: IConsumer<DocumentCreatedEvent>
    {
        public void HandleEvent(DocumentCreatedEvent eventMessage)
        {
            eventMessage.Document.Add(new Field("TestField", "Content to be indexed", Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.NO));
        }
    }
}

 

 

Post Edited 11 October 2013

0
robertgreyling 2 Posts 2 Karma
robertgreyling posted this 11 October 2013

Hi there,

I am currently evaluating a 30 day trial of your lucene search module for nopCommerce and I'm having some issues:
  • Will the plugin fail to work if the URL I have registered the trial licence for is not the same as the URL in the browser?
    • licence: example.com
    • actual site test url: example.azurewebsites.net
  • The search does not seeem to be working against specification attributes:
    • Example search terms: /search?q=red+wine
    • There is one product loaded which is a bottle of red wine and no search results come back
    • If I do an advanced search and tick "include description" then the result does come back, so I'm wondering if it's just using built in search rather than your lucene plugin
 
Any help much appreciated.
0
joerg.hubacher 12 Posts 12 Karma
Admin
joerg.hubacher posted this 11 October 2013

Hi Robert,

the shop has to be licensed for example.azurewebsites.net. Otherwise the plugin won't work.
Product specifications attributes are in the index, too. When the license is correct it should work.
Just apply for a second trial.

FYI: If your are getting 502 errors in your admin area just get back to us. You can simulate this by just saving the same product 2 to 5 times after each other. It's independed from our plugin - but there is currently an issue with azurewebsites and nopCommerce which is pretty critical. We escalated this issue to MS and they are currently trying to figure out how to solve it.

Thanks
Jörg

0
robertgreyling 2 Posts 2 Karma
robertgreyling posted this 11 October 2013

Great! It's working now with the new licence for the correct URL- thanks!

0
joerg.hubacher 12 Posts 12 Karma
Admin
joerg.hubacher posted this 11 October 2013

Welcome.

0
ryanrymtech 3 Posts 3 Karma
ryanrymtech posted this 17 October 2013

When searching by SKU, I yield no results.  I have "Search In SKU" set to true, and have "Use the standard anylizer" set to false, but still yielding no results, any ideas?  Also, my SKU's have letters and numbers in them.

0
joerg.hubacher 12 Posts 12 Karma
Admin
joerg.hubacher posted this 17 October 2013

Have you done a reindex after changing from standard analyzer?

Post Edited 17 October 2013

0
ryanrymtech 3 Posts 3 Karma
ryanrymtech posted this 17 October 2013
joerg.hubacher
Have you done a reindex after changing from standard analyzer?
Yes, I did complete a re-index

0