Skip to content

Commit f7d17b2

Browse files
author
eberhardtj
committed
Release 0.1.2
1 parent 4d6d485 commit f7d17b2

File tree

2 files changed

+144
-144
lines changed

2 files changed

+144
-144
lines changed

README.adoc

Lines changed: 143 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -1,143 +1,143 @@
1-
= metafacture-solr-plugin
2-
:toc:
3-
4-
A plugin for link:https://github.com/metafacture/metafacture-core[metafacture] that extends the standard XML module.
5-
6-
== Build
7-
8-
image::https://jitpack.io/v/eberhardtj/metafacture-solr-plugin.svg[link="https://jitpack.io/#eberhardtj/metafacture-solr-plugin"]
9-
10-
```
11-
gradlew test fatJar
12-
```
13-
14-
Produces `metafacture-solr-VERSION-plugin.jar` in `build/libs` .
15-
16-
Place the build JAR inside the `plugins` directory of your `metafacture-core` distribution.
17-
18-
== Command Reference
19-
20-
|===
21-
|Command | In | Out
22-
23-
|build-solr-doc
24-
|StreamReceiver
25-
|SolrDocumentReceiver
26-
27-
|handle-solr-xml
28-
|XmlReceiver
29-
|SolrDocumentReceiver
30-
31-
|to-solr
32-
|SolrDocumentReceiver
33-
|Void
34-
35-
|===
36-
37-
=== build-solr-doc
38-
39-
==== Description
40-
41-
Builds a Solr Input Document from metafacture stream events.
42-
43-
The following metafacture events
44-
45-
----
46-
startRecord("ignored")
47-
literal("id", "1")
48-
literal("key", "value")
49-
endRecord()
50-
----
51-
52-
would create the following Solr Document
53-
54-
----
55-
{"id": "1", "key": "value" }
56-
----
57-
58-
Atomic index updates are handled by the `entity` event.
59-
60-
----
61-
startRecord("ignored")
62-
literal("id", "1")
63-
entity("add")
64-
literal("name", "alice")
65-
literal("name", "bob")
66-
endEntity()
67-
endRecord()
68-
----
69-
70-
creates the following Solr Document
71-
72-
----
73-
{"id": "1", "name": {"add": ["alice", "bob"]}}
74-
----
75-
76-
See also link:https://lucene.apache.org/solr/guide/7_1/updating-parts-of-documents.html[Updating Parts of Documents].
77-
78-
==== Syntax
79-
80-
```
81-
build-solr-doc
82-
```
83-
84-
==== Example
85-
86-
Flux:
87-
88-
```
89-
... | build-solr-doc | to-solr(...);
90-
```
91-
92-
=== handle-solr-xml
93-
94-
==== Description
95-
96-
A XML handler for Solr Index Updates.
97-
98-
==== Syntax
99-
100-
```
101-
handle-solr-xml
102-
```
103-
104-
==== Example
105-
106-
Flux:
107-
108-
```
109-
> | decode-xml | handle-solr-xml | ...
110-
```
111-
112-
=== to-solr
113-
114-
==== Description
115-
116-
A sink that commits Solr Input Documents to a Apache Solr instance.
117-
118-
==== Syntax
119-
120-
```
121-
to-solr(url, [core], [batchSize], [commitWithinMs], [threads])
122-
```
123-
124-
==== Parameters
125-
126-
* `url`: URL to Solr Server.
127-
* `core`: Solr Core (Default: default)
128-
* `batchSize`: Number of documents per commit (Default: 1).
129-
* `commitWithinMs`: Max time (in ms) before a commit will happen (Default: 500).
130-
* `threads`: Number of threads for concurrent batch processing (Default: 1).
131-
132-
==== Example
133-
134-
Minimal case:
135-
136-
```
137-
... | to-solr("https://example.com/solr/", core="test");
138-
```
139-
140-
```
141-
... | to-solr(url="https://example.com/solr/", core="test",
142-
batchSize="2", commitWithinMs="1000", threads="2");
143-
```
1+
= metafacture-solr-plugin
2+
:toc:
3+
4+
A plugin for link:https://github.com/metafacture/metafacture-core[metafacture] that extends the standard XML module.
5+
6+
== Build
7+
8+
image::https://jitpack.io/v/eberhardtj/metafacture-solr-plugin.svg[link="https://jitpack.io/#eberhardtj/metafacture-solr-plugin"]
9+
10+
```
11+
gradlew test fatJar
12+
```
13+
14+
Produces `metafacture-solr-VERSION-plugin.jar` in `build/libs` .
15+
16+
Place the build JAR inside the `plugins` directory of your `metafacture-core` distribution.
17+
18+
== Command Reference
19+
20+
|===
21+
|Command | In | Out
22+
23+
|build-solr-doc
24+
|StreamReceiver
25+
|SolrDocumentReceiver
26+
27+
|handle-solr-xml
28+
|XmlReceiver
29+
|SolrDocumentReceiver
30+
31+
|to-solr
32+
|SolrDocumentReceiver
33+
|Void
34+
35+
|===
36+
37+
=== build-solr-doc
38+
39+
==== Description
40+
41+
Builds a Solr Input Document from metafacture stream events.
42+
43+
The following metafacture events
44+
45+
----
46+
startRecord("ignored")
47+
literal("id", "1")
48+
literal("key", "value")
49+
endRecord()
50+
----
51+
52+
would create the following Solr Document
53+
54+
----
55+
{"id": "1", "key": "value" }
56+
----
57+
58+
Atomic index updates are handled by the `entity` event.
59+
60+
----
61+
startRecord("ignored")
62+
literal("id", "1")
63+
entity("add")
64+
literal("name", "alice")
65+
literal("name", "bob")
66+
endEntity()
67+
endRecord()
68+
----
69+
70+
creates the following Solr Document
71+
72+
----
73+
{"id": "1", "name": {"add": ["alice", "bob"]}}
74+
----
75+
76+
See also link:https://lucene.apache.org/solr/guide/7_1/updating-parts-of-documents.html[Updating Parts of Documents].
77+
78+
==== Syntax
79+
80+
```
81+
build-solr-doc
82+
```
83+
84+
==== Example
85+
86+
Flux:
87+
88+
```
89+
... | build-solr-doc | to-solr(...);
90+
```
91+
92+
=== handle-solr-xml
93+
94+
==== Description
95+
96+
A XML handler for Solr Index Updates.
97+
98+
==== Syntax
99+
100+
```
101+
handle-solr-xml
102+
```
103+
104+
==== Example
105+
106+
Flux:
107+
108+
```
109+
> | decode-xml | handle-solr-xml | ...
110+
```
111+
112+
=== to-solr
113+
114+
==== Description
115+
116+
A sink that commits Solr Input Documents to a Apache Solr instance.
117+
118+
==== Syntax
119+
120+
```
121+
to-solr(url, [core], [batchSize], [commitWithinMs], [threads])
122+
```
123+
124+
==== Parameters
125+
126+
* `url`: URL to Solr Server.
127+
* `core`: Solr Core (Default: default)
128+
* `batchSize`: Number of documents per commit (Default: 1).
129+
* `commitWithinMs`: Max time (in ms) before a commit will happen (Default: -1, Disabled).
130+
* `threads`: Number of threads for concurrent batch processing (Default: 1).
131+
132+
==== Example
133+
134+
Minimal case:
135+
136+
```
137+
... | to-solr("https://example.com/solr/", core="test");
138+
```
139+
140+
```
141+
... | to-solr(url="https://example.com/solr/", core="test",
142+
batchSize="2", commitWithinMs="1000", threads="2");
143+
```

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group 'com.github.eberhardtj'
2-
version '0.1.1'
2+
version '0.1.2'
33

44
apply plugin: 'java'
55

0 commit comments

Comments
 (0)