Skip to content

Commit 4e2633a

Browse files
authored
Merge pull request #15 from hoijui/patch-1
README: Add Solr related links
2 parents 58a2b0a + 43948e2 commit 4e2633a

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# linkml-solr
22

3-
A simple wrapper for using Solr with [LinkML](https://linkml.io) schemas
3+
A simple wrapper for using [Solr] with [LinkML](https://linkml.io) schemas
44

5-
This provides a convenience layer for working with a Solr database
5+
This provides a convenience layer for working with a [Solr] database
66
whose schema is defined in LinkML. It provides bindings both from
77
slots in your schema to queries, and binds result objects to your
88
object model.
@@ -20,7 +20,7 @@ for book in result.items:
2020
print(f'Book: {book.name} :: {book}')
2121
```
2222

23-
Unlike querying with the native pysolr API, this will validate input
23+
Unlike querying with the native [pysolr] API, this will validate input
2424
keys (which your IDE will be aware of), and will instantiate an
2525
instance of your model class.
2626

@@ -33,9 +33,9 @@ instance of your model class.
3333
See [tests/test_models/books.yaml](tests/test_models/books.yaml) for an example schema
3434

3535
The Schema must be specified as a [LinkML schema](https://linkml.io/linkml/schemas/index.html). Note that LinkML is
36-
more expressive than solr schemas, so not all constructs can be
37-
used. However, certain inferences are performed when compiling to Solr
38-
schemas - for example, you can use inheritance, and leaf classes will have all slots inferred.
36+
more expressive than [Solr schemas], so not all constructs can be
37+
used. However, certain inferences are performed when compiling to [Solr
38+
schemas] - for example, you can use inheritance, and leaf classes will have all slots inferred.
3939

4040
Your schemas should be relatively "flat and wide". Use denormalization over nesting.
4141

@@ -46,7 +46,7 @@ When designing your schema consider the two different paradigms supported:
4646

4747
Note: you can use the linkml-model-enrichment toolkit to auto-infer schemas from data
4848

49-
In future there will be ways to annotate your schema to give hints when making solr indexers etc.
49+
In future there will be ways to annotate your schema to give hints when making Solr indexers etc.
5050

5151
## Step 2: Create Python dataclasses
5252

@@ -60,13 +60,13 @@ See [tests/test_models/books.py](tests/test_models/books.py) for an example
6060

6161
## Step 3: Start a server
6262

63-
This starts a server, precreates a core "books" and loads a solr schema from a linkml schema:
63+
This starts a server, precreates a core "books" and loads a Solr schema from a linkml schema:
6464

6565
```bash
6666
lsolr start-server -C books -s books.yaml
6767
```
6868

69-
This wraps a docker container. If you do not wish to use a Docker container, then start solr in the usual way
69+
This wraps a docker container. If you do not wish to use a Docker container, then start [Solr] in the usual way
7070

7171
TODO: docs on how to do this
7272

@@ -150,3 +150,7 @@ Alpha code. Functionality is very incomplete
150150
- automatic de-nesting/de-normalization
151151
- autogen of model-specific API
152152
- expose additional solr functionality
153+
154+
[Solr]: https://solr.apache.org/
155+
[Solr schemas]: https://solr.apache.org/guide/solr/latest/indexing-guide/schema-elements.html
156+
[pysolr]: https://github.com/django-haystack/pysolr?tab=readme-ov-file#pysolr

0 commit comments

Comments
 (0)