In my assignment, i got instruction on find()method "A non-null value in criteria[n] matches any field value that begins with criteria[n]. (For example, "Fred" matches "Fred" or "Freddy".)".
1) Does this means if user input search criteria of "Fred", I could just make use of String.startsWith() to search and return the result. But if only make use of String.startsWith(), the search functionality is quite limited. If I only provide this, will I lose points because of this? Because it does not perform more complex search, such as wild card search"*Fred*". What do u guys think? Suggestion please.
2)Do we really need the regular expression to perform search? For example, if user input a search string of "a*b", we could use regexp to perform search. But that means we have to inforced user to know regexp and to send regexp to backend. Is it a good way?
Jeroen T Wenting
posted 10 years ago
1) yes, that's what it means. No need to do more. 2) My server supports it as a demonstration of how the search mechanism I created is pluggable, but it's not called from the client.
complex searching isn't a requirement (at least for my assignment).
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads