Examine and Umbraco - Storing Partial Data (Parent Child)
A simplistic example would be;
I have a Hotel multi-node tree picker on my Resort doc-type. Each Resort contains n Hotels.
I want to store some basic information on the Resort about each of the Hotels. This could be the node id, url, latitude & longitude, dates (available from and to) , star rating, guide price and a list of facilities.
This means I could show a resort and 'at-a-glance' hotel information without having to fully load the hotel (all the extra stuff like a long description, short description, locale, cuisine, climate etc)
I want to be able to search resorts via examine and quickly find stuff that's in a range so perhaps 'date available from', 'date available to', star rating and perhaps lat & lng.
I know I can add extra fields on to a record using GatheringNodeData and e.Fields.Add("Hotels", <some serialized value here>)
What are the best options for serializing the information?
How could I keep it serialized and easily searchable for a large number of hotels... for example 1 resort could have 50+ hotels
If you were not doing range stuff then serialising hotel information and shoving it into the index would be a good option and it would be searchable however as you want range based stuff as well that wont work.
Maybe better way would the be inverse, so in each hotel record in examine during gathering node find the related resorts and inject that resort data in. So you can then do the search on hotels with range but also search on resort as well.
You could actually do a bit of both so that you can do the resort and at a glance hotels (inject basic hotel data), and for the range search stuff inject resort data into hotel.
I see, a bottom up approach... I did consider that but was wondering if there were any options that I didn't know about.
I did think of some other approaches (not as good though)
For a Resort you could keep extending availability dates - so just have earliest and latest on a Resort. This would hold the earliest date you could book and latest date you could book as aggregates from all hotels. This wouldn't work well for geospatial data though.
Also, you could do have individual fields for each hotel, perhaps with a some form of composite key Hotel_{nodeId} - e.g. Hotel_123, Hotel_456, Hotel_789 and serialize important info into each field. Then when searching on the Resort look for fields called Hotel and deserialize (could be very time consuming tho). Simiarly just have one field with all basic Hotel information in.
Examine and Umbraco - Storing Partial Data (Parent Child)
A simplistic example would be;
I have a
Hotel
multi-node tree picker on myResort
doc-type. EachResort
containsn Hotels
.I want to store some basic information on the
Resort
about each of theHotels
. This could be the node id, url, latitude & longitude, dates (available from and to) , star rating, guide price and a list of facilities.This means I could show a resort and 'at-a-glance' hotel information without having to fully load the hotel (all the extra stuff like a long description, short description, locale, cuisine, climate etc)
I want to be able to search resorts via examine and quickly find stuff that's in a range so perhaps 'date available from', 'date available to', star rating and perhaps lat & lng.
I know I can add extra fields on to a record using
GatheringNodeData
ande.Fields.Add("Hotels", <some serialized value here>)
What are the best options for serializing the information?
How could I keep it serialized and easily searchable for a large number of hotels... for example 1 resort could have 50+ hotels
Bear,
If you were not doing range stuff then serialising hotel information and shoving it into the index would be a good option and it would be searchable however as you want range based stuff as well that wont work.
Maybe better way would the be inverse, so in each hotel record in examine during gathering node find the related resorts and inject that resort data in. So you can then do the search on hotels with range but also search on resort as well.
You could actually do a bit of both so that you can do the resort and at a glance hotels (inject basic hotel data), and for the range search stuff inject resort data into hotel.
Regards
Ismail
I see, a bottom up approach... I did consider that but was wondering if there were any options that I didn't know about.
I did think of some other approaches (not as good though)
Resort
you could keep extending availability dates - so just haveearliest
andlatest
on aResort
. This would hold the earliest date you could book and latest date you could book as aggregates from all hotels. This wouldn't work well for geospatial data though.Hotel_{nodeId}
- e.g.Hotel_123
,Hotel_456
,Hotel_789
and serialize important info into each field. Then when searching on theResort
look for fields called Hotel and deserialize (could be very time consuming tho). Simiarly just have one field with all basic Hotel information in.is working on a reply...