I have 14 attributes in facedetails I want to query on and find the closest match for each, and only if the 14 attributes match person face My code will return the person object. Here is a sample on the database:
"faceDetails":{
"mCalculateFaceSizeHeight" : 121,
"mCalculateFaceSizeWidth" : 107,
"mCalculateLeftEyeBrowSizeHeight" : 31,
"mCalculateLeftEyeBrowSizeWidth" : 43,
"mCalculateLeftEyeSizeHeight" : 64,
"mCalculateLeftEyeSizeWidth" : 10,
"mCalculateMouthSizeHeight" : 24,
"mCalculateMouthSizeWidth" : 30,
"mCalculateNoseSizeHeight" : 43,
"mCalculateNoseSizeWidth" : 71,
"mCalculateRightEyeBrowSizeHeight" : 43,
"mCalculateRightEyeBrowSizeWidth" : 52,
"mCalculateRightEyeSizeWidth" : 14,
"mCalculatedRightEyeSizeHeight" : 36
}
Currently in the Android device I have something like this.
Query personLeftEyeSizeWidthQueryendAt = myRef.orderByChild("mCalculateLeftEyeSizeWidth")
.endAt(mCalculateLeftEyeSizeWidth())
.limitToLast(1);
personLeftEyeSizeWidthQuery.addChildEventListener(new ChildEventListener() {....
Query personLeftEyeSizeWidthQueryStartAt = myRef.orderByChild("mCalculateLeftEyeSizeWidth")
.startAt(mCalculateLeftEyeSizeWidth())
.limitToFirst(1);
personLeftEyeSizeWidthQuery.addChildEventListener(new ChildEventListener() {....
My index is like this:
".indexOn": [
"mCalculateLeftEyeSizeWidth",
"mCalculateLeftEyeSizeHeight",
"mCalculateRightEyeSizeWidth",
"mCalculatedRightEyeSizeHeight",
"mCalculateNoseSizeWidth",
"mCalculateNoseSizeHeight",
"mCalculateMouthSizeWidth",
"mCalculateMouthSizeHeight",
"mCalculateLeftEyeBrowSizeWidth",
"mCalculateLeftEyeBrowSizeHeight",
"mCalculateRightEyeBrowSizeWidth",
"mCalculateRightEyeBrowSizeHeight",
"mCalculateFaceSizeWidth",
"mCalculateFaceSizeHeight"
]
My question is do I move forward with 28 single queries each one single query or there is better way to combine all 28. I do not want to give up on some of them as face recognition accuracy is very important for finding a match. Let me know if should I continue with 28 single query then check the key of each one to see that they are all matching the same person or maybe another method.
Thanks Eran Gross