Q: Complex Magma Indexed queries

Brent Pinkney brent.pinkney at aircom.co.za
Mon Dec 19 12:27:27 UTC 2005


Hi,

Concider a MagmaCollection with Person instances. The collection is indexed on 
#familyName and #dateOfBirth.

Magma currently supported very efficient indexed queries on these such 
indices, but only one index may be queried at a time.

Would it be possible to support complex queries on multiple indices ?

e.g. 
	a) Find all people named 'Smith' and who were born in 1980 ?
	b) Find all people named 'Smith' or named 'Jones'

To my mind, this should be possible and quite efficient as the current 
MaCollectionReader code calculates the minimum and maximum hash values for 
each index. The Magma server then walks the index from the minimum value to 
the maximum value extracting the oids of each object.

I am not sure of the impact the readSize would have on this idea - at first 
glance it may be necessary to extract all the oids from each clause and cache 
the appropriate intersaction or union of the oids. The query could then 
return the pages from this cache.

Comments welcomed

Brent





	



More information about the Magma mailing list