Developer forum

Forum » CMS - Standard features » Multiple analyzers on Custom field type

Multiple analyzers on Custom field type

Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi,

 

I was following the documentation creating a custom field type in a Repository and noticed a bug. 

 

I reproduced what's in the documentation and even states we can create multiple analyzers, but then it only saves the last:

 

Which one is accurate?

 

Best Regards,

Nuno Aguiar


Replies

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Nuno,

I agree that you've found a bug, but it's in the documentation.

When you add an analyzer for a custom type, you should only have one per index provider. One of the original ideas behind the new indexing engine was to allow for multiple different systems to work together. Because these systems might be disparate, it should be possible to choose a bespoke analyzer for each provider. This feature was never fully implemented and currently only Lucene is available.

I've asked the documentation team to change the image so we don't introduce a level of confusion here. We only support one analyzer per provider at the moment.

Hopefully, this provides som context to your question.

- Jeppe

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Jeppe,

 

Having the documentation be updated makes sense. Ideally the UI would be as well, because the UI bahaviour set expectations, specially when we're estimating custom development on features we don't normally use which then blow through our budget.

 

Best Regards,

Nuno Aguiar

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Yes, I agree. The entire UI for indexing and repositories could do with an update.

Can I just ask, what is the use-case for having multiple analyzers on a single field? If there is a compelling reason for this, then we may choose to allow this instead.

- Jeppe

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Jeppe,

 

Sure. The use case is for websites that sell products with a lot of technical data (screws, casters, hoses,...):

We can't achieve all of this with data normilization, because the user may search in multiple different ways.

 

When analyzing the product name we need to:

  • Index all lowercase
  • Have a stemming analyzer to match "grommet" and "grommets"
  • Have synonym mappers for units of measure (" = in.; " = inches)

 

This then evolves to business specific acronyms like OD (outter diameter) and H (height) and exceptions in singulars and plurars (mouse vs. mice ; tomato vs. tomatoes).

The initial though was to use all as individual analyzers for a field, since not all fields would require synonym mappers for example, but having 1 that does it all seems ok.

 

 

In case you are interested to know more let me know. 

 

Best Regards,

Nuno Aguiar

 

You must be logged in to post in the forum