Skip to content

Commit

Permalink
Use provided lucene-linguistics bundle and cleanup/simplify some doc (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Harald Musum authored Mar 8, 2024
1 parent 3e0a71f commit 6abd184
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 15 deletions.
15 changes: 2 additions & 13 deletions examples/lucene-linguistics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,9 @@ Have fun!

The `lucene-linguistics` component is highly configurable.
It has an optional `configDir` configuration parameter of type `path`.
`configDir` is a directory to store linguistics resources, e.g. dictionaries with stopwords, etc., and is relative to the VAP root directory.
`configDir` is a directory to store linguistics resources, e.g. dictionaries with stopwords, etc., and is relative to the application package root directory.

There are several known problems that might happen when `configDir` is misconfigured.

### `configDir` is specified, but doesn't exist or specified directory is empty

If the `configDir` doesn't exist or is empty `vespa deploy` would fail with this error:
If the `configDir` doesn't exist or is empty, `vespa deploy` would fail with this error:

```shell
Uploading application package... done
Expand All @@ -151,10 +147,3 @@ Success: Triggered deployment of target/application with run ID 1
Deployment failed: Invalid application: Invalid config in services.xml for 'com.yahoo.language.lucene.lucene-analysis': /opt/vespa/var/db/vespa/config_server/serverdb/tenants/default/sessions/8/foo (No such file or directory)
Error: deployment run nnn incomplete after waiting up to 1m0s: aborting wait: run nnn ended with unsuccessful status: deploymentFailed
```

### Harmless warning
`vespa deploy` always warns with:
```shell
WARNING Jar file 'vespa-lucene-linguistics-poc-0.0.1-deploy.jar' uses non-public Vespa APIs: [com.yahoo.language.simple]
```
You can ignore this warning.
1 change: 1 addition & 0 deletions examples/lucene-linguistics/advanced-configuration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<groupId>com.yahoo.vespa</groupId>
<artifactId>lucene-linguistics</artifactId>
<version>${vespa_version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.yahoo.vespa</groupId>
Expand Down
1 change: 1 addition & 0 deletions examples/lucene-linguistics/going-crazy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<groupId>com.yahoo.vespa</groupId>
<artifactId>lucene-linguistics</artifactId>
<version>${vespa_version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
Expand Down
1 change: 1 addition & 0 deletions examples/lucene-linguistics/minimal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<groupId>com.yahoo.vespa</groupId>
<artifactId>lucene-linguistics</artifactId>
<version>${vespa_version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.yahoo.vespa</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<container id="container" version="1.0">
<components>
<component id="linguistics"
class="com.yahoo.language.lucene.LuceneLinguistics"
bundle="lucene-linguistics-minimal">
bundle="lucene-linguistics"
class="com.yahoo.language.lucene.LuceneLinguistics">
<config name="com.yahoo.language.lucene.lucene-analysis"/>
</component>
</components>
Expand Down

0 comments on commit 6abd184

Please sign in to comment.