8000 ArangoSearch refactor (part 2) (#150) · arangodb/docs@2d550d9 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

Commit 2d550d9

Browse files
authored
ArangoSearch refactor (part 2) (#150)
* PHRASE() array syntax * apply to 3.6 * table alignment
1 parent fad9fb5 commit 2d550d9

File tree

6 files changed

+30
-4
lines changed

6 files changed

+30
-4
lines changed

3.5/aql/functions-arangosearch.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,19 @@ PHRASE(doc.text, "lorem", 0, "ipsum", "text_en")
384384
PHRASE(doc.text, "ipsum", -1, "lorem", "text_en")
385385
```
386386

387+
`PHRASE(path, [ phrasePart1, skipTokens1, ... phrasePartN, skipTokensN ], analyzer)`
388+
389+
The `PHRASE()` function also accepts an array as second argument with
390+
*phrasePart* and *skipTokens* parameters as elements. This syntax variation
391+
enables the usage of computed expressions:
392+
393+
```js
394+
LET proximityCondition = [ "foo", ROUND(RAND()*10), "bar" ]
395+
FOR doc IN viewName
396+
SEARCH PHRASE(doc.text, proximityCondition, "text_en")
397+
RETURN doc
398+
```
399+
387400
### STARTS_WITH()
388401

389402
`STARTS_WITH(path, prefix)`

3.5/arangosearch-analyzers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Available normalizations are case conversion and accent removal
9191
(conversion of characters with diacritical marks to the base characters).
9292

9393
Feature / Analyzer | Identity | N-gram | Delimiter | Stem | Norm | Text
94-
-------------------|----------|---------|-----------|------|------|-----
94+
:------------------|:---------|:--------|:----------|:-----|:-----|:----
9595
**Tokenization** | No | No | (Yes) | No | No | Yes
9696
**Stemming** | No | No | No | Yes | No | Yes
9797
**Normalization** | No | No | No | No | Yes | Yes

3.5/arangosearch-views.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ the documents that satisfy the search criteria by relevance.
1515
Comparison with the [Full-text Index](< 8000 /span>indexing-fulltext.html):
1616

1717
Feature | ArangoSearch | Full-text Index
18-
----------------------------------|--------------|----------------
18+
:---------------------------------|:-------------|:---------------
1919
Term search | Yes | Yes
2020
Prefix search | Yes | Yes
2121
Boolean expressions | Yes | Restricted

3.6/aql/functions-arangosearch.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,19 @@ PHRASE(doc.text, "lorem", 0, "ipsum", "text_en")
384384
PHRASE(doc.text, "ipsum", -1, "lorem", "text_en")
385385
```
386386

387+
`PHRASE(path, [ phrasePart1, skipTokens1, ... phrasePartN, skipTokensN ], analyzer)`
388+
389+
The `PHRASE()` function also accepts an array as second argument with
390+
*phrasePart* and *skipTokens* parameters as elements. This syntax variation
391+
enables the usage of computed expressions:
392+
393+
```js
394+
LET proximityCondition = [ "foo", ROUND(RAND()*10), "bar" ]
395+
FOR doc IN viewName
396+
SEARCH PHRASE(doc.text, proximityCondition, "text_en")
397+
RETURN doc
398+
```
399+
387400
### STARTS_WITH()
388401

389402
`STARTS_WITH(path, prefix)`

3.6/arangosearch-analyzers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Available normalizations are case conversion and accent removal
9191
(conversion of characters with diacritical marks to the base characters).
9292

9393
Feature / Analyzer | Identity | N-gram | Delimiter | Stem | Norm | Text
94-
-------------------|----------|---------|-----------|------|------|-----
94+
:------------------|:---------|:--------|:----------|:-----|:-----|:----
9595
**Tokenization** | No | No | (Yes) | No | No | Yes
9696
**Stemming** | No | No | No | Yes | No | Yes
9797
**Normalization** | No | No | No | No | Yes | Yes

3.6/arangosearch-views.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ the documents that satisfy the search criteria by relevance.
1515
Comparison with the [Full-text Index](indexing-fulltext.html):
1616

1717
Feature | ArangoSearch | Full-text Index
18-
----------------------------------|--------------|----------------
18+
:---------------------------------|:-------------|:---------------
1919
Term search | Yes | Yes
2020
Prefix search | Yes | Yes
2121
Boolean expressions | Yes | Restricted

0 commit comments

Comments
 (0)
0