Skip to main content

Getting Started with Optic

Building Multi-model Queries

Combining data from different models with just a few lines of code is Optic’s strength. Optic’s Data Accessor Functions represent any model of data they pull from MarkLogic as one model—the row sequence. So, the “multi-model” Optic query effectively becomes a single-model join, union, intersection, or except.

Following are two multi-model query examples that each complete the task we started in Building Semantic Queries: finding all our employees in the Northeast.