Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

95
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda