Gravatar for

Question by robertobarbedo, Mar 27, 2015 9:26 AM

Customize search based on a conditional field.


I am looking more for a advise to understand the best path to go.

I am indexing a document that has a field, price, that is customized by some parameters, region for instance. It is Coveo for Sitecore.

I will need to query documents, and price range is a parameter. As don't have a single value to price, I am not sure how to proceed.

I though, I could customize some how the query processor, that would receive a context and select the value accondingly.

Does anybody has a suggestion?

I really appreciate any comments. tks

Gravatar for

Comment by Jean-François L'Heureux, Mar 27, 2015 9:37 AM

I'm not used to fields customized by parameters. Can you show me a screenshot of an item with a price field in the content editor and also a screenshot of the price field in your template? What is the type of your price field?

Gravatar for

Comment by Jean-François L'Heureux, Mar 27, 2015 4:06 PM

I see that you answered Olivier's answer below. Can you still provide me the additional information on your price field please?

1 Reply
Gravatar for

Answer by olamothe, Mar 27, 2015 9:36 AM

I am not sure I understand completely what you are trying to accomplish, but it is possible to query a numerical field using a range request.

For example, you could do a query with something like @price==1000..2000 , which would return all documents for which the price is between 1000 and 2000.

Is this what you are trying to accomplish ?

Gravatar for

Comment by robertobarbedo, Mar 27, 2015 10:54 AM

Yes, but picture the Product A can have a price depending on location of the user. A user from California Product A Cost $1000 and a user from Puerto Rico product A cost $600. (it is the same document in coveo, same product)

Ask a question