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 8828213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:33:18+00:00 2026-06-14T07:33:18+00:00

I have asked this in the past but couldn’t get a clear answer. I

  • 0

I have asked this in the past but couldn’t get a clear answer.
I have an object in CoreData like this, KeyWord(word, chapter)

Word      Chapter
cold      chapter1
cold      chapter2
cold      chapter3
weather   chapter1
weather   chapter2
humidity  chapter7
Florida   chapter8
Florida   chapter9

I would like the user to search for any of these words as in “cold Florida weather ..”
So, I broke the search into an NSArray *tokens = [search.text compnentsSeparatedBy:@" "];

Currently, I have this predicate which kinda works:

[NSPredicate predicateWithFormat@"word contains[cd]%@ AND word contains [cd]%@",words[0],words[1],words[2]..]

But, the problem is that I don’t know how many words the user will type in, so, Is there a way to search the column ‘word’ using NSArray of tokens?

  • 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-14T07:33:19+00:00Added an answer on June 14, 2026 at 7:33 am

    Check out:

    [NSCompoundPredicate andPredicateWithSubpredicates:/*Your Array Of Contains Predicates Here*/]

    Although I’m unclear from your question if you want to be using the IN command to search an array/set of objects.

    [NSPredicate predicateWithFormat:@"word IN %@", setOfWords]

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

Sidebar

Related Questions

I have asked this question before but did not get the satisfied answer as
I have asked a question similar to this in the past but this is
I have asked this before but I didn't get the question right so the
This may have been asked in the past but I couldnt find a suitable
I know this question has been asked in the past, but times have changed
This question may have been asked a million times in the past but I
i asked this question yesterday but it doesnt seem to have asked properly so
I have just asked this question an hour ago but with regards to IE8
I know this question was already asked in the past, but i am really
I have tried searching for an answer to this but I cannot find anything

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.