Spaces:
Paused
Paused
Update commons/queryBuilder.js
Browse files123123422 unmodified lines2728293230313233const luceneQueryGenerator = require('lucene-query-generator');
console.log("Imported lucene-query-generator:", luceneQueryGenerator);const { convert } = require('lucene-query-generator');
/** * Builds and formats the Lucene query for the catalog search.22 unmodified lines // Generate the Lucene query string only if the query object is not empty if (Object.keys(query).length > 0) { try { return luceneQueryGenerator(query); // Corrected usage of luceneQueryGenerator return convert(query); // Corrected usage of `convert` } catch (error) { console.error("Error generating Lucene query:", error); return ''; // Return an empty query if generation failscommons/queryBuilder.js+2-4