Searching For The GrailNoam Tenne
$ whoamiNoam Tenne
Senior DeveloperSenior Developer
blog.10ne.org@NoamTennegithub.com/noamt
http://www.flickr.com/photos/aussiegall/Where do we standWhere do we stand
Different data
Different shapes
SphinxTechnologiesInc.
SphinxDomain
SphinxDomainModel has been modified
SphinxDomainUpdate the indexCustomIntegration
SphinxDomainUpdate the indexCustomIntegration
SphinxDomainSphinx offline for re-indexCustomIntegration
Expected interaction
EngineCreate or update the mappings on startupMappingsApplication
EngineAct on persistence eventsApplicationDomain
EngineAct on persistence eventsUpdateDocumentsApplicationDomain
What do we choose?What do we choose?http://www.flickr.com/photos/89869792@N00/
Searchable PluginSearchable Plugin
Uses the Compass projectTo become “Elasticsearch”http://compass-project.org
Quick and easy setup
Embedded in your applicationEasier maintenance!Great for testing!Is this a good thing?
CompassApplicationPlugin
Incremental index
static searchable = trueMark a Domain as searchable:
    static searchable = {        except = [field1]        field2 boost: 2.0    }Mark a Domain as searchable whilecustomizi...
Map domains with annotations
 def result =                              Domain.search(query)Search using the domain static API:
 def result =                         searchableService.search(query)Search using the introduced service:
Whats the threshold?
CompassApplication
CompassApplication
CompassApplication
Horizontal growth is stifled
CompassApp1DB
CompassApp1DBCompassApp2
CompassApp1DBCompassApp2CompassApp3
RoomtoGrowhttp://www.flickr.com/photos/elwillo/
Solr PluginSolr Plugin
Backed by The Apache SoftwareFoundationwww.apache.orghttp://lucene.apache.org/solr
Incremental index&Facilities of modern engines
Utilizes an external instance
CompassApplicationPlugin
SolrApplicationPlugin
Embedding is possible but requires tweaks
Setup is fairly simpleRequires some fumbling
Solr comes as a bundled installation withthe plugin
Application
SolrApplicationPlugin
ApplicationPluginSolr
grails start­solr&grails stop­solr
static enableSolrSearch = trueMark a Domain as searchable:
static solrAutoIndex = trueAuto-index domain:
 def result =                          Domain.searchSolr(query)Search using the domain static API:
 def result =                               solrService.search(query)Search using the domain static API:
...But wait a minute
-GASP-
Can you afford to maintain it?Can you afford to maintain it?http://www.flickr.com/photos/louisa_catlover/
Im not dead yet!
Using Solr?Using Grails?Contribute!(yay)
Elasticsearch PluginElasticsearch Plugin
Elasticsearchhttp://www.elasticsearch.org
All the benefits of the aforementioned(Incremental, external, actively developed)
Setting up for embedded or external is abreeze
elasticSearch {    client.mode = local}Embedded:
elasticSearch {    client.mode = transport}External (single node):
static searchable = trueMark a Domain as searchable:static searchable = {…                }                    Looks famil...
Query closures
From the trencheshttp://www.flickr.com/photos/finsam/
Not released often
Plan ahead. mappings are commitments
Keep configurations in line
Call to armsHibernateGORMgithub.com/noamt/elasticsearch­gorm­plugin
Thanks!Any queries? (HAHAHA!)
Searching for the grail
Searching for the grail
Upcoming SlideShare
Loading in …5
×

Searching for the grail

1,451 views

Published on

