firestore-meilisearch 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{functions/.eslintignore → .eslintignore} +0 -0
- package/{functions/.eslintrc.js → .eslintrc.js} +0 -0
- package/{functions/__tests__ → __tests__}/__mocks__/console.ts +0 -0
- package/{functions/__tests__ → __tests__}/adapter.test.ts +0 -0
- package/{functions/__tests__ → __tests__}/config.test.ts +0 -0
- package/{functions/__tests__ → __tests__}/data/document.ts +0 -0
- package/{functions/__tests__ → __tests__}/data/environment.ts +0 -0
- package/{functions/__tests__ → __tests__}/functions.test.ts +0 -0
- package/{functions/__tests__ → __tests__}/jest.setup.ts +0 -0
- package/{functions/__tests__ → __tests__}/test.types.d.ts +0 -0
- package/{functions/__tests__ → __tests__}/tsconfig.json +0 -0
- package/{functions/__tests__ → __tests__}/util.test.ts +0 -0
- package/{functions/jest.config.js → jest.config.js} +0 -0
- package/{functions/lib → lib}/adapter.js +0 -0
- package/{functions/lib → lib}/config.js +0 -0
- package/{functions/lib → lib}/import/config.js +0 -0
- package/{functions/lib → lib}/import/index.js +0 -0
- package/{functions/lib → lib}/index.js +0 -0
- package/{functions/lib → lib}/logs.js +0 -0
- package/{functions/lib → lib}/meilisearch/create-index.js +0 -0
- package/{functions/lib → lib}/meilisearch-index.js +0 -0
- package/{functions/lib → lib}/types.js +0 -0
- package/{functions/lib → lib}/util.js +0 -0
- package/{functions/lib → lib}/version.js +1 -1
- package/package.json +48 -17
- package/{functions/src → src}/adapter.ts +0 -0
- package/{functions/src → src}/config.ts +0 -0
- package/{functions/src → src}/import/config.ts +0 -0
- package/{functions/src → src}/import/index.ts +0 -0
- package/{functions/src → src}/index.ts +0 -0
- package/{functions/src → src}/logs.ts +0 -0
- package/{functions/src → src}/meilisearch/create-index.ts +0 -0
- package/{functions/src → src}/types.ts +0 -0
- package/{functions/src → src}/util.ts +0 -0
- package/src/version.ts +1 -0
- package/{functions/tsconfig.eslint.json → tsconfig.eslint.json} +0 -0
- package/{functions/tsconfig.json → tsconfig.json} +0 -0
- package/.editorconfig +0 -20
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -26
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -18
- package/.github/ISSUE_TEMPLATE/other.md +0 -7
- package/.github/dependatbot.yml +0 -23
- package/.github/release-draft-template.yml +0 -33
- package/.github/scripts/check-release.sh +0 -42
- package/.github/workflows/publish.yml +0 -30
- package/.github/workflows/release-drafter.yml +0 -16
- package/.github/workflows/test.yml +0 -42
- package/CHANGELOG.md +0 -7
- package/CONTRIBUTING.md +0 -236
- package/LICENSE +0 -201
- package/POSTINSTALL.md +0 -40
- package/PREINSTALL.md +0 -42
- package/README.md +0 -128
- package/bors.toml +0 -8
- package/dataset/firebase-export-metadata.json +0 -8
- package/dataset/firestore_export/all_namespaces/all_kinds/all_namespaces_all_kinds.export_metadata +0 -0
- package/dataset/firestore_export/all_namespaces/all_kinds/output-0 +0 -0
- package/dataset/firestore_export/firestore_export.overall_export_metadata +0 -0
- package/extension.yaml +0 -176
- package/firebase.json +0 -20
- package/functions/package.json +0 -53
- package/functions/src/version.ts +0 -1
- package/functions/yarn.lock +0 -5287
- package/guides/IMPORT_EXISTING_DOCUMENTS.md +0 -74
- package/script/version.sh +0 -51
- package/test-params-example.env +0 -9
package/CONTRIBUTING.md
DELETED
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
# Contributing
|
|
2
|
-
|
|
3
|
-
First of all, thank you for contributing to Meilisearch! The goal of this document is to provide everything you need to know in order to contribute to Meilisearch and its different integrations.
|
|
4
|
-
|
|
5
|
-
<!-- MarkdownTOC autolink="true" style="ordered" indent=" " -->
|
|
6
|
-
|
|
7
|
-
- [Assumptions](#assumptions)
|
|
8
|
-
- [How to Contribute](#how-to-contribute)
|
|
9
|
-
- [Development Workflow](#development-workflow)
|
|
10
|
-
- [Git Guidelines](#git-guidelines)
|
|
11
|
-
- [Release Process (for internal team only)](#release-process-for-internal-team-only)
|
|
12
|
-
|
|
13
|
-
<!-- /MarkdownTOC -->
|
|
14
|
-
|
|
15
|
-
## Assumptions
|
|
16
|
-
|
|
17
|
-
1. **You're familiar with [GitHub](https://github.com) and the [Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) (PR) workflow.**
|
|
18
|
-
2. **You've read the Meilisearch [documentation](https://docs.meilisearch.com) and the [README](/README.md).**
|
|
19
|
-
3. **You know about the [Meilisearch community](https://docs.meilisearch.com/learn/what_is_meilisearch/contact.html). Please use this for help.**
|
|
20
|
-
|
|
21
|
-
## How to Contribute
|
|
22
|
-
|
|
23
|
-
1. Make sure that the contribution you want to make is explained or detailed in a GitHub issue! Find an [existing issue](https://github.com/meilisearch/meilisearch-js/issues/) or [open a new one](https://github.com/meilisearch/meilisearch-js/issues/new).
|
|
24
|
-
2. Once done, [fork the firestore-meilisearch repository](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) in your own GitHub account. Ask a maintainer if you want your issue to be checked before making a PR.
|
|
25
|
-
3. [Create a new Git branch](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository).
|
|
26
|
-
4. Review the [Development Workflow](#development-workflow) section that describes the steps to maintain the repository.
|
|
27
|
-
5. Make the changes on your branch.
|
|
28
|
-
6. [Submit the branch as a PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) pointing to the `main` branch of the main meilisearch-js repository. A maintainer should comment and/or review your Pull Request within a few days. Although depending on the circumstances, it may take longer.<br>
|
|
29
|
-
We do not enforce a naming convention for the PRs, but **please use something descriptive of your changes**, having in mind that the title of your PR will be automatically added to the next [release changelog](https://github.com/meilisearch/meilisearch-js/releases/).
|
|
30
|
-
7. You will need to build the project with `yarn build` before pushing files.
|
|
31
|
-
8. Don't forget to add `js` files from the `./lib/` directory to your PR.
|
|
32
|
-
|
|
33
|
-
## Development Workflow
|
|
34
|
-
|
|
35
|
-
### Requirements <!-- omit in toc -->
|
|
36
|
-
|
|
37
|
-
To run this project, you will need:
|
|
38
|
-
|
|
39
|
-
- Node >= 14 && node <= 17
|
|
40
|
-
- Npm >= v7
|
|
41
|
-
- A google account
|
|
42
|
-
- Latest version of `firebase-tools` the Firebase CLI:
|
|
43
|
-
``` bash
|
|
44
|
-
yarn global add firebase-tools
|
|
45
|
-
```
|
|
46
|
-
Add the directory for the commands of the packages installed globally in yarn, to access of firebase binary:
|
|
47
|
-
``` bash
|
|
48
|
-
export PATH="$(yarn global bin):$PATH"
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Setup <!-- omit in toc -->
|
|
52
|
-
|
|
53
|
-
Sign in with your Google Account:
|
|
54
|
-
``` bash
|
|
55
|
-
firebase login
|
|
56
|
-
```
|
|
57
|
-
Enable the extension developer commands:
|
|
58
|
-
``` bash
|
|
59
|
-
firebase --open-sesame extdev
|
|
60
|
-
```
|
|
61
|
-
Install dependencies:
|
|
62
|
-
``` bash
|
|
63
|
-
yarn install:functions
|
|
64
|
-
```
|
|
65
|
-
Build the project:
|
|
66
|
-
``` bash
|
|
67
|
-
yarn build
|
|
68
|
-
```
|
|
69
|
-
Launch Meilisearch instance:
|
|
70
|
-
``` bash
|
|
71
|
-
curl -L https://install.meilisearch.com | sh # download Meilisearch
|
|
72
|
-
./meilisearch --master-key=masterKey --no-analytics # run Meilisearch
|
|
73
|
-
```
|
|
74
|
-
You may need to [install Java](https://www.java.com/en/download/help/download_options.html) to run the emulator.</br>
|
|
75
|
-
Set emulator:
|
|
76
|
-
```bash
|
|
77
|
-
firebase init emulators
|
|
78
|
-
```
|
|
79
|
-
Launch emulator:
|
|
80
|
-
``` bash
|
|
81
|
-
firebase ext:dev:emulators:start --test-params=test-params-example.env --import=dataset --project=name-of-the-project
|
|
82
|
-
```
|
|
83
|
-
or just
|
|
84
|
-
``` bash
|
|
85
|
-
yarn emulator
|
|
86
|
-
```
|
|
87
|
-
The emulator runs with environment parameters found in `test-params-example.env` and with a provided dataset found in `/dataset`.
|
|
88
|
-
|
|
89
|
-
Once it is running, open the emulator in a browser at the following address: http://localhost:4000
|
|
90
|
-
|
|
91
|
-
NB: If you want to change your Meilisearch credentials or the plugins options you need to edit the `test-params-example.env` file.
|
|
92
|
-
|
|
93
|
-
### Tests and Linter <!-- omit in toc -->
|
|
94
|
-
|
|
95
|
-
Each PR should pass the tests and the linter to be accepted.
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
curl -L https://install.meilisearch.com | sh # download Meilisearch
|
|
99
|
-
./meilisearch --master-key=masterKey --no-analytics # run Meilisearch
|
|
100
|
-
|
|
101
|
-
# Tests
|
|
102
|
-
yarn test
|
|
103
|
-
|
|
104
|
-
# Tests in watch mode
|
|
105
|
-
yarn test:watch
|
|
106
|
-
|
|
107
|
-
# Linter
|
|
108
|
-
yarn lint
|
|
109
|
-
|
|
110
|
-
# Linter with fixing
|
|
111
|
-
yarn lint:fix
|
|
112
|
-
|
|
113
|
-
# Build the project
|
|
114
|
-
yarn build
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### Run the backfilled-data script
|
|
118
|
-
|
|
119
|
-
- Set up credentials. The import script uses the application's default credentials to communicate with Firebase. Please follow the instructions [generate a private key file for your service account](https://firebase.google.com/docs/admin/setup#initialize-sdk).
|
|
120
|
-
|
|
121
|
-
- Run the import script interactively and run ONE of the following commands:
|
|
122
|
-
- Run interactively:
|
|
123
|
-
```bash
|
|
124
|
-
yarn run-cli
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
- Or run non-interactively with paramaters:
|
|
128
|
-
```bash
|
|
129
|
-
yarn run-cli \
|
|
130
|
-
--project <project_id> \
|
|
131
|
-
--source-collection-path <collection_name> \
|
|
132
|
-
--index <index_uid> \
|
|
133
|
-
--batch-size <100/default=300> \
|
|
134
|
-
--host <host_address> \
|
|
135
|
-
--api-key <api_key> \
|
|
136
|
-
--non-interactive
|
|
137
|
-
```
|
|
138
|
-
**Note**: The `--batch-size` and `--query-collection-group` arguments are optional. To see its usage, run the above command with `--help`.
|
|
139
|
-
|
|
140
|
-
- Run the project for development:
|
|
141
|
-
Launch Meilisearch instance:
|
|
142
|
-
``` bash
|
|
143
|
-
curl -L https://install.meilisearch.com | sh # download Meilisearch
|
|
144
|
-
./meilisearch --master-key=masterKey --no-analytics # run Meilisearch
|
|
145
|
-
```
|
|
146
|
-
Launch the watcher on the project:
|
|
147
|
-
``` bash
|
|
148
|
-
yarn watch
|
|
149
|
-
```
|
|
150
|
-
Launch the watcher on the script. You have to modify the informations of the playground script by your own parameters inside the `package.json` file:
|
|
151
|
-
``` bash
|
|
152
|
-
yarn playground
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
### Generate the README
|
|
156
|
-
|
|
157
|
-
The Firebase CLI offers the possibility of automatically generating the `README.md` file with the following command:
|
|
158
|
-
```bash
|
|
159
|
-
firebase ext:info ./path/to/extension --markdown > README.md
|
|
160
|
-
```
|
|
161
|
-
**Note:** Be careful this will only regenerate the text of the central part of the `README.md` from the Title: `Search in your Firestore content with Meilisearch` to the `**Cloud Functions:**` section.
|
|
162
|
-
|
|
163
|
-
## Git Guidelines
|
|
164
|
-
|
|
165
|
-
### Git Branches <!-- omit in toc -->
|
|
166
|
-
|
|
167
|
-
All changes must be made in a branch and submitted as PR.
|
|
168
|
-
We do not enforce any branch naming style, but please use something descriptive of your changes.
|
|
169
|
-
|
|
170
|
-
### Git Commits <!-- omit in toc -->
|
|
171
|
-
|
|
172
|
-
As minimal requirements, your commit message should:
|
|
173
|
-
- be capitalized
|
|
174
|
-
- not finish by a dot or any other punctuation character (!,?)
|
|
175
|
-
- start with a verb so that we can read your commit message this way: "This commit will ...", where "..." is the commit message.
|
|
176
|
-
e.g.: "Fix the home page button" or "Add more tests for create_index method"
|
|
177
|
-
|
|
178
|
-
We don't follow any other convention, but if you want to use one, we recommend [this one](https://chris.beams.io/posts/git-commit/).
|
|
179
|
-
|
|
180
|
-
### GitHub Pull Requests <!-- omit in toc -->
|
|
181
|
-
|
|
182
|
-
Some notes on GitHub PRs:
|
|
183
|
-
|
|
184
|
-
- [Convert your PR as a draft](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/changing-the-stage-of-a-pull-request) if your changes are a work in progress: no one will review it until you pass your PR as ready for review.<br>
|
|
185
|
-
The draft PR can be very useful if you want to show that you are working on something and make your work visible.
|
|
186
|
-
- The branch related to the PR must be **up-to-date with `main`** before merging. Fortunately, this project [integrates a bot](https://github.com/meilisearch/integration-guides/blob/main/resources/bors.md) to automatically enforce this requirement without the PR author having to do it manually.
|
|
187
|
-
- All PRs must be reviewed and approved by at least one maintainer.
|
|
188
|
-
- The PR title should be accurate and descriptive of the changes. The title of the PR will be indeed automatically added to the next [release changelogs](https://github.com/meilisearch/meilisearch-js/releases/).
|
|
189
|
-
|
|
190
|
-
## Release Process (for internal team only)
|
|
191
|
-
|
|
192
|
-
Meilisearch tools follow the [Semantic Versioning Convention](https://semver.org/).
|
|
193
|
-
|
|
194
|
-
### Automation to Rebase and Merge the PRs <!-- omit in toc -->
|
|
195
|
-
|
|
196
|
-
This project integrates a bot that helps us manage pull requests merging.<br>
|
|
197
|
-
_[Read more about this](https://github.com/meilisearch/integration-guides/blob/main/resources/bors.md)._
|
|
198
|
-
|
|
199
|
-
### Automated Changelogs <!-- omit in toc -->
|
|
200
|
-
|
|
201
|
-
This project integrates a tool to create automated changelogs.<br>
|
|
202
|
-
_[Read more about this](https://github.com/meilisearch/integration-guides/blob/main/resources/release-drafter.md)._
|
|
203
|
-
|
|
204
|
-
### How to Publish the Release <!-- omit in toc -->
|
|
205
|
-
|
|
206
|
-
⚠️ Before doing anything, make sure you got through the guide about [Releasing an Integration](https://github.com/meilisearch/integration-guides/blob/main/resources/integration-release.md).
|
|
207
|
-
|
|
208
|
-
1. To update the version package in all needed files you can run the `version.sh` script with the version number in argument: `"X.X.X"`. If you want to modify it by hand you have to update the version in the following files:
|
|
209
|
-
- [`package.json`](/package.json).
|
|
210
|
-
- [`package.json`](/functions/packag e.json) in the functions directory.
|
|
211
|
-
- [`extension.yaml`](/extension.yaml).
|
|
212
|
-
- [`version.ts`](/functions/src/version.ts).
|
|
213
|
-
|
|
214
|
-
After which don't forget to rebuild the project.
|
|
215
|
-
</br>
|
|
216
|
-
The `version.sh` script will `add` and `commit` the modification but you till need to verify it and push it.
|
|
217
|
-
```bash
|
|
218
|
-
sh script/version.sh X.X.X
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
2. Test the extension by installing it in Firestore:
|
|
222
|
-
```bash
|
|
223
|
-
firebase ext:install . --project=[your_project_id]
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
3. Publish the extension by running the following command in the root of the extension directory:
|
|
227
|
-
```bash
|
|
228
|
-
firebase ext:dev:publish meilisearch/firestore-meilisearch
|
|
229
|
-
```
|
|
230
|
-
**Note**: `meilisearch` is the `publisher id` for this extension.
|
|
231
|
-
|
|
232
|
-
Once the changes are merged on `main`, you can publish the current draft release via the [GitHub interface](https://github.com/meilisearch/meilisearch-go/releases): on this page, click on `Edit` (related to the draft release) > update the description (be sure you apply [these recommandations](https://github.com/meilisearch/integration-guides/blob/main/resources/integration-release.md#writting-the-release-description)) > when you are ready, click on `Publish release`.
|
|
233
|
-
|
|
234
|
-
<hr>
|
|
235
|
-
|
|
236
|
-
Thank you again for reading this through, we can not wait to begin to work with you if you made your way through this contributing guide ❤️
|
package/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright [yyyy] [name of copyright owner]
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|
package/POSTINSTALL.md
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
### See it in action
|
|
2
|
-
|
|
3
|
-
You can test out this extension right away!
|
|
4
|
-
|
|
5
|
-
1. Go to your [Cloud Firestore dashboard](https://console.firebase.google.com/project/${param:PROJECT_ID}/firestore/data) in the Firebase console
|
|
6
|
-
|
|
7
|
-
2. If it doesn't already exist, create the collection you specified during installation: `${param:COLLECTION_PATH}`
|
|
8
|
-
|
|
9
|
-
3. Create, update, or delete a document in the collection called `${param:COLLECTION_PATH}` that contains any fields with any values that you'd like.
|
|
10
|
-
|
|
11
|
-
4. You can check the status of tasks in your Meilisearch instance using the following query:
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
curl \
|
|
15
|
-
-X GET '`${param:MEILISEARCH_HOST}`/tasks'
|
|
16
|
-
```
|
|
17
|
-
You can read more on [tasks](https://docs.meilisearch.com/reference/api/tasks.html#tasks) in the documentation.
|
|
18
|
-
|
|
19
|
-
### Using the extension
|
|
20
|
-
|
|
21
|
-
Whenever a document is created, updated, or deleted in the specified collection `${param:COLLECTION_PATH}`, this extension sends that update to your Meilisearch instance.
|
|
22
|
-
|
|
23
|
-
This extension:
|
|
24
|
-
- Indexes a document in Meilisearch and sends all the fields or configured fields defined in the extension
|
|
25
|
-
- Updates a document in your Meilisearch index
|
|
26
|
-
- Deletes a document from your Meilisearch index
|
|
27
|
-
|
|
28
|
-
### _(Optional)_ Import existing documents
|
|
29
|
-
|
|
30
|
-
This extension does not export your existing document dataset in Meilisearch. It will only export the documents that have been modified or created after installation. To populate your Meilisearch database with all the documents in your Firestore collection, you need to run the import script provided by this extension.
|
|
31
|
-
|
|
32
|
-
The import script reads all existing documents in a Cloud Firestore collection or group collection and indexes them into Meilisearch.
|
|
33
|
-
|
|
34
|
-
**Important:** Run the import script over the entire collection _after_ installing this extension; otherwise, you may lose the current writes in your database during the import.
|
|
35
|
-
|
|
36
|
-
Learn more about using the import script to [backfill your existing collection](https://github.com/meilisearch/firestore-meilisearch/blob/main/guides/IMPORT_EXISTING_DOCUMENTS.md).
|
|
37
|
-
|
|
38
|
-
### Monitoring
|
|
39
|
-
|
|
40
|
-
As a best practice, you can [monitor the activity](https://firebase.google.com/docs/extensions/manage-installed-extensions#monitor) of your installed extension, including checks on its health, usage, and logs.
|
package/PREINSTALL.md
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
Use this extension to synchronize documents from a Cloud Firestore collection to a Meilisearch index. This allows you to use full-text search in your Cloud Firestore documents.
|
|
2
|
-
|
|
3
|
-
This extension listens to each creation, update, or deletion of your documents to keep them in sync with your Meilisearch index. This ensures that the data in Meilisearch mirrors your content in Cloud Firestore. You can then run queries on this mirrored dataset.
|
|
4
|
-
|
|
5
|
-
Note that this extension only listens for changes to _documents_ in a specific collection, but not changes in any _subcollection_. However, you can install additional instances of this extension to listen to other collections in your Firestore database.
|
|
6
|
-
|
|
7
|
-
#### Additional setup
|
|
8
|
-
|
|
9
|
-
Before installing this extension, you'll need to:
|
|
10
|
-
|
|
11
|
-
- [Set up Cloud Firestore in your Firebase project](https://firebase.google.com/docs/firestore/quickstart)
|
|
12
|
-
- Run a Meilisearch instance. There are many easy ways [to download and run a Meilisearch instance](https://docs.meilisearch.com/learn/getting_started/installation.html#download-and-launch)
|
|
13
|
-
|
|
14
|
-
#### Data import format
|
|
15
|
-
|
|
16
|
-
Documents indexed in Meilisearch must have a [unique id](https://docs.meilisearch.com/learn/core_concepts/documents.html#primary-field). The extension will use Firestone's default field: `Document ID` for this purpose. `Document ID` will be renamed to`_firestore_id` to be used as the [document id](https://docs.meilisearch.com/learn/core_concepts/documents.html#document-id). If your documents have another field containing the string `id`, it will not be set as the primary key.
|
|
17
|
-
|
|
18
|
-
**Important:** If your documents contain a field called `_firestore_id`, it will be ignored.
|
|
19
|
-
|
|
20
|
-
[Geosearch](https://docs.meilisearch.com/reference/features/geosearch.html#geosearch) has a specific format in Meilisearch, your documents must have a valid `_geo` field with an object composed of `lat` and `lng`. If a `GeoPoint` from Firestore with the name `_geo` is found, the field `latitude` is renamed to `lat` and `longitude` to `lng`.
|
|
21
|
-
If a `GeoPoint` is found without the name `_geo`, it is added as an array.
|
|
22
|
-
|
|
23
|
-
#### Backfill your Meilisearch data
|
|
24
|
-
|
|
25
|
-
This extension does not export all existing documents into Meilisearch unless they have been modified or created after its installation. You can run the [import script](https://github.com/meilisearch/firestore-meilisearch/) provided by this extension to retrieve your Meilisearch dataset with all the documents present in your Firestore collection
|
|
26
|
-
|
|
27
|
-
#### Billing
|
|
28
|
-
|
|
29
|
-
To install an extension, your project must be on the [Blaze (pay as you go) plan](https://firebase.google.com/pricing)
|
|
30
|
-
|
|
31
|
-
* You will be charged a small amount (typically around $0.01/month) for the Firebase resources required by this extension, even if it is not used.
|
|
32
|
-
* This extension uses other Firebase or Google Cloud services which may have
|
|
33
|
-
associated charges if you exceed the service’s free tier:
|
|
34
|
-
* Cloud Firestore
|
|
35
|
-
* Cloud Functions (Node.js 10+ runtime. [See FAQs](https://firebase.google.com/support/faq#extensions-pricing))
|
|
36
|
-
|
|
37
|
-
When you use Firebase extensions, you're only charged for the underlying
|
|
38
|
-
resources that you use. A paid-tier billing plan is only required if the
|
|
39
|
-
extension uses a service that requires a paid-tier plan, for example calling
|
|
40
|
-
a Google Cloud API or making outbound network requests to non-Google services.
|
|
41
|
-
All Firebase services offer a free tier of usage.
|
|
42
|
-
[Learn more about Firebase billing.](https://firebase.google.com/pricing)
|
package/README.md
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
<h1 align="center">firestore-meilisearch</h1>
|
|
2
|
-
|
|
3
|
-
<p align="center">
|
|
4
|
-
<img src="https://raw.githubusercontent.com/meilisearch/integration-guides/main/assets/logos/meilisearch_firebase.svg" alt="Meilisearch-Firestore" width="200" height="200" />
|
|
5
|
-
</p>
|
|
6
|
-
|
|
7
|
-
<h1 align="center">Meilisearch Firestore</h1>
|
|
8
|
-
|
|
9
|
-
<h4 align="center">
|
|
10
|
-
<a href="https://github.com/meilisearch/meilisearch">Meilisearch</a> |
|
|
11
|
-
<a href="https://docs.meilisearch.com">Documentation</a> |
|
|
12
|
-
<a href="https://slack.meilisearch.com">Slack</a> |
|
|
13
|
-
<a href="https://roadmap.meilisearch.com/tabs/1-under-consideration">Roadmap</a> |
|
|
14
|
-
<a href="https://www.meilisearch.com">Website</a> |
|
|
15
|
-
<a href="https://docs.meilisearch.com/faq">FAQ</a>
|
|
16
|
-
</h4>
|
|
17
|
-
|
|
18
|
-
<p align="center">
|
|
19
|
-
<a href="https://github.com/meilisearch/firestore-meilisearch/actions"><img src="https://github.com/meilisearch/firestore-meilisearch/workflows/Tests/badge.svg" alt="Test"></a>
|
|
20
|
-
<a href="https://github.com/meilisearch/firestore-meilisearch/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-informational" alt="License"></a>
|
|
21
|
-
<a href="https://ms-bors.herokuapp.com/repositories/8"><img src="https://bors.tech/images/badge_small.svg" alt="Bors enabled"></a>
|
|
22
|
-
</p>
|
|
23
|
-
|
|
24
|
-
<p align="center">⚡ The Meilisearch API extension written for Firebase</p>
|
|
25
|
-
|
|
26
|
-
# Search in your Firestore content with Meilisearch
|
|
27
|
-
|
|
28
|
-
**Author**: Meilisearch (**[https://meilisearch.com](https://meilisearch.com)**)
|
|
29
|
-
|
|
30
|
-
**Description**: Full-text Search on Firebase with Meilisearch
|
|
31
|
-
|
|
32
|
-
**Details**: Use this extension to synchronize documents from a Cloud Firestore collection to a Meilisearch index. This allows you to use full-text search in your Cloud Firestore documents.
|
|
33
|
-
|
|
34
|
-
This extension listens to each creation, update, or deletion of your documents to keep them in sync with your Meilisearch index. This ensures that the data in Meilisearch mirrors your content in Cloud Firestore. You can then run queries on this mirrored dataset.
|
|
35
|
-
|
|
36
|
-
Note that this extension only listens for changes to _documents_ in a specific collection, but not changes in any _subcollection_. However, you can install additional instances of this extension to listen to other collections in your Firestore database.
|
|
37
|
-
|
|
38
|
-
#### Additional setup
|
|
39
|
-
|
|
40
|
-
Before installing this extension, you'll need to:
|
|
41
|
-
|
|
42
|
-
- [Set up Cloud Firestore in your Firebase project](https://firebase.google.com/docs/firestore/quickstart)
|
|
43
|
-
- Run a Meilisearch instance. There are many easy ways [to download and run a Meilisearch instance](https://docs.meilisearch.com/learn/getting_started/installation.html#download-and-launch)
|
|
44
|
-
|
|
45
|
-
#### Data import format
|
|
46
|
-
|
|
47
|
-
Documents indexed in Meilisearch must have a [unique id](https://docs.meilisearch.com/learn/core_concepts/documents.html#primary-field). The extension will use Firestone's default field: `Document ID` for this purpose. `Document ID` will be renamed to`_firestore_id` to be used as the [document id](https://docs.meilisearch.com/learn/core_concepts/documents.html#document-id). If your documents have another field containing the string `id`, it will not be set as the primary key.
|
|
48
|
-
|
|
49
|
-
**Important:** If your documents contain a field called `_firestore_id`, it will be ignored.
|
|
50
|
-
|
|
51
|
-
[Geosearch](https://docs.meilisearch.com/reference/features/geosearch.html#geosearch) has a specific format in Meilisearch, your documents must have a valid `_geo` field with an object composed of `lat` and `lng`. If a `GeoPoint` from Firestore with the name `_geo` is found, the field `latitude` is renamed to `lat` and `longitude` to `lng`.
|
|
52
|
-
If a `GeoPoint` is found without the name `_geo`, it is added as an array.
|
|
53
|
-
|
|
54
|
-
#### Backfill your Meilisearch data
|
|
55
|
-
|
|
56
|
-
This extension does not export all existing documents into Meilisearch unless they have been modified or created after its installation. You can run the [import script](https://github.com/meilisearch/firestore-meilisearch/) provided by this extension to retrieve your Meilisearch dataset with all the documents present in your Firestore collection
|
|
57
|
-
|
|
58
|
-
#### Billing
|
|
59
|
-
|
|
60
|
-
To install an extension, your project must be on the [Blaze (pay as you go) plan](https://firebase.google.com/pricing)
|
|
61
|
-
|
|
62
|
-
* You will be charged a small amount (typically around $0.01/month) for the Firebase resources required by this extension, even if it is not used.
|
|
63
|
-
* This extension uses other Firebase or Google Cloud services which may have
|
|
64
|
-
associated charges if you exceed the service’s free tier:
|
|
65
|
-
* Cloud Firestore
|
|
66
|
-
* Cloud Functions (Node.js 10+ runtime. [See FAQs](https://firebase.google.com/support/faq#extensions-pricing))
|
|
67
|
-
|
|
68
|
-
When you use Firebase extensions, you're only charged for the underlying
|
|
69
|
-
resources that you use. A paid-tier billing plan is only required if the
|
|
70
|
-
extension uses a service that requires a paid-tier plan, for example calling
|
|
71
|
-
a Google Cloud API or making outbound network requests to non-Google services.
|
|
72
|
-
All Firebase services offer a free tier of usage.
|
|
73
|
-
[Learn more about Firebase billing.](https://firebase.google.com/pricing)
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
**Configuration Parameters:**
|
|
79
|
-
|
|
80
|
-
* Cloud Functions location: Where do you want to deploy the functions created for this extension? If you need help selecting a location, refer to the [location selection guide](https://firebase.google.com/docs/functions/locations).
|
|
81
|
-
|
|
82
|
-
* Collection path: What is the path of the collection you would like to export into Meilisearch?
|
|
83
|
-
|
|
84
|
-
* Fields to index in Meilisearch: What fields do you want to index in Meilisearch? Create a comma-separated list of the field names, or leave it blank to include all fields. The id field is always indexed even when omitted from the list.
|
|
85
|
-
|
|
86
|
-
* Meilisearch Index Name: What Meilisearch index do you want to index your data in?
|
|
87
|
-
|
|
88
|
-
* Meilisearch host: What is the URL of the host of your Meilisearch database? Make sure your URL starts with `http://` or `https://`
|
|
89
|
-
|
|
90
|
-
* Meilisearch API key: What is your Meilisearch API key with permission to perform actions on indexes? Both the API keys and the master key are valid choices but we strongly recommend using an API key for security purposes. Check out our guide on [security](https://docs.meilisearch.com/learn/security/master_api_keys.html).
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
**Cloud Functions:**
|
|
95
|
-
|
|
96
|
-
* **indexingWorker:** Cloud function triggered by document modification in Firestore to import changes into Meilisearch.
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
## 🧩 Install this extension
|
|
101
|
-
|
|
102
|
-
### Console
|
|
103
|
-
|
|
104
|
-
[][install-link]
|
|
105
|
-
|
|
106
|
-
[install-link]: https://console.firebase.google.com/project/_/extensions/install?ref=publisher_id/extension_name
|
|
107
|
-
|
|
108
|
-
### Firebase CLI
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
firebase ext:install meilisearch/firestore-meilisearch --project=[your-project-id]
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
> Learn more about installing extensions in the Firebase Extensions documentation:
|
|
115
|
-
> [console](https://firebase.google.com/docs/extensions/install-extensions?platform=console),
|
|
116
|
-
> [CLI](https://firebase.google.com/docs/extensions/install-extensions?platform=cli)
|
|
117
|
-
|
|
118
|
-
---
|
|
119
|
-
|
|
120
|
-
## ⚙️ Development Workflow and Contributing
|
|
121
|
-
|
|
122
|
-
Any new contribution is more than welcome in this project!
|
|
123
|
-
|
|
124
|
-
If you want to know more about the development workflow or wish to contribute, please see our [contributing guidelines](/CONTRIBUTING.md) for detailed instructions!
|
|
125
|
-
|
|
126
|
-
<hr>
|
|
127
|
-
|
|
128
|
-
**Meilisearch** provides and maintains many **SDKs and Integration tools** like this one. We want to provide everyone with an **amazing search experience for any kind of project**. If you wish to contribute, make suggestions, or want to know what's going on right now, visit the [integration-guides](https://github.com/meilisearch/integration-guides) repository.
|