Do you find yourself getting confused about range indexes in MarkLogic? When should you use range indexes?
Luckily the whitepaper Inside MarkLogic Server explains 7 uses for range indexes. If you haven’t read it, you should really consider doing so for a better understanding of how MarkLogic Server works internally. The following information comes from page 26:
For example, you can provide a query constraint for documents having a date between two given endpoints.
For example, you can compare decimal or date values based on their semantic value rather than their lexical serialized value. (Note that you can perform equality comparisons for numeric and Boolean data types in JSON documents without a range index. See “Indexing JSON” above for details.)
For example, you can get a distinct list of message senders from documents in a result set, as well as how often each sender appears. These are often called facets and are displayed with search results to aid search navigation. You can also perform fast aggregates against the extracted values to calculate things like standard deviation and covariance.
For example, you can sort a large set of product results by price.
For example, if you have a set of documents describing people and a set of documents describing works authored by those people, you can use range indexes to efficiently run queries looking for certain kinds of works authored by certain kinds of people.
Bitemporal documents include four range indexes that track when events occurred in the real world as well as when the events were stored in MarkLogic. Querying the four range indexes and merging the results is key to resolving bitemporal queries. See the “Bitemporal” section for details.
For example, you can quickly get a report for which two entity values appear most often together in documents, without knowing either of the two entity values in advance. This is a more advanced use case, so we won’t cover it in this book.
Like what you just read, here are a few more articles for you to check out or you can visit our blog overview page to see more.
The MarkLogic Optic API makes your searches smarter by incorporating semantic information about the world around you and this tutorial shows you just how to do it.
Are you someone who’s more comfortable working in Graphical User Interface (GUI) than writing code? Do you want to have a visual representation of your data transformation pipelines? What if there was a way to empower users to visually enrich content and drive data pipelines without writing code? With the community tool Pipes for MarkLogic […]
Don’t waste time stitching together components. MarkLogic combines the power of a multi-model database, search, and semantic AI technology in a single platform with mastering, metadata management, government-grade security and more.Request a Demo