Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

94
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda