Chore: Moved search files from "searchengine" namespace to just "search"

pull/9672/head
Laurent Cozic 2024-01-05 14:15:47 +00:00
parent 29b8fcd5bb
commit 2bf4f39ca1
26 changed files with 46 additions and 46 deletions

View File

@ -913,17 +913,17 @@ packages/lib/services/rest/utils/paginatedResults.js
packages/lib/services/rest/utils/readonlyProperties.js
packages/lib/services/rest/utils/requestFields.js
packages/lib/services/rest/utils/requestPaginationOptions.js
packages/lib/services/searchengine/SearchEngine.resources.test.js
packages/lib/services/searchengine/SearchEngine.test.js
packages/lib/services/searchengine/SearchEngine.js
packages/lib/services/searchengine/SearchEngineUtils.test.js
packages/lib/services/searchengine/SearchEngineUtils.js
packages/lib/services/searchengine/SearchFilter.test.js
packages/lib/services/searchengine/filterParser.test.js
packages/lib/services/searchengine/filterParser.js
packages/lib/services/searchengine/gotoAnythingStyleQuery.test.js
packages/lib/services/searchengine/gotoAnythingStyleQuery.js
packages/lib/services/searchengine/queryBuilder.js
packages/lib/services/search/SearchEngine.resources.test.js
packages/lib/services/search/SearchEngine.test.js
packages/lib/services/search/SearchEngine.js
packages/lib/services/search/SearchEngineUtils.test.js
packages/lib/services/search/SearchEngineUtils.js
packages/lib/services/search/SearchFilter.test.js
packages/lib/services/search/filterParser.test.js
packages/lib/services/search/filterParser.js
packages/lib/services/search/gotoAnythingStyleQuery.test.js
packages/lib/services/search/gotoAnythingStyleQuery.js
packages/lib/services/search/queryBuilder.js
packages/lib/services/share/ShareService.test.js
packages/lib/services/share/ShareService.js
packages/lib/services/share/reducer.js

22
.gitignore vendored
View File

@ -893,17 +893,17 @@ packages/lib/services/rest/utils/paginatedResults.js
packages/lib/services/rest/utils/readonlyProperties.js
packages/lib/services/rest/utils/requestFields.js
packages/lib/services/rest/utils/requestPaginationOptions.js
packages/lib/services/searchengine/SearchEngine.resources.test.js
packages/lib/services/searchengine/SearchEngine.test.js
packages/lib/services/searchengine/SearchEngine.js
packages/lib/services/searchengine/SearchEngineUtils.test.js
packages/lib/services/searchengine/SearchEngineUtils.js
packages/lib/services/searchengine/SearchFilter.test.js
packages/lib/services/searchengine/filterParser.test.js
packages/lib/services/searchengine/filterParser.js
packages/lib/services/searchengine/gotoAnythingStyleQuery.test.js
packages/lib/services/searchengine/gotoAnythingStyleQuery.js
packages/lib/services/searchengine/queryBuilder.js
packages/lib/services/search/SearchEngine.resources.test.js
packages/lib/services/search/SearchEngine.test.js
packages/lib/services/search/SearchEngine.js
packages/lib/services/search/SearchEngineUtils.test.js
packages/lib/services/search/SearchEngineUtils.js
packages/lib/services/search/SearchFilter.test.js
packages/lib/services/search/filterParser.test.js
packages/lib/services/search/filterParser.js
packages/lib/services/search/gotoAnythingStyleQuery.test.js
packages/lib/services/search/gotoAnythingStyleQuery.js
packages/lib/services/search/queryBuilder.js
packages/lib/services/share/ShareService.test.js
packages/lib/services/share/ShareService.js
packages/lib/services/share/reducer.js

View File

@ -2,7 +2,7 @@ import * as React from 'react';
import { Platform, Linking, View, Switch, ScrollView, Text, TouchableOpacity, Alert, PermissionsAndroid, Dimensions, AccessibilityInfo } from 'react-native';
import Setting, { AppType, SettingMetadataSection } from '@joplin/lib/models/Setting';
import NavService from '@joplin/lib/services/NavService';
import SearchEngine from '@joplin/lib/services/searchengine/SearchEngine';
import SearchEngine from '@joplin/lib/services/search/SearchEngine';
import checkPermissions from '../../../utils/checkPermissions';
import setIgnoreTlsErrors from '../../../utils/TlsUtils';
import { reg } from '@joplin/lib/registry';

