java - How to make a more flexible search query using parse.com -


i've got database full of users , information , use parse.com search through them.

now, make searching bit better, , make flexible uppercase, accents , like, have column called search_helper gets filled when user registers or updates info, this:

            string fullnamenormalized = normalizer.normalize(inputfirstname.gettext() + " " + inputfirstsurname.gettext() + " " + inputsecondsurname.gettext(), normalizer.form.nfd);             fullnamenormalized = fullnamenormalized.replaceall("[^\\p{ascii}]", "");             fullnamenormalized = fullnamenormalized.tolowercase();                string searchhelper = fullnamenormalized + " " + email + " " + phone; 

so it's longer string contains of user's information in lowercase, when make query, looks this:

            string searchparams = searchtext.gettext().tostring().tolowercase().trim();             parsequery<parseuser> newsearch = parseuser.getquery();             newsearch.wherecontains("search_helper", searchparams); 

and works, part. example, if try search "john sanchez smith", it'll correctly return "john sánchez smith" search result. however, if search "john smith", won't find him, because column doesn't contain in order. know of workaround this?

thanks time

it not possible search "john smith", because contains means 1 part of string can searched, has together. i'm sorry that.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

javascript - Rivets.js rv-show not working with rv-each -