Search facilities have become such a basic commodity in applications that it's almost taken for granted.
But bundled with a framework such as Grails, you the developer are faced with some limitations and extra concerns: how well is this library developed and backed? does the library fit the framework's paradigm and how good is the support for the tool within the framework itself?
This talk will provided an overview and comparison in search for a piece of the holy grail - a good search facility.

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,451
On SlideShare
0
From Embeds
0
Number of Embeds
886
Actions
Shares
0
Downloads
13
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Searching for the grail

  1. 1. Searching For The GrailNoam Tenne
  2. 2. $ whoamiNoam Tenne
  3. 3. Senior DeveloperSenior Developer
  4. 4. blog.10ne.org@NoamTennegithub.com/noamt
  5. 5. http://www.flickr.com/photos/aussiegall/Where do we standWhere do we stand
  6. 6. Different data
  7. 7. Different shapes
  8. 8. SphinxTechnologiesInc.
  9. 9. SphinxDomain
  10. 10. SphinxDomainModel has been modified
  11. 11. SphinxDomainUpdate the indexCustomIntegration
  12. 12. SphinxDomainUpdate the indexCustomIntegration
  13. 13. SphinxDomainSphinx offline for re-indexCustomIntegration
  14. 14. Expected interaction
  15. 15. EngineCreate or update the mappings on startupMappingsApplication
  16. 16. EngineAct on persistence eventsApplicationDomain
  17. 17. EngineAct on persistence eventsUpdateDocumentsApplicationDomain
  18. 18. What do we choose?What do we choose?http://www.flickr.com/photos/89869792@N00/
  19. 19. Searchable PluginSearchable Plugin
  20. 20. Uses the Compass projectTo become “Elasticsearch”http://compass-project.org
  21. 21. Quick and easy setup
  22. 22. Embedded in your applicationEasier maintenance!Great for testing!Is this a good thing?
  23. 23. CompassApplicationPlugin
  24. 24. Incremental index
  25. 25. static searchable = trueMark a Domain as searchable:
  26. 26.     static searchable = {        except = [field1]        field2 boost: 2.0    }Mark a Domain as searchable whilecustomizing the mapping:
  27. 27. Map domains with annotations
  28. 28.  def result =                              Domain.search(query)Search using the domain static API:
  29. 29.  def result =                         searchableService.search(query)Search using the introduced service:
  30. 30. Whats the threshold?
  31. 31. CompassApplication
  32. 32. CompassApplication
  33. 33. CompassApplication
  34. 34. Horizontal growth is stifled
  35. 35. CompassApp1DB
  36. 36. CompassApp1DBCompassApp2
  37. 37. CompassApp1DBCompassApp2CompassApp3
  38. 38. RoomtoGrowhttp://www.flickr.com/photos/elwillo/
  39. 39. Solr PluginSolr Plugin
  40. 40. Backed by The Apache SoftwareFoundationwww.apache.orghttp://lucene.apache.org/solr
  41. 41. Incremental index&Facilities of modern engines
  42. 42. Utilizes an external instance
  43. 43. CompassApplicationPlugin
  44. 44. SolrApplicationPlugin
  45. 45. Embedding is possible but requires tweaks
  46. 46. Setup is fairly simpleRequires some fumbling
  47. 47. Solr comes as a bundled installation withthe plugin
  48. 48. Application
  49. 49. SolrApplicationPlugin
  50. 50. ApplicationPluginSolr
  51. 51. grails start­solr&grails stop­solr
  52. 52. static enableSolrSearch = trueMark a Domain as searchable:
  53. 53. static solrAutoIndex = trueAuto-index domain:
  54. 54.  def result =                          Domain.searchSolr(query)Search using the domain static API:
  55. 55.  def result =                               solrService.search(query)Search using the domain static API:
  56. 56. ...But wait a minute
  57. 57. -GASP-
  58. 58. Can you afford to maintain it?Can you afford to maintain it?http://www.flickr.com/photos/louisa_catlover/
  59. 59. Im not dead yet!
  60. 60. Using Solr?Using Grails?Contribute!(yay)
  61. 61. Elasticsearch PluginElasticsearch Plugin
  62. 62. Elasticsearchhttp://www.elasticsearch.org
  63. 63. All the benefits of the aforementioned(Incremental, external, actively developed)
  64. 64. Setting up for embedded or external is abreeze
  65. 65. elasticSearch {    client.mode = local}Embedded:
  66. 66. elasticSearch {    client.mode = transport}External (single node):
  67. 67. static searchable = trueMark a Domain as searchable:static searchable = {…                }                    Looks familiar?
  68. 68. Query closures
  69. 69. From the trencheshttp://www.flickr.com/photos/finsam/
  70. 70. Not released often
  71. 71. Plan ahead. mappings are commitments
  72. 72. Keep configurations in line
  73. 73. Call to armsHibernateGORMgithub.com/noamt/elasticsearch­gorm­plugin
  74. 74. Thanks!Any queries? (HAHAHA!)

×