View File

@ -10,8 +10,8 @@ const { NoteItem } = require('../note-item.js');
const { BaseScreenComponent } = require('../base-screen');
const { themeStyle } = require('../global-style.js');
const DialogBox = require('react-native-dialogbox').default;
import SearchEngineUtils from '@joplin/lib/services/searchengine/SearchEngineUtils';
import SearchEngine from '@joplin/lib/services/searchengine/SearchEngine';
import SearchEngineUtils from '@joplin/lib/services/search/SearchEngineUtils';
import SearchEngine from '@joplin/lib/services/search/SearchEngine';
import { AppState } from '../../utils/types';
import { NoteEntity } from '@joplin/lib/services/database/types';

View File

@ -75,7 +75,7 @@ import { reg } from '@joplin/lib/registry';
const { defaultState } = require('@joplin/lib/reducer');
const { FileApiDriverLocal } = require('@joplin/lib/file-api-driver-local');
import ResourceFetcher from '@joplin/lib/services/ResourceFetcher';
import SearchEngine from '@joplin/lib/services/searchengine/SearchEngine';
import SearchEngine from '@joplin/lib/services/search/SearchEngine';
import WelcomeUtils from '@joplin/lib/WelcomeUtils';
const { themeStyle } = require('./components/global-style.js');
import SyncTargetRegistry from '@joplin/lib/SyncTargetRegistry';

View File

@ -38,8 +38,8 @@ const SyncTargetDropbox = require('./SyncTargetDropbox.js');
const SyncTargetAmazonS3 = require('./SyncTargetAmazonS3.js');
import EncryptionService from './services/e2ee/EncryptionService';
import ResourceFetcher from './services/ResourceFetcher';
import SearchEngineUtils from './services/searchengine/SearchEngineUtils';
import SearchEngine, { ProcessResultsRow } from './services/searchengine/SearchEngine';
import SearchEngineUtils from './services/search/SearchEngineUtils';
import SearchEngine, { ProcessResultsRow } from './services/search/SearchEngine';
import RevisionService from './services/RevisionService';
import ResourceService from './services/ResourceService';
import DecryptionWorker from './services/DecryptionWorker';

View File

@ -1,4 +1,4 @@
const SearchEngine = require('../services/searchengine/SearchEngine').default;
const SearchEngine = require('../services/search/SearchEngine').default;
const script = {};

View File

@ -1,4 +1,4 @@
const SearchEngine = require('../services/searchengine/SearchEngine').default;
const SearchEngine = require('../services/search/SearchEngine').default;
const script = {};

View File

@ -1,5 +1,5 @@
import { revisionService, setupDatabaseAndSynchronizer, db, switchClient, msleep } from '../testing/test-utils';
import SearchEngine from '../services/searchengine/SearchEngine';
import SearchEngine from '../services/search/SearchEngine';
import ResourceService from '../services/ResourceService';
import ItemChangeUtils from '../services/ItemChangeUtils';
import Note from '../models/Note';

View File

@ -9,7 +9,7 @@ import { ProfileConfig } from './services/profileConfig/types';
import * as ArrayUtils from './ArrayUtils';
import { FolderEntity } from './services/database/types';
import { getListRendererIds } from './services/noteList/renderers';
import { ProcessResultsRow } from './services/searchengine/SearchEngine';
import { ProcessResultsRow } from './services/search/SearchEngine';
const fastDeepEqual = require('fast-deep-equal');
const { ALL_NOTES_FILTER_ID } = require('./reserved-ids');
const { createSelectorCreator, defaultMemoize } = require('reselect');

View File

