Skip to content
Snippets Groups Projects

Uniq molstar plugin per page

Merged Remi PLANEL requested to merge uniq-molstar-plugin-per-page into dev
2 files
+ 43
75
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -25,76 +25,39 @@ const cellPlotMargin = ref({
marginRight: 50
})
const client = useMeiliSearchRef()
onBeforeMount(async () => {
const { data } = await useAsyncMeiliSearch({
index: toValue(dbName), query: "", params: {
facets: ["*"],
filter: [],
page: 1,
hitsPerPage: 25,
}
})
await getAllHits({
index: toValue(dbName), query: "", params: {
facets: ["*"],
filter: [],
// page: 1,
// hitsPerPage: 25,
limit: 500000,
sort: ["type:asc"]
}
})
autocompleteMeiliFacetsProps.value.facetDistribution = toValue(data)?.facetDistribution
// allHitsDb.value = toValue(data)?.hits
const { data: taxo } = await useAsyncMeiliSearch({
index: toValue("refseqtaxo"), query: "", params: {
facets: ["*"],
filter: [],
page: 1,
hitsPerPage: 25,
}
})
taxonomyFacet.value = toValue(taxo)?.facetDistribution
})
onMounted(async () => {
const { data } = await useAsyncMeiliSearch({
index: toValue(dbName), query: "", params: {
try {
const data = await client.index(toValue(dbName)).search("", {
facets: ["*"],
filter: [],
page: 1,
hitsPerPage: 25,
// limit: 500000,
// sort: ["type:asc"]
}
})
})
autocompleteMeiliFacetsProps.value.facetDistribution = data?.facetDistribution
} catch (error) {
}
await getAllHits({
index: toValue(dbName), query: "", params: {
facets: ["*"],
filter: [],
// page: 1,
// hitsPerPage: 25,
limit: 500000,
sort: ["type:asc"]
}
})
autocompleteMeiliFacetsProps.value.facetDistribution = toValue(data)?.facetDistribution
// allHitsDb.value = toValue(data)?.hits
const { data: taxo } = await useAsyncMeiliSearch({
index: toValue("refseqtaxo"), query: "", params: {
try {
const taxo = await client.index("refseqtaxo").search("", {
facets: ["*"],
filter: [],
page: 1,
hitsPerPage: 25,
}
})
taxonomyFacet.value = toValue(taxo)?.facetDistribution
})
taxonomyFacet.value = taxo?.facetDistribution
} catch (error) {
}
})
const { serialize } = useSerialize()
@@ -221,16 +184,14 @@ async function getAllHits(params: { index: string, params: Record<string, any>,
pendingAllHits.value = true
try {
const { data, error } = await useAsyncMeiliSearch({
...params,
index: "refseqsanitized",
params: {
const data = await client
.index("refseqsanitized")
.search("", {
...params.params,
'attributesToRetrieve': ['type', 'Assembly', ...toValue(availableTaxo)]
}
})
allHits.value = data.value
})
allHits.value = data
} finally {
pendingAllHits.value = false
Loading