Developer forum

Forum » CMS - Standard features » Indexing fields as double

Indexing fields as double

Jesse Bakker
Reply

Hi,

We have some double fields we want to use as facets. But when showing in frontend the facet values show up as random charaters. (eg.  , $, (@, , 0 ,4, 8, <, @, D@, H, L , P)

I've add an example of the index, query, facet files used.

It works fine when added fields as a string.

Is there a standard way of working with doubles in facets?

 


Replies

 
Nicolai Pedersen
Reply

Hi Jesse

You cannot use doubles as facets. That is because how Lucene works with numbers and dates.

When working with facets, using doubles also does not make sense- using a string is just fine.

Any reasons you need it to be a double in the index when used for a facet?

BR Nicolai

 
Jesse Bakker
Reply

Hi Nicolai,

Thanks for your reply.

For us there is not real reason to use doubles, strings would be fine aswell. 

But the standard ProductIndexSchemaExtender is using doubles by itself. And the solution has a lot of product fields which are dynamicly created from an external data source.  So manual creating string variants for each field is quite some work and hard to maintain properly.  

Is there an easy way to force the ProductIndexSchemaExtender to use strings instead? 
Of course we could create a full custom schemaextender, but we prefer to use the default extender if possible.

 
Nicolai Pedersen
Reply

Hi Jesse

The double fields can be used for searches - just not for facets.

There are no built in option to index all double fields as string - you have to set that up manually or create an add-in to do that.

BR Nicolai

 

You must be logged in to post in the forum