Skip to content

Commit

Permalink
+ failing integration test case for the issue reported by tass
Browse files Browse the repository at this point in the history
  • Loading branch information
floere committed Dec 28, 2010
1 parent 71fcf7c commit ae018c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
11 changes: 6 additions & 5 deletions server/test_project/app/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,16 @@ class BookSearch < Application
csv_test_index = index(:csv_test, Sources::CSV.new(:title,:author,:isbn,:year,:publisher,:subjects, file: 'data/books.csv'))
.define_category(:title,
qualifiers: [:t, :title, :titre],
partial: Partial::Substring.new(:from => 1),
partial: Partial::Substring.new(from: 1),
similarity: Similarity::Phonetic.new(2))
.define_category(:author,
qualifiers: [:a, :author, :auteur],
partial: Partial::Substring.new(:from => -2))
partial: Partial::Substring.new(from: -2))
.define_category(:year,
qualifiers: [:y, :year, :annee])
.define_category(:publisher, :qualifiers => [:p, :publisher])
.define_category(:subjects, :qualifiers => [:s, :subject])
qualifiers: [:y, :year, :annee],
partial: Partial::None.new)
.define_category(:publisher, qualifiers: [:p, :publisher])
.define_category(:subjects, qualifiers: [:s, :subject])

options = {
:weights => {
Expand Down
1 change: 1 addition & 0 deletions server/test_project/spec/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def ids_of results
it_should_find_ids_in_csv 'Gover* Systems', [7]
it_should_find_ids_in_csv 'A*', [2, 3, 4, 5, 6, 7, 8, 15, 24, 27, 29, 35, 39, 52, 55, 63, 67, 76, 80, 101]
it_should_find_ids_in_csv 'a* b* c* d* f', [110, 416]
it_should_find_ids_in_csv '1977', [86, 394]

# Similarity
#
Expand Down

0 comments on commit ae018c7

Please sign in to comment.