Best Way To Build Smart Search

Discussion in 'iOS Programming' started by loon3y, Jun 11, 2012.

  1. loon3y macrumors 65816


    Oct 21, 2011
    whats the best way to create a smart search,

    should i call data from a web service and have it pop up in a list under the search bar? or should i use core data,

    but the thing is they have 3.5 million items.......

    of course i want it optimized not sure which way to go. but I'm thinking web service,

    because i know theres no way the iPhone can reasonably hold all that data,
  2. jnoxx macrumors 65816


    Dec 29, 2010
    Aartselaar // Antwerp // Belgium
    Google API is what we use, with every letter you type in, send an API to google, it sends back an JSON and you parse that on the fly on a tableview.. that's how alot of them do it ^_-
  3. loon3y, Jun 12, 2012
    Last edited: Jun 12, 2012

    loon3y thread starter macrumors 65816


    Oct 21, 2011
    sorry maybe i should of said more detail.

    I'm basically using the search bar for my customers database via web service.

    and I'm wondering how i can set up the the drop down table view that shows the search the potential search results, something like this:


    and i was wondering i would make an if statement in the XML parser correct?

    like if there is more than one search result, show the drop down and show the potential results, if not (only one result) show that item.


    but only showing the drop down, when i type something in, I.E.: i type in "battle" in the search bar, and it'll show potential search results like "battleship, battlecruiser, battlement, battle map, etc etc"

    but ill be using model names like DC-9096 and such

    and also, would this drop down be possible on a UITextField? because where the user types in the model number is UITextfield, I'm wondering if i can still keep that textfield and just add the drop down, or if its just simpler to use the UISearchbar.

Share This Page