@ -6,7 +6,7 @@ import { resourceService, decryptionWorker, supportDir, encryptionService, loadE
import Folder from '../models/Folder';
import Note from '../models/Note';
import Resource from '../models/Resource';
import SearchEngine from '../services/searchengine/SearchEngine';
import SearchEngine from './search/SearchEngine';
import { loadMasterKeysFromSettings, setupAndEnableEncryption } from './e2ee/utils';
describe('services/ResourceService', () => {

View File

@ -6,7 +6,7 @@ import shim from '../shim';
import ItemChange from '../models/ItemChange';
import Note from '../models/Note';
import Resource from '../models/Resource';
import SearchEngine from './searchengine/SearchEngine';
import SearchEngine from './search/SearchEngine';
import ItemChangeUtils from './ItemChangeUtils';
import time from '../time';
const { sprintf } = require('sprintf-js');

View File

@ -9,7 +9,7 @@ import Note from '../../models/Note';
import Tag from '../../models/Tag';
import NoteTag from '../../models/NoteTag';
import ResourceService from '../../services/ResourceService';
import SearchEngine from '../../services/searchengine/SearchEngine';
import SearchEngine from '../search/SearchEngine';
const { MarkupToHtml } = require('@joplin/renderer');
import { ResourceEntity } from '../database/types';

View File

@ -6,7 +6,7 @@ import requestFields from '../utils/requestFields';
import collectionToPaginatedResults from '../utils/collectionToPaginatedResults';
import BaseItem from '../../../models/BaseItem';
import { NoteEntity } from '../../database/types';
import SearchEngineUtils, { NotesForQueryOptions } from '../../searchengine/SearchEngineUtils';
import SearchEngineUtils, { NotesForQueryOptions } from '../../search/SearchEngineUtils';
export default async function(request: Request) {
if (request.method !== 'GET') throw new ErrorMethodNotAllowed();

View File

@ -1,5 +1,5 @@
import { setupDatabaseAndSynchronizer, db, sleep, switchClient, msleep } from '../../testing/test-utils';
import SearchEngine from '../../services/searchengine/SearchEngine';
import SearchEngine from './SearchEngine';
import Note from '../../models/Note';
import Folder from '../../models/Folder';
import ItemChange from '../../models/ItemChange';

View File

@ -1,7 +1,7 @@
import { setupDatabaseAndSynchronizer, db, switchClient } from '../../testing/test-utils.js';
import SearchEngine from '../../services/searchengine/SearchEngine';
import SearchEngineUtils from '../../services/searchengine/SearchEngineUtils';
import Setting from '../../models/Setting';
import SearchEngine from './SearchEngine.js';
import SearchEngineUtils from './SearchEngineUtils.js';
import Setting from '../../models/Setting.js';
const Note = require('../../models/Note').default;

View File

@ -1,14 +1,14 @@
/* @typescript-eslint/prefer-const */
import time from '../../time';
import { setupDatabaseAndSynchronizer, supportDir, db, createNTestNotes, switchClient } from '../../testing//test-utils';
import SearchEngine from '../../services/searchengine/SearchEngine';
import { setupDatabaseAndSynchronizer, supportDir, db, createNTestNotes, switchClient } from '../../testing/test-utils';
import SearchEngine from './SearchEngine';
import Note from '../../models/Note';
import Folder from '../../models/Folder';
import Tag from '../../models/Tag';
import shim from '../../shim';
import ResourceService from '../../services/ResourceService';
import { NoteEntity } from '../../services/database/types';
import ResourceService from '../ResourceService';
import { NoteEntity } from '../database/types';
let engine: any = null;

View File

@ -1,6 +1,6 @@
import gotoAnythingStyleQuery from './gotoAnythingStyleQuery';
describe('searchengine/gotoAnythingStyleQuery', () => {
describe('search/gotoAnythingStyleQuery', () => {
it('should prepare queries', () => {
const testCases: [string, string][] = [

View File

@ -16,7 +16,7 @@ The overall architecture for each application is as such:
- Back end: This is shared by all applications. It is made of:
- Services: Provide high-level functionalities, such as the [search engine](https://github.com/laurent22/joplin/tree/dev/packages/lib/services/searchengine), [plugin system](https://github.com/laurent22/joplin/tree/dev/packages/lib/services/plugins) or [synchroniser](https://github.com/laurent22/joplin/blob/dev/packages/lib/Synchronizer.ts).
- Services: Provide high-level functionalities, such as the [search engine](https://github.com/laurent22/joplin/tree/dev/packages/lib/services/search), [plugin system](https://github.com/laurent22/joplin/tree/dev/packages/lib/services/plugins) or [synchroniser](https://github.com/laurent22/joplin/blob/dev/packages/lib/Synchronizer.ts).
- Models: The model layer sits between the services and database. They provide a higher level abstraction than SQL and utility functions to easily save data, such as notes, notebooks, etc.