• Skip to primary navigation
  • Skip to main content
  • Skip to footer

Codemotion Magazine

We code the future. Together

  • Discover
    • Events
    • Community
    • Partners
    • Become a partner
    • Hackathons
  • Magazine
    • Backend
    • Frontend
    • AI/ML
    • DevOps
    • Dev Life
    • Soft Skills
    • Infographics
  • Talent
    • Discover Talent
    • Jobs
    • Manifesto
  • Companies
  • For Business
    • EN
    • IT
    • ES
  • Sign in

TheZalApril 2, 2024

OramaSearch: Your New Favorite Search Engine

Backend
OramaSearch
facebooktwitterlinkedinreddit

What Is OramaSearch

Welcome to OpenDev Explorer, where I explore the Open Source world with an eye on developer experience. I am Riccardo (aka TheZal), and today I will talk to you about OramaSearch, an open-source search engine with a “battery included” and zero dependencies.

General Overview

“It’s not the finding, but the searching” is one of the mottos of OramaSearch, an open-source search engine ready out of the box and with zero dependencies. Originally named Lyra as an exercise for a talk by Michele Riva to explain how a full-text search engine works, it has since become a real project thanks to the feedback from the community (5800 stars on GitHub and thousands of downloads in a few months) who found in Orama Search a powerful and optimized search engine that is simple to use and able to meet all the community’s requests.

Recommended article
May 13, 2025

Start building REST APIs with Django REST Framework

raffaelegrieco.it

raffaelegrieco.it

Backend

Instruction Manual

Installation

Installing OramaSearch is very simple; it is available on all major package managers (npm, yarn, pnpm) and can be installed with a simple command:

npm i @orama/oramaCode language: CSS (css)

Or you can directly import it into a browser module:

<html>
  <body>
    <script type="module">
      import { create, search, insert } from 'https://unpkg.com/@orama/orama@latest/dist/index.js'
      // ...
    </script>
  </body>
</html>Code language: HTML, XML (xml)

Usage

First, you need to create a new instance (from now on database) with an index schema.

The schema represents the searchable properties of the document to be inserted into the database. It is also possible to have additional unindexed properties, as long as these are not needed in the search.

An example of usage (taken directly from the official documentation) is as follows:

import { create, search, insert } from '@orama/orama'

const db = await create({
  schema: {
    name: 'string',
    description: 'string',
    price: 'number',
    meta: {
      rating: 'number',
    },
  },
})

await insert(db, {
  name: 'Wireless Headphones',
  description: 'Experience immersive sound quality with these noise-cancelling wireless headphones.',
  price: 99.99,
  meta: {
    rating: 4.5,
  },
})

const searchResult = await search(db, {
  term: 'headphones',
})

console.log(searchResult.hits.map((hit) => hit.document))Code language: JavaScript (javascript)

The Developer Experience With OramaSearch

The greatest success of Orama Search is that the community turned it into a real project (and product). The community has acclaimed Orama thanks to its fantastic developer experience and simplicity of use.

Several points improve the developer experience of OramaSearch:

1 – The documentation is clear and well-done
2 – The community is very active and responds very quickly to questions asked on GitHub or Slack
3 – The library is very well written and allows you to start using it in a few minutes
4 – Orama provides several official plugins that allow the use of Orama in different contexts (such as on Astro)

The Extra Mile

OramaSearch has some features that give it an extra mile, making it a very powerful and flexible search engine.

Having been designed to contain a vector database inside, OramaSearch natively implements vector search of elements.

It also implements geo-search functionality, allowing searching for elements based on their geographical location.

Comparison with the Status Quo

There are several full-text search engines (such as ElasticSearch), but I don’t think there is one on the market that has the same arsenal as OramaSearch.

However, I am sure that at the moment there is no utility as powerful as Orama that shares its simplicity of use, making Orama Search unique in its kind.

Regarding search speed, Orama Search is one of the fastest search engines I have ever tried, and this is another point in its favor.

Related Posts

Top 10 online platforms to practice Python every dev should know

Lucilla Tomassi
May 13, 2025

.NET Refactoring Series: Episode 1 — How to Approach Service Refactoring

giovanni-ferrari
April 2, 2025

Queueing Without a Queue: The PostgreSQL Hack

Puppo92
March 13, 2025

How to tell if you’ve got what it takes: let’s do a code review

Matteo Baccan
January 14, 2025
Share on:facebooktwitterlinkedinreddit

Tagged as:OramaSearch

TheZal
Hello there! My name is Riccardo (aka TheZal), a passionate software engineer who loves to combine his passion for code with his love for fantasy realms like Dungeons and Dragons, Harry Potter, Star Wars, LOTR, etc., etc. I'm really into studying and exploring new technologies (with a lot of love for Open Source). I'm also a co-owner of a 12-year-old dachshund called Poldo, who is the mascot of my blog!
Angular HostAttributeToken: the new way to inject attributes
Previous Post
Angular new output() function
Next Post

Footer

Discover

  • Events
  • Community
  • Partners
  • Become a partner
  • Hackathons

Magazine

  • Tech articles

Talent

  • Discover talent
  • Jobs

Companies

  • Discover companies

For Business

  • Codemotion for companies

About

  • About us
  • Become a contributor
  • Work with us
  • Contact us

Follow Us

© Copyright Codemotion srl Via Marsala, 29/H, 00185 Roma P.IVA 12392791005 | Privacy policy | Terms and conditions