Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7854517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:05:07+00:00 2026-06-02T20:05:07+00:00

I am currently working the search feature for my app. The app uses CoreData.

  • 0

I am currently working the search feature for my app. The app uses CoreData. Now here is my question.

I am having trouble deciding in which method to use, should I use the NSMutableArray method to find the strings in all my data.

NSArray method: This is just to set the idea of what I mean of the search feature with NSArray.

NSArray* inputArray = [NSArray arrayWithObjects:@"dog", @"cat", @"fat dog", @"thing", @"another thing", @"heck here's another thing", nil];

NSMutableArray* containsAnother = [NSMutableArray array];
NSMutableArray* doesntContainAnother = [NSMutableArray array];

for (NSString* item in inputArray)
{
if ([item rangeOfString:@"another"].location != NSNotFound)  
[containsAnother addObject:item];
}

CoreData Method:
Still working on it, sorry. I have an idea tho how to implement it.

The thing is, since CoreData works with SQLite, I believe it should be best to use it like supposedly the search will be efficient with it. But that is my opinion. I just wanted to know which method is most efficient since most likely this feature will be used when lots of records begin to be saved.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T20:05:10+00:00Added an answer on June 2, 2026 at 8:05 pm

    In general, managed objects with predicates tend to be faster, because they can use the SQL search engine, which can be faster (and more memory efficient).

    In this instance, it looks like you’d have to copy the entire table to memory, then pick out certain items, which is definitely less efficient than simply requesting all items where location is empty. (Of course, the question becomes how do you write a predicate for an empty field, and I’m not comfortable enough with Core-Data yet to comment on that).

    In other words, your question appears to boil down to which is faster: copying all your data from the database, then checking to see which items you want, or just copying out the ones you want. I know which one I’d believe.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I’m currently working on a small web app that allows people to search for
I am currently working on a VERY simple search feature for my website. The
Hi I am currently working on Search feature of Facebook Graph API using C#
Hello I am currently working on implementing a spatial search feature for a website
I'm new to c#, as in. I'm currently working on a search function in
I'm currently working on implementing a fulltext search engine for one of our sites,
me working on search in a multilingual site (currently only english and turkish). As
Currently I'm prototyping search with Lucene.Net-2.0-004 on a web application. It's working very well,
I'm currently working on a search box for my site that will hopefully use
I'm currently working on a database which is rather complex, at least for my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.