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

Commit 2e3b81f

Browse files
committed
Updated documentation
1 parent 3f67568 commit 2e3b81f

File tree

3 files changed

+80
-2
lines changed

3 files changed

+80
-2
lines changed

README.asciidoc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Edit your project's +build.gradle+ file, by adding the plugin's dependency decla
2222
----
2323
dependencies {
2424
...
25-
compile "org.grails.plugins:elasticsearch:1.2.1"
25+
compile "org.grails.plugins:elasticsearch:2.4.0"
2626
...
2727
2828
}
@@ -34,6 +34,15 @@ dependencies {
3434
|===
3535
|Plugin Version | Grails Version | Elasticsearch Version
3636

37+
|2.4.0
38+
|3.1.y
39+
|5.4.1
40+
41+
|1.4.1
42+
|3.1.y
43+
|5.4.1
44+
45+
3746
|1.2.1
3847
|3.2.y
3948
|2.3.z

src/docs/introduction/versioning.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ If necessary a 4th level point release number will be used for successive change
1111

1212
|===
1313
s| Plugin Version s| Grails s| Elasticsearch
14-
s| 1.4.1 s| 3.1.x s| 5.x (tested with 5.4.1)
14+
s| 2.4.0 s| 3.3.x s| 5.x
15+
s| 1.4.1 s| 3.1.x s| 5.x (tested with 5.4.1)
1516
s| 1.2.0 s| 3.1.x s| 2.3.x
1617
s| 1.0.0.2 s| 3.1.x s| 1.x
1718
s| 0.1.0 s| 2.4.x s| 2.1.x

src/docs/mapping/quickStart.adoc

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,73 @@
11
=== Quick Start
22

3+
* Install Elasticsearch using instructions from https://www.elastic.co/guide/en/elasticsearch/reference/5.4/gs-installation.html[here].
4+
5+
* Just like any other Grails plugin, through the Grails Plugin center and Edit your project's +build.gradle+ file, by adding the plugin's dependency declaration:
6+
7+
----
8+
dependencies {
9+
...
10+
compile "org.grails.plugins:elasticsearch:2.4.0"
11+
...
12+
}
13+
----
14+
15+
* Updated `application.yml` with default configurations:
16+
----
17+
elasticSearch:
18+
datastoreImpl: hibernateDatastore
19+
client:
20+
mode: transport
21+
hosts:
22+
- {host: localhost, port: 9300}
23+
cluster.name: <ENTER CLUSTER NAME HERE>
24+
----
25+
26+
In order debug Elasticsearch plugin, add `logger("grails.plugins.elasticsearch", DEBUG, ['STDOUT'], false)` in `logback.groovy file as following:
27+
28+
----
29+
import grails.util.BuildSettings
30+
import grails.util.Environment
31+
import org.springframework.boot.logging.logback.ColorConverter
32+
import org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter
33+
34+
import java.nio.charset.Charset
35+
36+
conversionRule 'clr', ColorConverter
37+
conversionRule 'wex', WhitespaceThrowableProxyConverter
38+
39+
// See http://logback.qos.ch/manual/groovy.html for details on configuration
40+
appender('STDOUT', ConsoleAppender) {
41+
encoder(PatternLayoutEncoder) {
42+
charset = Charset.forName('UTF-8')
43+
44+
pattern =
45+
'%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} ' + // Date
46+
'%clr(%5p) ' + // Log level
47+
'%clr(---){faint} %clr([%15.15t]){faint} ' + // Thread
48+
'%clr(%-40.40logger{39}){cyan} %clr(:){faint} ' + // Logger
49+
'%m%n%wex' // Message
50+
}
51+
}
52+
53+
def targetDir = BuildSettings.TARGET_DIR
54+
if (Environment.isDevelopmentMode() && targetDir != null) {
55+
appender("FULL_STACKTRACE", FileAppender) {
56+
file = "${targetDir}/stacktrace.log"
57+
append = true
58+
encoder(PatternLayoutEncoder) {
59+
pattern = "%level %logger - %msg%n"
60+
}
61+
}
62+
logger("StackTrace", ERROR, ['FULL_STACKTRACE'], false)
63+
logger("grails.plugins.elasticsearch", DEBUG, ['STDOUT'], false)
64+
root(ERROR, ['STDOUT', 'FULL_STACKTRACE'])
65+
}
66+
else {
67+
root(ERROR, ['STDOUT'])
68+
}
69+
----
70+
371
==== Default mapping
472

573
To declare a domain class to be searchable, the simplest way is to define the following static property in the code:

0 commit comments

Comments
 (0)