Added scene tags filter.
This commit is contained in:
@@ -66,7 +66,7 @@ export async function fetchActorsById(actorIds, options = {}) {
|
||||
const actor = actors.find((actorEntry) => actorEntry.id === actorId);
|
||||
|
||||
if (!actor) {
|
||||
console.warn(`Can't find ${actorId}`);
|
||||
console.warn(`Can't match actor ${actorId}`);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -103,6 +103,8 @@ function buildQuery(filters) {
|
||||
};
|
||||
|
||||
if (filters.query) {
|
||||
console.log(filters.query);
|
||||
|
||||
query.bool.must.push({
|
||||
match: {
|
||||
name: filters.query,
|
||||
@@ -198,6 +200,7 @@ function buildQuery(filters) {
|
||||
const sortMap = {
|
||||
likes: 'stashed',
|
||||
scenes: 'scenes',
|
||||
relevance: '_score',
|
||||
};
|
||||
|
||||
function getSort(order) {
|
||||
@@ -229,7 +232,7 @@ export async function fetchActors(filters, rawOptions) {
|
||||
expressions,
|
||||
limit: options.limit,
|
||||
offset: (options.page - 1) * options.limit,
|
||||
sort: getSort(options.order),
|
||||
sort: getSort(options.order, filters),
|
||||
aggs: {
|
||||
countries: {
|
||||
terms: {
|
||||
|
||||
Reference in New Issue
Block a user