Spaces:
Paused
Paused
Update commons/queryBuilder.js
Browse files12345622 unmodified lines29303132333435const luceneQueryGenerator = require('lucene-query-generator');console.log("Imported lucene-query-generator:", luceneQueryGenerator);/*** 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 emptyif (Object.keys(query).length > 0) {try {return luceneQueryGenerator(query); // Corrected usage of luceneQueryGenerator} catch (error) {console.error("Error generating Lucene query:", error);return ''; // Return an empty query if generation fails123422 unmodified lines27282930313233const { 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 emptyif (Object.keys(query).length > 0) {try {return convert(query); // Corrected usage of `convert`} catch (error) {console.error("Error generating Lucene query:", error);return ''; // Return an empty query if generation fails
commons/queryBuilder.js+2-4