can you just add a new field that has the real or ave price?
Just populate that field at index time... make it indexed but not stored

If you want the real or average price to be treated the same in faceting, you are really going to want them in the same field.


On Aug 28, 2009, at 1:16 PM, Britske wrote:


I have 2 fields:
realprice
avgprice

I'd like to be able to take the contents of avgprice if realprice is not
available.
due to design the average price cannot be encoded in the 'realprice'- field.

Since I need to be able to filter, sort and facet on these fields, it would be really nice to be able to do that just on something like a virtual-field called 'price' or something. That field should contain the conditional logic
to know from which actual field to take the contents from.

I was looking at using functionqueries, but to me knowledge these can't be
used to filter and facet on.

Would creating a custom field work for this or does a field know nothing from its sibling-fields? What would performance impact be like, since this
is really important in this instance.

Any better ways? Subclassing standardrequestHandler and hacking it all
together seems rather ugly to me, but if it's needed...

Thanks,
Geert-Jan

--
View this message in context: 
http://www.nabble.com/If-field-A-is-empty-take-field-B.-Functionality-available--tp25193668p25193668.html
Sent from the Solr - User mailing list archive at Nabble.com.


Reply via email to