Skip to content

Commit 6c4ea0d

Browse files
Merge pull request #2025 from SeaseLtd/lucene-linguistic-docs-fix
Update examples/lucene-linguistic documentation
2 parents 6fb440e + a1d5c30 commit 6c4ea0d

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

‎examples/lucene-linguistics/README.md‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ vespa query 'yql=select * from lucene where default contains "dogs"' \
4747
'model.locale=en'
4848

4949
# after this query log entry like this should appear:
50-
[2023-08-02 19:57:12.106] INFO container Container.com.yahoo.language.lucene.AnalyzerFactory Analyzer for language=en is from a list of default language analyzers.
50+
[2026-11-03 14:54:53.540] CONFIG container Container.com.yahoo.language.lucene.LuceneLinguistics Creating LuceneLinguistics with: configDir (<config-dir-name>)
5151
```
5252

5353
The query should return:
@@ -88,11 +88,19 @@ The query should return:
8888
```shell
8989
vespa query 'yql=select * from lucene where default contains "dogs"' \
9090
'model.locale=en' \
91-
'trace.level=2' | jq '.trace.children | last | .children[] | select(.message) | select(.message | test("YQL.*")) | .message'
91+
'trace.level=3' |
92+
jq -r '
93+
[.trace | .. | objects | .message? | strings] |
94+
(
95+
first(.[] | select(startswith("Stemming with"))),
96+
first(.[] | select(startswith("YQL+ representation:")))
97+
)
98+
'
9299
```
93100
Output
94101
```shell
95-
"YQL+ query parsed: [select * from lucene where default contains \"dog\" timeout 10000]"
102+
Stemming with default language ENGLISH using LuceneLinguistics
103+
YQL+ representation: select * from lucene where default contains ({stem: false, normalizeCase: false, id: 1}"dog") timeout 9995
96104
```
97105
See that the `dogs` rewritten as `dog`.
98106

0 commit comments

Comments
 (0)