Developer forum

Forum » CMS - Standard features » New indexing - custom product field as string used in facet as integer

New indexing - custom product field as string used in facet as integer

René Poulsen
Reply

Hi,

I have a solution where we have a custom product field (created as a string). Is it somehow possible to use this as an int in a facet? It doesn't seem to work, but maybe there is some workaround?


Replies

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

How do you try to set it up? Do you have a dump?

You should be able to create a field in the index of type integer and add the custom field to it. The indexing should then convert it if it is a valid integer. There was a fix recently on this, so make sure you are on a 8.8.1.new

BR Nicolai

Votes for this answer: 1
 
René Poulsen
Reply

Ok, I'm on 8.7.something. I'll get the solution updated.

 
René Poulsen
Reply

Hi Nicolai,

I've updated to 8.8.1.12 and it's still not working. I've attached a screenshot of the setup in my index.

As you see I've created a field on the index that is of type System.Int32. In the query I use this field against some parameters (also integers). These are used in a facet I've created so the user will be able to filter on these values. When i set "WattStart" and "WattEnd" parameters the filtering isn't working.

As I've also written on the screenshot, it works when I change the field on the index to a string - but off course it then just works as a string comparison and not an integer.

Am I doing something wrong?

 

EDIT: On some products theres just a "-" as value in the field. Does ALL products need a valid integer in the field or is it ok that some doesn't?

indexing.jpg
 
Nicolai Høeg Pedersen
Reply

I can get it to work... See dumps.

Check your setup again (see my field settings - do NOT analyze...), make sure you re-index, and try again. If it does not work, give me the URL.

NP

Capture.PNG Capture1.PNG Capture2.PNG Capture3.PNG
 
René Poulsen
Reply

You've got mail :-) Sent some videos and links

 
René Poulsen
René Poulsen
Reply

Got a reply on the case I created that this is not supported :-(

 
Nicolai Pedersen
Reply

It is supported. I think the issue is that you have non-numbers in your field as well?

 

You must be logged in to post in the forum