Live Platform
  • Introduction
  • Release Notes
    • Live 3
      • 3.59.0
      • 3.58.0
      • 3.57.0
      • 3.56.0
      • 3.55.0
      • 3.54.0
      • 3.53.0
      • 3.52.0
      • 3.51.0
      • 3.50.0
      • 3.49.0
      • 3.48.0
      • 3.47.0
      • 3.46.0
      • 3.45.0
      • 3.44.0
      • 3.43.0
      • 3.42.0
      • 3.41.0
      • 3.40.0
      • 3.39.0
      • 3.38.0
      • 3.37.0
      • 3.36.0
      • 3.35.0
      • 3.34.0
      • 3.33.0
      • 3.32.0
      • 3.31.0
      • 3.30.0
      • 3.29.0
      • 3.28.0
      • 3.27.0
      • 3.26.0
      • 3.25.0
      • 3.24.0
      • 3.23.0
      • 3.22.0
      • 3.21.0
      • 3.20.0
      • 3.19.0
      • 3.18.0
      • 3.17.0
      • 3.16.0
      • 3.15.0
      • 3.14.0
      • 3.13.0
      • 3.12.0
      • 3.11.0
      • 3.10.0
      • 3.9.0
      • 3.8.0
      • 3.7.0
      • 3.6.0
      • 3.5.0
      • 3.4.0
      • 3.3.0
      • 3.2.0
      • 3.1.0
      • 3.0.0
    • Live 2
  • Articles
    • Creating an aggregation
    • Creating a pipe
  • Theoretical Background
    • Fundamentals
    • Key Advantages
  • Platform Architecture
    • Introduction
    • Queries
    • Glossary
  • Featured plugins
    • Annotations
    • Groovy support
    • Messenger
    • Microsoft Teams
    • MongoDB
    • MongoDB Timeseries
    • MongoDB Kit
    • Purge plugin
    • SQL
    • TCP Input
    • TimescaleDB
  • Data visualization
    • Pipes widgets
      • Temporal
      • Cartesian
      • Multi-value snapshot
      • Single-value snapshot
      • Tables
      • Heatmap
      • JSX Widgets
      • Lollipop
      • Histogram
      • State Timeline
      • Boxplot
    • Pipes modifiers on Pipes charts
  • Alerts and notifications
    • Pipes modifiers on rules
  • Pipes Queries
    • Introduction
    • Dynamic filters
    • Meta parameters
    • Reducer
      • Uniform compress
      • PIP
    • Storage Hints
    • Execution Context
    • Event flow modifiers
  • Developers
    • Plugins
    • Packages
    • Backend API
      • Lookup Tables
      • Extensions
      • Settings
      • Storage Providers
      • Web Services
      • Web Setup
      • Entity Audit
    • Web application
      • Services
        • Point service
        • Menu service
      • Browser Compatibility
      • Runtime modules
        • Core Javascript modules
        • Library modules
        • Adding modules to runtime
      • Localization (i18n)
      • Date formatting
      • Dashboard and Widgets
        • Widget API
        • Custom widget editors
        • Live Event Types
        • Live Widget Configuration
        • Live Widget Packaging
        • Widget Request Interceptors
      • React Contexts
        • Dashboard
        • Dashboard widget
      • Registering Home Page options
    • Python application
    • Subscribing to Live Events
  • Administration
    • Configuration
      • Home Page Customization
      • live.properties
    • Infrastructure Monitoring
    • Storage Monitoring
    • Queries Monitoring
    • Logs Monitoring
    • Data Purging
  • Features
    • Access Permission
    • Datasources
    • Export Dashboard
    • Partial Indexes
    • WebApp Metrics
    • Entity Audit
Powered by GitBook
On this page
  • Registration
  • Limitations
  • MongoDB
  • PostgreSQL

Was this helpful?

  1. Features

Partial Indexes

Optionally, Live enables you to create partial indexes for event types that require special attention regarding the space consumed by indexes or query performance for small slices of data.

PreviousExport DashboardNextWebApp Metrics

Last updated 3 years ago

Was this helpful?

Live enables the plugins to register indexes for some specific event types through the Live API. Partial indexes are just an option the developer can use to specify a Pipes term filter expression to reduce the index size and enhance the efficiency of storage queries in a storage provider.

Partial indexes API is featured at Live 3.0.0 and depends on the underlying storage provider.

Registration

import net.intelie.live.Event;
import net.intelie.live.IndexDef;
import net.intelie.live.Live;
import net.intelie.pipes.filters.Filter;
//...

Filter filter = live.pipes().compiler().filter().compile("field2:value");
live.index().registerIndex(new IndexDef("mydata", "field1").withPartial(filter));

The filter must be a Pipes term filter expression and should be compiled as demonstrated above. See more details about Pipes term filters on:

The expression exemplified above will create the index for field1 only in case of field2 assume the string value. The support for type cast and other operators is provided from the Pipes perspective.

Those expressions written in Pipes language will be translated to the specific Storage Provider query language, thus each storage provider may limit the operators supported.

Limitations

Currently Plugin MongoDB and Plugin PostgreSQL support partial indexes. Thus, if you try to use partial indexes in Live Index subsystem combined to any other storage provider, you may check the capabilities of storage provider implementation being used.

MongoDB

For short, partial indexes in MongoDB installations will support only:

  • equality expressions (i.e. field:value)

  • range operators (i.e. field:[200, 300))

  • and operators (i.e. field1:value1 field2:value2)

PostgreSQL

Starting at 3.0.0, the Live plugin for MongoDB supports only a few partial index expressions since it relies on native MongoDB partial index expressions. MongoDB partial index expressions supports a few operators as described in MongoDB official site: .

Starting at 3.2.0, the Live plugin for PostgreSQL supports partial indexes by converting the Pipes filter expressions to WHEREclauses in PostgreSQL. In it's easy to write most of range, literal comparison and wildcards operators that will be easily mapped into SQL statements.

For further details about the native support for partial indexes at PosgreSQL, see .

https://pipes.intelie.com/docs/0.24/#chapter-filters
https://docs.mongodb.com/manual/core/index-partial
Pipes filter syntax
https://www.postgresql.org/docs/12/indexes-partial.html