Changes

Jump to: navigation, search

2013 talks proposals

2,380 bytes added, 17:21, 29 October 2012
added a talk proposal.
The talk will provide specific examples of how inefficient or confusing vendor supplied solutions are from a user perspective along with our specific streamlined solutions to the same problems. Code examples will be minimal as the focus will be on improving user experience rather than any one code solution of doing that. Examples may include the seemingly simple tasks of renewing a book or requesting an item from another campus library.
 
== Solr Testing Is Easy with Rspec-Solr Gem ==
 
* Naomi Dushay, Stanford University, ndushay AT stanford DOT edu
 
How do you know if
 
* your idea for "left anchoring" searches actually works?
* your field analysis for LC call numbers accommodates a suffix between the first and second cutter without breaking the rest of LC call number parsing?
* tweaking Solr configs to improve, say, Chinese searching, won't break Turkish and Cyrillic?
* changes to your solrconfig file accomplish what you wanted without breaking anything else?
 
Avoid the whole app stack when writing Solr acceptance/relevancy/regression tests! Forget cucumber and capybara. This gem lets you easily (only 4 short files needed!) write tests like this, passing arbitrary parameters to Solr:
 
  it "unstemmed author name Zare should precede stemmed variants" do
    resp = solr_response(author_search_args('Zare').merge({'fl'=>'id,author_person_display', 'facet'=>false}))
    resp.should include("author_person_display" => /\bZare\W/).in_each_of_first(3).documents
    resp.should_not include("author_person_display" => /Zaring/).in_each_of_first(20).documents
  end
 
  it "Cyrillic searching should work:  Восемьсoт семьдесят один день" do
    resp = solr_resp_doc_ids_only({'q'=>'Восемьсoт семьдесят один день'})
    resp.should include("9091779")
  end
 
  it "q of 'String quartets Parts' and variants should be plausible " do
    resp = solr_resp_doc_ids_only({'q'=>'String quartets Parts'})
    resp.should have_at_least(2000).documents
    resp.should have_the_same_number_of_results_as(solr_resp_doc_ids_only({'q'=>'(String quartets Parts)'}))
    resp.should have_more_results_than(solr_resp_doc_ids_only({'q'=>'"String quartets Parts"'}))
  end
 
it "Traditional Chinese chars 三國誌 should get the same results as simplified chars 三国志" do
resp = solr_response({'q'=>'三國誌', 'fl'=>'id', 'facet'=>false})
resp.should have_at_least(240).documents
resp.should have_the_same_number_of_results_as(solr_resp_doc_ids_only({'q'=>'三国志'}))
end
 
See
   http://rubydoc.info/github/sul-dlss/rspec-solr/frames
   https://github.com/sul-dlss/rspec-solr
 
and our production relevancy/acceptance/regression tests slowly migrating from cucumber to:
   https://github.com/sul-dlss/sw_index_tests
 
 
[[Category:Code4Lib2013]]
63
edits

Navigation menu