[Groonga-commit] droonga/presentation-trbmeetup-droonga at 5d2bc61 [master] Support syntax highlight

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Feb 9 10:51:07 JST 2015


Kouhei Sutou	2015-02-09 10:51:07 +0900 (Mon, 09 Feb 2015)

  New Revision: 5d2bc610704b183c1bf9d799a2026690d9bb371d
  https://github.com/droonga/presentation-trbmeetup-droonga/commit/5d2bc610704b183c1bf9d799a2026690d9bb371d

  Message:
    Support syntax highlight

  Modified files:
    fast-fulltext-search-in-ruby-groonga-rroonga-droonga.md

  Modified: fast-fulltext-search-in-ruby-groonga-rroonga-droonga.md (+9 -2)
===================================================================
--- fast-fulltext-search-in-ruby-groonga-rroonga-droonga.md    2015-02-09 10:46:19 +0900 (7f676d1)
+++ fast-fulltext-search-in-ruby-groonga-rroonga-droonga.md    2015-02-09 10:51:07 +0900 (ee8a7e3)
@@ -41,6 +41,7 @@ SELECT name,location
   FROM Store
  WHERE name LIKE '%Tokyo%';
 ~~~
+{: lang="sql"}
 
  * easy, simple, but *slow*
 
@@ -110,15 +111,16 @@ Ruby and Rails (ActiveRecord)
 ~~~
 class Post < ActiveRecord::Base
   searchable do
-    ...
+    # ...
   end
 end
 
 result = Post.search do
   fulltext 'best pizza'
-  ...
+  # ...
 end
 ~~~
+{: lang="ruby"}
 
 # elasticsearch-ruby?
 
@@ -130,6 +132,7 @@ client.transport.reload_connections!
 client.cluster.health
 client.search(q: "test")
 ~~~
+{: lang="ruby"}
 
 # Relations of services
 
@@ -255,6 +258,7 @@ Groonga::Schema.create_table("Terms",
  table.index("Items.title")
 end
 ~~~
+{: lang="ruby"}
 
 # Usage of Rroonga
 
@@ -271,6 +275,7 @@ items.add("http://en.wikipedia.org/wiki/Ruby",
 items.add("http://www.ruby-lang.org/",
           title: "Ruby")
 ~~~
+{: lang="ruby"}
 
 # Usage of Rroonga
 
@@ -286,6 +291,7 @@ ruby_items = items.select do |record|
   record.title =~ "Ruby"
 end
 ~~~
+{: lang="ruby"}
 
 # FYI: GrnMini
 
@@ -309,6 +315,7 @@ items << { url:   "http://www.ruby-lang.org/",
 
 ruby_items = items.select("title:@Ruby")
 ~~~
+{: lang="ruby"}
 
 Good first step to try fulltext search in your Ruby product.
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index