Developer forum

Forum » Development » indexing prices from price module

indexing prices from price module

Umar Farooq
Reply

Hi,

We have product prices on prices module (standard price field on product is not being used) but cant seem a way to index the prices from prices module. we also need to sort the products by price ascending and descending order. How can i do that?

Thanks in advance.

Best Regards,

Umar

 


Replies

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

Hi Umar

That is not possible. For lots of reasons.

Price matrix contains a lot of logic and it cannot be indexed. i.e. in this timespan the price is y - if you buy one price is x but if you buy 2, price is z. Customer a has one price, customer b has another price. The big issue is that the index is "flat" - meaning we cannot have one-to-many relations in the index. We have one lucene document for each product, and the data for the product is on that document, including the price. The index contains just data, and cannot handle 'business logic' like this.

The only solution I can think of to solve this issue is to index the product once for each available price combination/price row, and rebuilt the price logic as part of the search.

So, I would love to solve the issue, I just don't know how. If anyone have good suggestions, I'll be happy to look at it.

BR Nicolai

Votes for this answer: 1

 

You must be logged in to post in the forum