Remove more instances of the work lucene.
This commit is contained in:
parent
781f3bd64a
commit
c759d7b63a
|
@ -1 +1 @@
|
||||||
Subproject commit 247f56d455abbd64da17d865275ed978f577549f
|
Subproject commit a03225549e3ce61f43d0da878da162e08941b939
|
|
@ -49,7 +49,7 @@
|
||||||
exportFormat = Array.isArray(options) ? options[0]?.key : []
|
exportFormat = Array.isArray(options) ? options[0]?.key : []
|
||||||
}
|
}
|
||||||
|
|
||||||
$: luceneFilter = QueryUtils.buildQuery(appliedFilters)
|
$: query = QueryUtils.buildQuery(appliedFilters)
|
||||||
$: exportOpDisplay = buildExportOpDisplay(
|
$: exportOpDisplay = buildExportOpDisplay(
|
||||||
sorting,
|
sorting,
|
||||||
filterDisplay,
|
filterDisplay,
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
tableId: view,
|
tableId: view,
|
||||||
format: exportFormat,
|
format: exportFormat,
|
||||||
search: {
|
search: {
|
||||||
query: luceneFilter,
|
query,
|
||||||
sort: sorting?.sortColumn,
|
sort: sorting?.sortColumn,
|
||||||
sortOrder: sorting?.sortOrder,
|
sortOrder: sorting?.sortOrder,
|
||||||
paginate: false,
|
paginate: false,
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { cloneDeep } from "lodash/fp"
|
||||||
import { QueryUtils } from "../utils"
|
import { QueryUtils } from "../utils"
|
||||||
import { convertJSONSchemaToTableSchema } from "../utils/json"
|
import { convertJSONSchemaToTableSchema } from "../utils/json"
|
||||||
|
|
||||||
const { buildQuery, luceneLimit, runQuery, luceneSort } = QueryUtils
|
const { buildQuery, limit: queryLimit, runQuery, sort } = QueryUtils
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parent class which handles the implementation of fetching data from an
|
* Parent class which handles the implementation of fetching data from an
|
||||||
|
@ -176,7 +176,7 @@ export default class DataFetch {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build the lucene query
|
// Build the query
|
||||||
let query = this.options.query
|
let query = this.options.query
|
||||||
if (!query) {
|
if (!query) {
|
||||||
query = buildQuery(filter)
|
query = buildQuery(filter)
|
||||||
|
@ -233,12 +233,12 @@ export default class DataFetch {
|
||||||
|
|
||||||
// If we don't support sorting, do a client-side sort
|
// If we don't support sorting, do a client-side sort
|
||||||
if (!this.features.supportsSort && clientSideSorting) {
|
if (!this.features.supportsSort && clientSideSorting) {
|
||||||
rows = luceneSort(rows, sortColumn, sortOrder, sortType)
|
rows = sort(rows, sortColumn, sortOrder, sortType)
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we don't support pagination, do a client-side limit
|
// If we don't support pagination, do a client-side limit
|
||||||
if (!this.features.supportsPagination && clientSideLimiting) {
|
if (!this.features.supportsPagination && clientSideLimiting) {
|
||||||
rows = luceneLimit(rows, limit)
|
rows = queryLimit(rows, limit)
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -585,7 +585,7 @@ class GoogleSheetsIntegration implements DatasourcePlus {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const [sortField, sortInfo] = Object.entries(query.sort)[0]
|
const [sortField, sortInfo] = Object.entries(query.sort)[0]
|
||||||
response = dataFilters.luceneSort(
|
response = dataFilters.sort(
|
||||||
response,
|
response,
|
||||||
sortField,
|
sortField,
|
||||||
sortInfo.direction,
|
sortInfo.direction,
|
||||||
|
|
|
@ -451,7 +451,7 @@ export const runQuery = (docs: any[], query?: SearchFilters) => {
|
||||||
* @param sortOrder the sort order ("ascending" or "descending")
|
* @param sortOrder the sort order ("ascending" or "descending")
|
||||||
* @param sortType the type of sort ("string" or "number")
|
* @param sortType the type of sort ("string" or "number")
|
||||||
*/
|
*/
|
||||||
export const luceneSort = (
|
export const sort = (
|
||||||
docs: any[],
|
docs: any[],
|
||||||
sort: string,
|
sort: string,
|
||||||
sortOrder: SortDirection,
|
sortOrder: SortDirection,
|
||||||
|
@ -481,7 +481,7 @@ export const luceneSort = (
|
||||||
* @param docs the data
|
* @param docs the data
|
||||||
* @param limit the number of docs to limit to
|
* @param limit the number of docs to limit to
|
||||||
*/
|
*/
|
||||||
export const luceneLimit = (docs: any[], limit: string) => {
|
export const limit = (docs: any[], limit: string) => {
|
||||||
const numLimit = parseFloat(limit)
|
const numLimit = parseFloat(limit)
|
||||||
if (isNaN(numLimit)) {
|
if (isNaN(numLimit)) {
|
||||||
return docs
|
return docs
|
||||||
|
|
Loading…
Reference in New Issue