Chris Hostetter <hossman_lucene <at> fucit.org> writes:

> 
> 
> : is it possible to store (text) payload to numeric fields (class 
> : solr.TrieDoubleField)?  My goal is to store measure units to numeric 
> : features - e.g. '1.5 cm' - and to use faceted search with these fields. 
> : But the field type doesn't allow analyzers to add the payload data. I 
> : want to avoid database access to load the units. I'm using Solr 4.2 .
> 
> I'm not sure if it's possible to add payloads to Trie fields, but even if 
> there is i don't think you really want that for your usecase -- i think it 
> would make a lot more sense to normalize your units so you do consistent 
> sorting, range queries, and faceting on the values regardless of wether 
> it's 100cm or 1000mm or 1m.
> 
> -Hoss
> 
> 

Hoss,  What you suggest may be fine for specific units. But for monetary 
values with formatting it is not realistic. $10,000.00 would require 
formatting the number to display it.  It would be much easier to store the 
string as a payload with the formatted value.


Peter Lenahan

Reply via email to