Home / Companies / Harper / Blog / Post Details
Content Deep Dive

How to Create Custom Indexes with Computed Properties

Blog post from Harper

Post Details
Company
Date Published
Author
Kris Zyp
Word Count
1,403
Company Posts That Month
3
Language
English
Hacker News Points
-
Post removed?
No
Summary

HarperDB 4.4 introduces computed properties and custom indexing, enabling efficient and flexible data search capabilities. Computed properties are virtual fields derived in real time from existing data, optimizing storage and handling frequently changing fields like discounts or sales stats. By creating custom indexes on these computed properties, users can perform efficient searches on data patterns not directly represented in the underlying data structure, opening possibilities for advanced data exploration, including full-text and vector indexing. The text details the process of defining computed properties in schema.graphql, using JavaScript for property computation, and explicitly including these properties in queries to utilize them. Custom indexing allows for more complex search queries, such as searching by indexed computed properties like authorLastName or keywords, enabling broad and flexible search capabilities. The document also discusses composite indexing, which combines multiple fields for precise searches, enhancing the efficiency of queries that involve matching across multiple criteria. This approach lays the foundation for more advanced indexing techniques, such as full-text indexing, which are anticipated in future HarperDB releases.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.