-
Notifications
You must be signed in to change notification settings - Fork 15
Description
I am trying to use searchyll to add ElasticSearch (ES) capabilities to my Git-Page website. My Git-Pages site is made up of "pages" not "posts". So I wonder if that's the root of the issue? (Also, I use collections in my _config.yml file.)
I've gotten as far as trying to add documents to my ES database via jekyll build. I don't see that my pages are added.
Below I have included details of what I've done, but an overview is:
-
Updated my
_config.yml:
a. Addedsearchyllgem.
b. Addedelasticsearch -
Updated my `_layouts/page.html' to include
<article>...</article>
-
Run
elasticsearchlocally (for now) -
Run
jekyll build
a. I can see theindexing documentputsoutput.
b. I added some additionalputstosearchyll.rbjust in case. All seems okay. -
In my
elasticsearch, I do not see any new messages
a. I expected a message as each document is indexed into the ES database but nope -
GET _searchreturns nothing
a. Not surprising -
To test my ES:
a. I manuallyPUT
b. I saw a message in myelasticsearchoutput
c. I manuallyGET
My environment:
- Mac OS Sierra v 10.12.16
- Gems 2.0.0
- searchyll 0.10.1
- jekyll 3.4.5
- elasticsearch 5.6.0
Details:
#-------
$ cat _config.yml
[ snip ]
# stuff BA added
gems: [
jekyll-paginate, jekyll-feed, rouge, searchyll
]
elasticsearch:
url: http://localhost:9200
index_name: CSG-Wiki
default_type: "page" # Optional. Default type is "post".
collections:
general:
title: General
output: true
permalink: /:collection/:path/:title.html
#-------
$ cat _layouts/page.html
---
layout: default
---
<div class="page">
<h1 class="page-title">{{ page.title }}</h1>
<!-- this will be sent to elasticsearch, along with full page metadata -->
<article class="page-content">
{{ content }}
</article>
</div>
#-------
$ elasticsearch --verbose
[2017-09-18T08:04:30,005][INFO ][o.e.n.Node ] [] initializing ...
[2017-09-18T08:04:30,078][INFO ][o.e.e.NodeEnvironment ] [7_61xZT] using [1] data paths, mounts [[/ (/dev/disk1)]], net usable_space [126.1gb], net total_space [232.6gb], spins? [unknown], types [hfs]
[2017-09-18T08:04:30,078][INFO ][o.e.e.NodeEnvironment ] [7_61xZT] heap size [1.9gb], compressed ordinary object pointers [true]
[2017-09-18T08:04:30,090][INFO ][o.e.n.Node ] node name [7_61xZT] derived from node ID [7_61xZTTSr6bdGqad_FYTQ]; set [node.name] to override
[2017-09-18T08:04:30,090][INFO ][o.e.n.Node ] version[5.6.0], pid[42125], build[781a835/2017-09-07T03:09:58.087Z], OS[Mac OS X/10.12.6/x86_64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_131/25.131-b11]
[2017-09-18T08:04:30,090][INFO ][o.e.n.Node ] JVM arguments [-Xms2g, -Xmx2g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -Djdk.io.permissionsUseCanonicalPath=true, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j.skipJansi=true, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/usr/local/Cellar/elasticsearch/5.6.0/libexec]
[2017-09-18T08:04:30,706][INFO ][o.e.p.PluginsService ] [7_61xZT] loaded module [aggs-matrix-stats]
[2017-09-18T08:04:30,707][INFO ][o.e.p.PluginsService ] [7_61xZT] loaded module [ingest-common]
[2017-09-18T08:04:30,707][INFO ][o.e.p.PluginsService ] [7_61xZT] loaded module [lang-expression]
[2017-09-18T08:04:30,707][INFO ][o.e.p.PluginsService ] [7_61xZT] loaded module [lang-groovy]
[2017-09-18T08:04:30,707][INFO ][o.e.p.PluginsService ] [7_61xZT] loaded module [lang-mustache]
[2017-09-18T08:04:30,707][INFO ][o.e.p.PluginsService ] [7_61xZT] loaded module [lang-painless]
[2017-09-18T08:04:30,707][INFO ][o.e.p.PluginsService ] [7_61xZT] loaded module [parent-join]
[2017-09-18T08:04:30,707][INFO ][o.e.p.PluginsService ] [7_61xZT] loaded module [percolator]
[2017-09-18T08:04:30,708][INFO ][o.e.p.PluginsService ] [7_61xZT] loaded module [reindex]
[2017-09-18T08:04:30,708][INFO ][o.e.p.PluginsService ] [7_61xZT] loaded module [transport-netty3]
[2017-09-18T08:04:30,708][INFO ][o.e.p.PluginsService ] [7_61xZT] loaded module [transport-netty4]
[2017-09-18T08:04:30,708][INFO ][o.e.p.PluginsService ] [7_61xZT] no plugins loaded
[2017-09-18T08:04:31,815][INFO ][o.e.d.DiscoveryModule ] [7_61xZT] using discovery type [zen]
[2017-09-18T08:04:32,191][INFO ][o.e.n.Node ] initialized
[2017-09-18T08:04:32,192][INFO ][o.e.n.Node ] [7_61xZT] starting ...
[2017-09-18T08:04:32,358][INFO ][o.e.t.TransportService ] [7_61xZT] publish_address {127.0.0.1:9300}, bound_addresses {[fe80::1]:9300}, {[::1]:9300}, {127.0.0.1:9300}
[2017-09-18T08:04:35,401][INFO ][o.e.c.s.ClusterService ] [7_61xZT] new_master {7_61xZT}{7_61xZTTSr6bdGqad_FYTQ}{5kt0gbCuQZ2ZDrjkx6cImg}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)
[2017-09-18T08:04:35,419][INFO ][o.e.h.n.Netty4HttpServerTransport] [7_61xZT] publish_address {127.0.0.1:9200}, bound_addresses {[fe80::1]:9200}, {[::1]:9200}, {127.0.0.1:9200}
[2017-09-18T08:04:35,419][INFO ][o.e.n.Node ] [7_61xZT] started
[2017-09-18T08:04:35,529][INFO ][o.e.g.GatewayService ] [7_61xZT] recovered [1] indices into cluster_state
[2017-09-18T08:04:35,675][INFO ][o.e.c.r.a.AllocationService] [7_61xZT] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[library][1]] ...]).
#-------
$ jekyll build
WARN: Unresolved specs during Gem::Specification.reset:
rb-fsevent (>= 0.9.4, ~> 0.9)
rb-inotify (>= 0.9.7, ~> 0.9)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Configuration file: /Users/bfo7328/Documents/hca/project/wiki/_config.yml
Source: /Users/bfo7328/Documents/hca/project/wiki
Destination: /Users/bfo7328/Documents/hca/project/wiki/_site
Incremental build: disabled. Enable with --incremental
Generating...
indexing document /general/AE_job_desc.html
indexing document /general/index.html
indexing document /general/setup_elasticsearch.html
indexing document /general/setup_phone_cisco_unity.html
[ snip ]
indexing document /unix/setup_linux_analytics_server.html
indexing page /404.html
indexing page /atom.xml
indexing page /
indexing page /feed.xml
Old indices:
done in 5.697 seconds.
Auto-regeneration: disabled. Use --watch to enable.
#-------
$ elasticsearch --verbose
[ no new messages ]
#-------
$ curl -XGET localhost:9200/_search?pretty
{
"took" : 0,
"timed_out" : false,
"_shards" : {
"total" : 0,
"successful" : 0,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : 0.0,
"hits" : [ ]
}
}
#-------
$ curl -X PUT 'localhost:9200/library/books/1?pretty' -H 'Content-Type: application/json' -d'
{
"title" : "A fly on the wall",
"name" : {
"first": "Drosophila",
"last" : "Melanogaster"
},
"publish_date" : "2015-06-21T23:39:40-0400",
"price" : 19.95
}
'
# output:
{
"_index" : "library",
"_type" : "books",
"_id" : "1",
"_version" : 1,
"result" : "created",
"_shards" : {
"total" : 2,
"successful" : 1,
"failed" : 0
},
"created" : true
}
#-------
$ elasticsearch --verbose
[ new messages: ]
[2017-09-18T08:59:10,176][INFO ][o.e.c.m.MetaDataCreateIndexService] [7_61xZT] [library] creating index, cause [auto(bulk api)], templates [], shards [5]/[1], mappings []
[2017-09-18T08:59:10,252][INFO ][o.e.c.m.MetaDataMappingService] [7_61xZT] [library/qqN2Ig5uSQO7HBI94tp6fQ] create_mapping [books]
#-------
$ curl -XGET localhost:9200/_search?pretty
{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 1.0,
"hits" : [
{
"_index" : "library",
"_type" : "books",
"_id" : "1",
"_score" : 1.0,
"_source" : {
"title" : "A fly on the wall",
"name" : {
"first" : "Drosophila",
"last" : "Melanogaster"
},
"publish_date" : "2015-06-21T23:39:40-0400",
"price" : 19.95
}
}
]
}
}