Developer forum

Forum » Dynamicweb 10 » Custom Indexes

Custom Indexes

Aki Ruuskanen
Aki Ruuskanen
Reply

Hi,

On this page it states that at the moment you are not able to create custom indexes.

https://doc.dynamicweb.dev/documentation/implementing/repositories/indexes/customindexes.html

Is that still true?

We need to build a index with both content and product data in the same repository because the customer wants a search result page with that data combined.

Regards / Aki 


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

You can create your own custom SQL queries:

 

Your customer is wrong and you should recommend them to do something else.

A combined search experience does not require a single shared index. What the customer needs is unified results in the UI — not necessarily merged data in one repository.

Recommended approach

  • Keep products and content in separate indexes.

  • Use a unified query layer to search both simultaneously.

    • One page, 2 paragraphs, 2 apps - product catalog and query publisher, maybe in 2 tabs if they like things old fashioned.

  • Control ranking per entity type (e.g., prioritize products for commercial queries).

  • Present results in clearly grouped sections (e.g., Products, Articles).

  • Apply filters primarily to products, avoiding cross-type facet confusion.

This approach provides better relevance control, clearer UX, and more flexibility long term, while still delivering a seamless combined search experience.

 
Aki Ruuskanen
Aki Ruuskanen
Reply

Hi,

Thanks for the input. Unfortunately we don't have much we can say about the designs their agancy has delivered. At the moment the search is the standard Swift2 way. Which I am happy with. :)  

Thay don't have many product so the facetting for products would be "Products" in this case.

But I understand from your answer that currently it is not possible to create custom indexes?

Regards / Aki 

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

It is possible to make custom indexes. Using SQL

 
Aki Ruuskanen
Aki Ruuskanen
Reply

OK. But not the "DW9" way by code?

 

 
Aki Ruuskanen
Aki Ruuskanen
Reply

Maybe that part of the documentaion is old. (Or maybe I was unclear)

Found this:

https://doc.dynamicweb.dev/documentation/extending/indexing/indexes.html#creating-a-custom-indexbuilder

And then tried to create i simple custom index and it worked fine. 

Regards / Aki 

 

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Yes - the first article you referred to was the SQL index builder not supporting some specific features.

What you have found is custom index builders - which is not SQL index builder, so you are good. Sorry for the confusion on that article. We will remove that sentence as it has been handled.

Votes for this answer: 1
 
Aki Ruuskanen
Aki Ruuskanen
Reply

Haha, yes, I see that now, that it was about SQL Indexes. I did some "selective reading". :)

Mvh / Aki 

 

You must be logged in to post in the forum