Closed kmcostel closed 8 years ago
Why not something like this?
var users =
jsearch.facets([
jsearch.facet('Industry', cts.jsonPropertyReference('industry')).orderBy('frequency', 'descending'),
jsearch.facet('Feature', cts.jsonPropertyReference('features')).orderBy('frequency', 'descending'),
],
jsearch.documents().map({extract:{select:'all'}})
)
.where(
cts.andQuery([
industryQuery,
featureQuery,
geoQuery
])
)
.result();
That lets the JSearch library handle the facet generation for you.
Need to use cts to combine queries, so switch jsearch searches with cts. queries