#256 - .loom indexing is behind a setting for now

This commit is contained in:
Simon Cambier
2023-07-16 21:52:08 +02:00
parent afca0694ca
commit a842d1768f
2 changed files with 23 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ import {
import type { CanvasData } from 'obsidian/canvas'
import type { AsPlainObject } from 'minisearch'
import type MiniSearch from 'minisearch'
import { settings } from './settings'
/**
* This function is responsible for extracting the text from a file and
@@ -60,7 +61,7 @@ async function getAndMapIndexedDocument(
}
// ** Dataloom plugin **
else if (isFileFromDataloomPlugin(path)) {
else if (settings.dataloomIndexing && isFileFromDataloomPlugin(path)) {
try {
const data = JSON.parse(await app.vault.cachedRead(file))
// data is a json object, we recursively iterate the keys