Giter VIP home page Giter VIP logo

avplayertest's Introduction

Core Spotlight

What is Spotlight

  • Original search API on macOS
  • Document-centric
    Search results identify document
    Not location in document
  • Not ideal for databases

What is Core Spotlight

Original search tool on iOS Database-friendly Spotlight API Search for content in apps Allows deep linking Access CoreSpotlight search data from your app No zero-length files

Three Pieces

Way to indicate property participation NSPropertyDescription.indexedBySpotlight Way to specify display name NSEntityDescription.coreSpotlightDisplayNameExpression Exporter

coreSpotlightDisplayNameExpression

NSExpression Evaluated during Core Spotlight update object parameter will be an instance of NSManagedObject Can return anything Core Spotlight can accept CSLocalizedString Keypath Property name Function lowercase:(displayName) FUNCTION:(castTo:(@“Class”, @“MyUtilityClass”), @“displayNameFor:”, self))

NSCoreDataCoreSpotlightDelegate

Implements CSSearchableIndexDelegate Default implementations of all methods Uses a separate store on a background thread Initialize with NSPersistentStoreDescription + model Override point is NSCoreDataCoreSpotlightDelegate.attributeSet(for object:)

Non-Sharp Corners

Will automatically export to Core Spotlight on first launch Uses Persistent History Tracking to ensure all data is pushed

Sharpish Corners

Core Spotlight and Spotlight integration mutually exclusive
entity.coreSpotlightDisplayNameExpression OR property.storedInExternalRecord Doesn’t track results of batch operations

New Indexing API

Indexing

  • Configure database for faster search
  • One or more columns per index
  • One or more indexes per column
  • Database will choose most efficient index based on query

Current Indexing APIs

  • Single property index

NSAttributeDescription.isIndexed

  • Multiple column index

NSEntityDescription.compoundIndexes

avplayertest's People

Contributors

seung-hwan-lee avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.