parse ios sdk
¿Mi tabla de tabla sintáctica es ineficaz(swift/objectiveC)? (0)
Así que tengo un montón de campos en mi servidor de análisis y tengo una vista de tabla en mi aplicación de iOS. Para cada célula hay un montón de datos como dije antes. Pero el problema es que quiero permitir que un usuario pueda buscar esos datos. Mi pregunta es, si tengo que decir 50,000 pfobjects de listados y mi servidor de parseo y un usuario está buscando en muchos campos, va a ser extremadamente caro o las búsquedas no son tan costosas. Tenga en cuenta que todo lo que busca está en minúscula, por lo que no será un problema. Aquí está mi código. Tengo 31 campos en los que estoy buscando texto. Es malo hacer eso ¿Debo aumentar un montón de facturas en mi lado del servidor si tengo cientos de miles de usuarios? Heres es mi código.
var query : PFQuery<PFObject>!
query.order(byDescending: "createdAt")
let fiel1 = PFQuery(className: "Real Estate")
field1.whereKey("field one", contains: search)
let field2 = PFQuery(className: "Real Estate")
field2.whereKey("field two", contains: search)
let field3 = PFQuery(className: "Real Estate")
field3.whereKey("field three", contains: search)
let field4 = PFQuery(className: "Real Estate")
field3.whereKey("field four", contains: search)
let field5 = PFQuery(className: "Real Estate")
field5.whereKey("field 5", contains: search)
let field6 = PFQuery(className: "Real Estate")
field6.whereKey("field 6", contains: search)
let field7 = PFQuery(className: "Real Estate")
field7.whereKey("field 7", contains: search)
let field8 = PFQuery(className: "Real Estate")
field8.whereKey("field 8", contains: search)
let field9 = PFQuery(className: "Real Estate")
field9.whereKey("field 9", contains: search)
let field10 = PFQuery(className: "Real Estate")
field10.whereKey("field 10", contains: search)
let field11 = PFQuery(className: "Real Estate")
field11.whereKey("field 11", contains: search)
let field12 = PFQuery(className: "Real Estate")
field12.whereKey("field 12", contains: search)
let field13 = PFQuery(className: "Real Estate")
field13.whereKey("field 13", contains: search)
let field14 = PFQuery(className: "Real Estate")
field14.whereKey("field 14", contains: search)
let field15 = PFQuery(className: "Real Estate")
field15.whereKey("field 15", contains: search)
let field16 = PFQuery(className: "Real Estate")
field16.whereKey("field 16", contains: search)
let field17 = PFQuery(className: "Real Estate")
field17.whereKey("field 17", contains: search)
let field18 = PFQuery(className: "Real Estate")
field18.whereKey("field 18", contains: search)
let field19 = PFQuery(className: "Real Estate")
field19.whereKey("field 19", contains: search)
let field20 = PFQuery(className: "Real Estate")
field20.whereKey("field 20", contains: search)
let field21 = PFQuery(className: "Real Estate")
field21.whereKey("field 21", contains: search)
let field22 = PFQuery(className: "Real Estate")
field22.whereKey("field 22", contains: search)
let field23 = PFQuery(className: "Real Estate")
field23.whereKey("field 23", contains: search)
let field24 = PFQuery(className: "Real Estate")
field24.whereKey("field 24", contains: search)
let field25 = PFQuery(className: "Real Estate")
field25.whereKey("field 25", contains: search)
let field26 = PFQuery(className: "Real Estate")
field26.whereKey("field 26", contains: search)
let field27 = PFQuery(className: "Real Estate")
field27.whereKey("field 27", contains: search)
let field28 = PFQuery(className: "Real Estate")
field28.whereKey("field 28", contains: search)
let field29 = PFQuery(className: "Real Estate")
field29.whereKey("field 29", contains: search)
let field30 = PFQuery(className: "Real Estate")
field30.whereKey("field 30", contains: search)
let objectId = PFQuery(className: "Real Estate")
objectId.whereKey("objectId", contains: search)
query = PFQuery.orQuery(withSubqueries: [field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19, field20, field21, field22, field23, field24, field25, field26, field27, field28, field29, field30, objectId])