picky 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/picky/indexing/indexes.rb +2 -1
- data/lib/picky/internals/adapters/rack/query.rb +2 -0
- data/lib/tasks/try.rake +4 -2
- metadata +13 -2
@@ -54,7 +54,8 @@ module Indexing # :nodoc:all
|
|
54
54
|
timed_exclaim "Indexing finished."
|
55
55
|
end
|
56
56
|
|
57
|
-
# For integration testing – indexes for the tests
|
57
|
+
# For integration testing – indexes for the tests
|
58
|
+
# without forking and shouting ;)
|
58
59
|
#
|
59
60
|
def index_for_tests
|
60
61
|
take_snapshot
|
data/lib/tasks/try.rake
CHANGED
@@ -8,14 +8,16 @@ namespace :try do
|
|
8
8
|
|
9
9
|
tokenizer = category ? Indexes.find(index, category).tokenizer : Internals::Tokenizers::Index.default
|
10
10
|
|
11
|
-
puts "\"#{text}\" is saved in the index as
|
11
|
+
puts "\"#{text}\" is saved in the index as #{tokenizer.tokenize(text.dup).to_a}"
|
12
12
|
end
|
13
13
|
|
14
14
|
# desc "Try how a given word would be tokenized when querying."
|
15
15
|
task :query, [:text] => :application do |_, options|
|
16
16
|
text = options.text
|
17
17
|
|
18
|
-
puts "\"#{text}\" as a
|
18
|
+
puts "\"#{text}\" as a search will be preprocessed into #{Internals::Tokenizers::Query.default.tokenize(text.dup).to_a.map(&:to_s).map(&:to_sym)}"
|
19
|
+
puts
|
20
|
+
puts "(category qualifiers, e.g. title: are removed if they do not exist as a qualifier, so 'toitle:bla' -> 'bla')"
|
19
21
|
end
|
20
22
|
|
21
23
|
# desc "Try the given text with both the index and the query (type:category optional)."
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: picky
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 2.
|
5
|
+
version: 2.3.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Florian Hanke
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-04-
|
13
|
+
date: 2011-04-17 00:00:00 +10:00
|
14
14
|
default_executable: picky
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -24,6 +24,17 @@ dependencies:
|
|
24
24
|
version: "0"
|
25
25
|
type: :development
|
26
26
|
version_requirements: *id001
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: picky-client
|
29
|
+
prerelease: false
|
30
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
31
|
+
none: false
|
32
|
+
requirements:
|
33
|
+
- - "="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 2.3.0
|
36
|
+
type: :development
|
37
|
+
version_requirements: *id002
|
27
38
|
description: Fast Ruby semantic text search engine with comfortable single field interface.
|
28
39
|
email: florian.hanke+picky@gmail.com
|
29
40
|
executables:
|