Skip to content

Commit c558d19

Browse files
committed
edit: README fixes
1 parent 52e1d96 commit c558d19

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG
22

3+
- v0.1.2
4+
- 📓 Updated docs to properly reflect key names. Prior versions of this
5+
README were not up to date with the current functionality. Package
6+
functionality remains the same. Current and more accurate
7+
documentation can be generated by running `yarn doc && serve docs/`.
8+
39
- v0.1.1
410
- ❌ Breaking change!
511
`buildAQL()`'s `limit` parameter no longer accepts key

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ interface](./img/searchbar_demo.png)
2323
- [contributing](#contributing)
2424

2525
## Patch Notes
26+
- v0.1.2
27+
- 📓 Updated docs to properly reflect key names. Prior versions of this
28+
README were not up to date with the current functionality. Package
29+
functionality remains the same. Current and more accurate
30+
documentation can be generated by running `yarn doc && serve docs/`.
2631

2732
- v0.1.1
2833
- ❌ Breaking change!
@@ -168,7 +173,7 @@ const queryObject = {
168173
"analyzer": "analyzer_name",
169174
"keys": ["text"]
170175
}],
171-
"query": "+'query string' -for +parseQuery ?to parse"
176+
"terms": "+'query string' -for +parseQuery ?to parse"
172177
}
173178

174179
const limit = {start:0, count: 20}
@@ -208,8 +213,8 @@ indexed by the analyzer. If a collection is indexed by multiple analyzers
208213
please list each collection-analyzer combination along with their relevant
209214
keys, unless a unified set of keys is provided to `query.key`.
210215

211-
**query** (required): either an array of `term` interfaces or a query string
212-
to be parsed by `parseQuery`.
216+
**terms** (required): either an array of `term` interfaces or a query string
217+
to be parsed by `parseQuery()`.
213218
- **term** (optional): a JSON object representing the search.
214219
- **val** *string* (required): a search term or phrase. For PHRASE
215220
searches, include one "quoted phrase" per val. For TOKENS you may combine
@@ -265,8 +270,8 @@ and the next page would be
265270
"keys": ["texto", "resumen", "notas"]
266271
}
267272
],
268-
"query": "either a +query ?\"string for parseQuery to parse\" texto en español",
269-
"query": [
273+
"terms": "either a +query ?\"string for parseQuery to parse\" texto en español",
274+
"terms": [
270275
{"type": "phr", "op": "?", "val": "\"!!! OR a list of query objects\""},
271276
{"type": "phr", "op": "?", "val": "optional phrases"},
272277
{"type": "tok", "op": "-", "val": "excluded tokens"},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hp4k1h5/aqlquerybuilder.js",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"license": "MIT",
55
"main": "built/index.js",
66
"types": "built/index.d.ts",

src/lib/structs.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ export interface query {
3131
* include in the query must be listed as a collection of the following shape.
3232
*
3333
* A collection can be referenced by several analyzers and each must have its
34-
* own entry in `query.collections` in order to be included in the search.
35-
* Also, if query.key
34+
* own entry in `query.collections` in order to be included in the search. If
35+
* a collection does not have a `keys` key, the search will be performed
36+
* across ALL keys listed in `query.key`.
3637
*
3738
* Alternatively, a document can be stored in several collections.
3839
*
@@ -62,6 +63,8 @@ export interface collection {
6263
* **types** | PHRASE | ✅ | ✅ | ✅ |
6364
* | TOKENS | ✅ | ✅ | ✅ |
6465
* | PROXIM | TODO | TODO| TODO |
66+
* | NGRAM | TODO | TODO| TODO |
67+
* | LEVENS | TODO | TODO| TODO |
6568
* ```
6669
* */
6770
export interface term {

0 commit comments

Comments
 (0)