Developer forum

Forum » CMS - Standard features » Facet Option of type Double encoded

Facet Option of type Double encoded

Nuno Aguiar
Reply

Hi,

 

We are getting all of our facet options of a Double field encoded. Sounds like a bug. Can anyone verify?

http://screencast.com/t/FElw7nmT

 

We are using 8.8.1.4

 

Best Regards,

Nuno Aguiar


Replies

 
Nicolai Høeg Pedersen
Reply

You should index them without "Analyzed" flag set - and maybe store them as a string if you need to use them for facets.

BR Nicolai

 
Mario Santos
Reply

Hi Nicolai,

 

We've tried to index the field without the "Analyzed" flag set but with no luck.

We need to use them for facets as a double because we need to filter them by greater and lower.

 

Thank you in advance,

BR, Mário

 

 

 
Nicolai Høeg Pedersen
Reply

Well, Lucene is open source, so feel free to rewrite it... :-)

You could index the value 2 times - once as a string used for the facetting and once for the range using the decimal type.

 
Mario Santos
Reply

Not so confortable with Lucene to do that :-)

I've tried your approach to index the value 2 times but still with no luck.

I've also tried that with the ProductPrice field on my test solution and the result is the same as you can see in the following link: http://mariorui.dev1.dynamicweb.pt/products

 

BR, Mário

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

Hi Mario

Ok - I can see it indexes doubles from source to a string field on the destination lucene document with ugly data.

Just fixed it as a bug in 8.8.1, TFS#24089, so doubles, decimals, floats and dates, gets indexed as strings formatted using ToString(InvariantCulture).

See dumps for my test setup and output.

Capture.PNG Capture2.PNG
Votes for this answer: 1
 
Mario Santos
Reply

Hi Nicolai,

Thank you for your reply. Can you please tell me in what release this will be fixed?

BR, Mário

 
Nicolai Høeg Pedersen
Reply

The next 8.8.1.* hotfix, see release section.

 
Kristian Kirkholt
Reply

Hi Mario

The problem TFS#24089 "If a numeric field from database is indexed to a string field on the index, it indexes".  has now been fixed in version 8.8.1.6

You are able to find this build in the download section:

http://developer.dynamicweb-cms.com/downloads/dynamicweb-8.aspx

Please contact Dynamicweb Support if you need any additional help regarding this.

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 

You must be logged in to post in the forum