Developer forum

Forum » Ecommerce - Standard features » Lucene summaryfield search and special charcters.

Lucene summaryfield search and special charcters.

Jeppe Jakobsen
Reply

Hi Dynamicweb

We are using the Lucene index builder for handling the products and searches in the solution, but we now have a request from our customer about special characters. The searching is done with a SummaryField created on the index through the admin panel. It includes several of productfields in its setup, and among them is the author field. The request is that searches should generate hits on names that contain special characters, for example names with an accent (á). An example could be if a user searches for the word "zafon", then one of the results should be a product with the author "Ruiz Zafón, Carlos".

So my question is: Is there any way adjust the analyzer to match special characters aswell?  

Best regards, Jeppe.


Replies

 
Martin Grønbekk Moen
Reply

Bump! Anyone got a clue about this?

 
Nicolai Pedersen
Reply

Hi Martin and Jeppe

You can create your own analyzer for Dynamicwebs indexing engine. You do that by creating your own Lucene.Net.Analysis.Analyzer that implements the tokenizers and filters that you need and then add your custom features to it. Read more here:

http://www.alessandrocolla.com/write-a-custom-lucene-net-tokenfilter/ or Google to more examples: https://www.google.dk/#q=implementing+lucene+net+analyzers

When you have created one of these and added it to your Dynamicweb solution, it will show up in the indexing when you create new fields - you can then apply your own analyzer to that field and let that be used when indexing the summary.

BR Nicolai

 
Jeppe Jakobsen
Reply

Roger, i will try looking into that.

 

You must be logged in to post in the forum