Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

93
Views
flexsearch query with multiple words in multiple fields

I use flexsearch javascript library to index a set of objects and make queries on it.

Consider this index definition:

const databaseIndex = new Document({
    preset: 'match',
    tokenize: 'full',
    language: 'it',
    resolution: 1,
    charset: 'latin:advanced',
    document: {
        id: 'id',
        index: ['id', 'brand', 'name'],
    },
});

I add the items to the document like this:

rawProductsList.forEach((element) => {
    databaseIndex.add(element);
});

Consider a simple set of objects like this:

id  brand   name    
------------------- 
0   oreo    biscuit     
1   barilla biscuit 

When I search for oreo or biscuit I get the correct results, but what I want to achieve is that a query oreo biscuit gives me the object with id 1, but in my configuration it doesn't return anything.

How can I do it?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!