Skip to content
This repository has been archived by the owner on Jun 30, 2018. It is now read-only.

Commit

Permalink
[DOC] Fixed the incorrect example of percolation while indexing document
Browse files Browse the repository at this point in the history
  • Loading branch information
karmi committed Dec 31, 2012
1 parent 3a9a690 commit d280482
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/tire-dsl.rb
Expand Up @@ -839,7 +839,8 @@ def self.search

# Let's store a document with some trigger words in the index, and mark it for percolation.
#
response = index.store :message => '[Warning] Severe floods expected after tsunami wave.', :percolate => true
response = index.store( { :message => '[Warning] Severe floods expected after tsunami wave.' },
{ :percolate => true } )

# We will get the names of all matching queries in response.
#
Expand All @@ -849,9 +850,9 @@ def self.search

# As with the _percolate_ example, we can filter the executed queries.
#
response = index.store :message => '[Warning] Severe floods expected after tsunami wave.',
# Let's use a simple string query for the “tsunami” tag.
:percolate => 'tags:tsunami'
response = index.store( { :message => '[Warning] Severe floods expected after tsunami wave.' },
# Let's use a simple string query for the “tsunami” tag.
{ :percolate => 'tags:tsunami' } )

# Unsurprisingly, the response will contain just the name of the “tsunami” query.
#
Expand Down

1 comment on commit d280482

@scalp42
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Please sign in to comment.