aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vendor/plugins/acts_as_solr/CHANGE_LOG217
-rw-r--r--vendor/plugins/acts_as_solr/LICENSE19
-rw-r--r--vendor/plugins/acts_as_solr/README44
-rw-r--r--vendor/plugins/acts_as_solr/Rakefile25
-rw-r--r--vendor/plugins/acts_as_solr/TESTING_THE_PLUGIN8
-rw-r--r--vendor/plugins/acts_as_solr/config/environment.rb25
-rw-r--r--vendor/plugins/acts_as_solr/config/solr.yml10
-rw-r--r--vendor/plugins/acts_as_solr/init.rb21
-rw-r--r--vendor/plugins/acts_as_solr/install.rb11
-rw-r--r--vendor/plugins/acts_as_solr/lib/acts_as_solr.rb59
-rw-r--r--vendor/plugins/acts_as_solr/lib/acts_methods.rb172
-rw-r--r--vendor/plugins/acts_as_solr/lib/class_methods.rb149
-rw-r--r--vendor/plugins/acts_as_solr/lib/common_methods.rb76
-rw-r--r--vendor/plugins/acts_as_solr/lib/deprecation.rb61
-rw-r--r--vendor/plugins/acts_as_solr/lib/instance_methods.rb139
-rw-r--r--vendor/plugins/acts_as_solr/lib/parser_methods.rb215
-rw-r--r--vendor/plugins/acts_as_solr/lib/search_results.rb68
-rwxr-xr-xvendor/plugins/acts_as_solr/lib/solr.rb21
-rwxr-xr-xvendor/plugins/acts_as_solr/lib/solr/connection.rb162
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/document.rb73
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/exception.rb13
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/field.rb39
-rwxr-xr-xvendor/plugins/acts_as_solr/lib/solr/importer.rb19
-rwxr-xr-xvendor/plugins/acts_as_solr/lib/solr/importer/array_mapper.rb26
-rwxr-xr-xvendor/plugins/acts_as_solr/lib/solr/importer/delimited_file_source.rb38
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/importer/hpricot_mapper.rb27
-rwxr-xr-xvendor/plugins/acts_as_solr/lib/solr/importer/mapper.rb51
-rwxr-xr-xvendor/plugins/acts_as_solr/lib/solr/importer/solr_source.rb43
-rwxr-xr-xvendor/plugins/acts_as_solr/lib/solr/importer/xpath_mapper.rb35
-rwxr-xr-xvendor/plugins/acts_as_solr/lib/solr/indexer.rb52
-rwxr-xr-xvendor/plugins/acts_as_solr/lib/solr/request.rb24
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/request/add_document.rb63
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/request/base.rb36
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/request/commit.rb31
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/request/delete.rb50
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/request/dismax.rb46
-rwxr-xr-xvendor/plugins/acts_as_solr/lib/solr/request/index_info.rb22
-rwxr-xr-xvendor/plugins/acts_as_solr/lib/solr/request/optimize.rb21
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/request/ping.rb36
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/request/select.rb58
-rwxr-xr-xvendor/plugins/acts_as_solr/lib/solr/request/standard.rb108
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/request/update.rb23
-rwxr-xr-xvendor/plugins/acts_as_solr/lib/solr/response.rb24
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/response/add_document.rb17
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/response/base.rb42
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/response/commit.rb17
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/response/delete.rb13
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/response/dismax.rb8
-rwxr-xr-xvendor/plugins/acts_as_solr/lib/solr/response/index_info.rb26
-rwxr-xr-xvendor/plugins/acts_as_solr/lib/solr/response/optimize.rb14
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/response/ping.rb28
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/response/ruby.rb42
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/response/standard.rb68
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/response/xml.rb42
-rwxr-xr-xvendor/plugins/acts_as_solr/lib/solr/solrtasks.rb27
-rwxr-xr-xvendor/plugins/acts_as_solr/lib/solr/util.rb34
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr/xml.rb47
-rw-r--r--vendor/plugins/acts_as_solr/lib/solr_fixtures.rb13
-rw-r--r--vendor/plugins/acts_as_solr/schema.xml126
-rw-r--r--vendor/plugins/acts_as_solr/solr/.cvsignore2
-rw-r--r--vendor/plugins/acts_as_solr/solr/CHANGES.txt562
-rw-r--r--vendor/plugins/acts_as_solr/solr/LICENSE.txt608
-rw-r--r--vendor/plugins/acts_as_solr/solr/NOTICE.txt57
-rw-r--r--vendor/plugins/acts_as_solr/solr/etc/jetty.xml206
-rw-r--r--vendor/plugins/acts_as_solr/solr/etc/webdefault.xml379
-rw-r--r--vendor/plugins/acts_as_solr/solr/lib/commons-codec-1.3.jarbin46725 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/solr/lib/commons-csv-0.1-SNAPSHOT.jarbin20000 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/solr/lib/commons-fileupload-1.2.jarbin53082 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/solr/lib/commons-io-1.2.jarbin65621 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/solr/lib/easymock.jarbin62696 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/solr/lib/jetty-6.1.3.jarbin472383 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/solr/lib/jetty-util-6.1.3.jarbin128058 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/solr/lib/jsp-2.1/ant-1.6.5.jarbin1034049 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/solr/lib/jsp-2.1/core-3.1.1.jarbin3566844 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/solr/lib/jsp-2.1/jsp-2.1.jarbin637087 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/solr/lib/jsp-2.1/jsp-api-2.1.jarbin515250 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/solr/lib/lucene-analyzers-2007-05-20_00-04-53.jarbin67866 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/solr/lib/lucene-core-2007-05-20_00-04-53.jarbin492156 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/solr/lib/lucene-highlighter-2007-05-20_00-04-53.jarbin23974 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/solr/lib/lucene-snowball-2007-05-20_00-04-53.jarbin85175 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/solr/lib/lucene-spellchecker-2007-05-20_00-04-53.jarbin11690 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/solr/lib/servlet-api-2.4.jarbin97704 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/solr/lib/servlet-api-2.5-6.1.3.jarbin131998 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/solr/lib/xpp3-1.1.3.4.O.jarbin119888 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/solr/solr/.cvsignore1
-rw-r--r--vendor/plugins/acts_as_solr/solr/solr/README.txt52
-rwxr-xr-xvendor/plugins/acts_as_solr/solr/solr/bin/abc176
-rwxr-xr-xvendor/plugins/acts_as_solr/solr/solr/bin/abo176
-rwxr-xr-xvendor/plugins/acts_as_solr/solr/solr/bin/backup108
-rwxr-xr-xvendor/plugins/acts_as_solr/solr/solr/bin/backupcleaner142
-rwxr-xr-xvendor/plugins/acts_as_solr/solr/solr/bin/commit128
-rwxr-xr-xvendor/plugins/acts_as_solr/solr/solr/bin/optimize129
-rwxr-xr-xvendor/plugins/acts_as_solr/solr/solr/bin/readercycle129
-rwxr-xr-xvendor/plugins/acts_as_solr/solr/solr/bin/rsyncd-disable77
-rwxr-xr-xvendor/plugins/acts_as_solr/solr/solr/bin/rsyncd-enable76
-rwxr-xr-xvendor/plugins/acts_as_solr/solr/solr/bin/rsyncd-start145
-rwxr-xr-xvendor/plugins/acts_as_solr/solr/solr/bin/rsyncd-stop105
-rwxr-xr-xvendor/plugins/acts_as_solr/solr/solr/bin/scripts-util83
-rwxr-xr-xvendor/plugins/acts_as_solr/solr/solr/bin/snapcleaner148
-rwxr-xr-xvendor/plugins/acts_as_solr/solr/solr/bin/snapinstaller168
-rwxr-xr-xvendor/plugins/acts_as_solr/solr/solr/bin/snappuller248
-rwxr-xr-xvendor/plugins/acts_as_solr/solr/solr/bin/snappuller-disable77
-rwxr-xr-xvendor/plugins/acts_as_solr/solr/solr/bin/snappuller-enable77
-rwxr-xr-xvendor/plugins/acts_as_solr/solr/solr/bin/snapshooter109
-rw-r--r--vendor/plugins/acts_as_solr/solr/solr/conf/admin-extra.html31
-rw-r--r--vendor/plugins/acts_as_solr/solr/solr/conf/protwords.txt21
-rw-r--r--vendor/plugins/acts_as_solr/solr/solr/conf/schema.xml126
-rw-r--r--vendor/plugins/acts_as_solr/solr/solr/conf/scripts.conf24
-rw-r--r--vendor/plugins/acts_as_solr/solr/solr/conf/solrconfig.xml488
-rw-r--r--vendor/plugins/acts_as_solr/solr/solr/conf/stopwords.txt57
-rw-r--r--vendor/plugins/acts_as_solr/solr/solr/conf/synonyms.txt31
-rw-r--r--vendor/plugins/acts_as_solr/solr/solr/conf/xslt/example.xsl132
-rw-r--r--vendor/plugins/acts_as_solr/solr/solr/conf/xslt/example_atom.xsl63
-rw-r--r--vendor/plugins/acts_as_solr/solr/solr/conf/xslt/example_rss.xsl62
-rw-r--r--vendor/plugins/acts_as_solr/solr/start.jarbin16411 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/solr/webapps/solr.warbin1431241 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/test/config/solr.yml2
-rw-r--r--vendor/plugins/acts_as_solr/test/db/connections/mysql/connection.rb10
-rw-r--r--vendor/plugins/acts_as_solr/test/db/connections/sqlite/connection.rb8
-rw-r--r--vendor/plugins/acts_as_solr/test/db/migrate/001_create_books.rb13
-rw-r--r--vendor/plugins/acts_as_solr/test/db/migrate/002_create_movies.rb12
-rw-r--r--vendor/plugins/acts_as_solr/test/db/migrate/003_create_categories.rb11
-rw-r--r--vendor/plugins/acts_as_solr/test/db/migrate/004_create_electronics.rb15
-rw-r--r--vendor/plugins/acts_as_solr/test/db/migrate/005_create_authors.rb12
-rw-r--r--vendor/plugins/acts_as_solr/test/db/migrate/006_create_postings.rb9
-rw-r--r--vendor/plugins/acts_as_solr/test/db/test.dbbin6144 -> 0 bytes
-rw-r--r--vendor/plugins/acts_as_solr/test/fixtures/authors.yml9
-rw-r--r--vendor/plugins/acts_as_solr/test/fixtures/books.yml11
-rw-r--r--vendor/plugins/acts_as_solr/test/fixtures/categories.yml7
-rw-r--r--vendor/plugins/acts_as_solr/test/fixtures/db_definitions/mysql.sql41
-rw-r--r--vendor/plugins/acts_as_solr/test/fixtures/electronics.yml39
-rw-r--r--vendor/plugins/acts_as_solr/test/fixtures/movies.yml9
-rw-r--r--vendor/plugins/acts_as_solr/test/fixtures/postings.yml10
-rw-r--r--vendor/plugins/acts_as_solr/test/models/author.rb10
-rw-r--r--vendor/plugins/acts_as_solr/test/models/book.rb10
-rw-r--r--vendor/plugins/acts_as_solr/test/models/category.rb8
-rw-r--r--vendor/plugins/acts_as_solr/test/models/electronic.rb20
-rw-r--r--vendor/plugins/acts_as_solr/test/models/movie.rb17
-rw-r--r--vendor/plugins/acts_as_solr/test/models/posting.rb11
-rw-r--r--vendor/plugins/acts_as_solr/test/test_helper.rb36
-rw-r--r--vendor/plugins/acts_as_solr/test/unit/acts_as_solr_test.rb375
-rw-r--r--vendor/plugins/acts_as_solr/test/unit/association_indexing_test.rb37
-rw-r--r--vendor/plugins/acts_as_solr/test/unit/faceted_search_test.rb122
-rw-r--r--vendor/plugins/acts_as_solr/test/unit/multi_solr_search_test.rb39
144 files changed, 0 insertions, 9130 deletions
diff --git a/vendor/plugins/acts_as_solr/CHANGE_LOG b/vendor/plugins/acts_as_solr/CHANGE_LOG
deleted file mode 100644
index 14d76b46a..000000000
--- a/vendor/plugins/acts_as_solr/CHANGE_LOG
+++ /dev/null
@@ -1,217 +0,0 @@
-== CHANGE_LOG
-=== 06-18-2007: Version 0.9
-<b>NEW</b>:: Added the option :scores when doing a search. If set to true this will return the score as a 'solr_score' attribute or each one of the instances found
- books = Book.find_by_solr 'ruby OR splinter', :scores => true
- books.records.first.solr_score
- => 1.21321397
- books.records.last.solr_score
- => 0.12321548
-
-<b>NEW</b>:: Major change on the way the results returned are accessed.
- books = Book.find_by_solr 'ruby'
- # the above will return a SearchResults class with 4 methods:
- # docs|results|records: will return an array of records found
- #
- # books.records.is_a?(Array)
- # => true
- #
- # total|num_found|total_hits: will return the total number of records found
- #
- # books.total
- # => 2
- #
- # facets: will return the facets when doing a faceted search
- #
- # max_score|highest_score: returns the highest score found
- #
- # books.max_score
- # => 1.3213213
-
-<b>NEW</b>:: Integrating acts_as_solr to use solr-ruby as the 'backend'. Integration based on the patch submitted by Erik Hatcher
-<b>NEW</b>:: Re-factoring rebuild_solr_index to allow adds to be done in batch; and if a finder block is given, it will be called to retrieve the items to index. (thanks Daniel E.)
-<b>NEW</b>:: Adding the option to specify the port Solr should start when using rake solr:start
- rake solr:start RAILS_ENV=your_env PORT=XX
-
-<b>NEW</b>:: Adding deprecation warning for the :background configuration option. It will no longer be updated.
-<b>NEW</b>:: Adding support for models that use a primary key other than integer
- class Posting < ActiveRecord::Base
- set_primary_key 'guid' #string
- #make sure you set the :primary_key_field => 'pk_s' if you wish to use a string field as the primary key
- acts_as_solr({},{:primary_key_field => 'pk_s'})
- end
-
-<b>FIX</b>:: Disabling of storing most fields. Storage isn't useful for acts_as_solr in any field other than the pk and id fields. It just takes up space and time. (thanks Daniel E.)
-<b>FIX</b>:: Re-factoring code submitted by Daniel E.
-<b>NEW</b>:: Adding an :auto_commit option that will only send the commit command to Solr if it is set to true
- class Author < ActiveRecord::Base
- acts_as_solr :auto_commit => false
- end
-
-<b>FIX</b>:: Fixing bug on rake's test task
-<b>FIX</b>:: Making acts_as_solr's Post class compatible with Solr 1.2 (thanks Si)
-<b>NEW</b>:: Adding Solr 1.2
-<b>FIX</b>:: Removing Solr 1.1
-<b>NEW</b>:: Adding a conditional :if option to the acts_as_solr call. It behaves the same way ActiveRecord's :if argument option does.
- class Electronic < ActiveRecord::Base
- acts_as_solr :if => proc{|record| record.is_active?}
- end
-
-<b>NEW</b>:: Adding fixtures to Solr index when using rake db:fixtures:load
-<b>FIX</b>:: Fixing boost warning messages
-<b>FIX</b>:: Fixing bug when adding a facet to a field that contains boost
-<b>NEW</b>:: Deprecating find_with_facet and combining functionality with find_by_solr
-<b>NEW</b>:: Adding the option to :exclude_fields when indexing a model
- class User < ActiveRecord::Base
- acts_as_solr :exclude_fields => [:password, :login, :credit_card_number]
- end
-
-<b>FIX</b>:: Fixing branch bug on older ruby version
-<b>NEW</b>:: Adding boost support for fields and documents being indexed:
- class Electronic < ActiveRecord::Base
- # You can add boosting on a per-field basis or on the entire document
- acts_as_solr :fields => [{:price => {:boost => 5.0}}], :boost => 5.0
- end
-
-<b>FIX</b>:: Fixed the acts_as_solr limitation to only accept test|development|production environments.
-
-=== 05-16-2007: Version 0.8.5
-<b>FIX</b>:: There's no need to specify the :field_types anymore when doing a search in a model that specifies a field type for a field.
-<b>FIX</b>:: Better handling of nil values from indexed fields. Solr complained when indexing fields with field type and the field values being passed as nils.
-<b>NEW</b>:: Adding Solr sort (order by) option to the search query (thanks Kevin Hunt)
-<b>FIX</b>:: Applying patch suggested for increasing the Solr commit speed (thanks Mourad Hammiche)
-<b>FIX</b>:: Updated documentation
-
-=== 05-10-2007: Version 0.8
-<b>NEW</b>: New video tutorial
-<b>NEW</b>: Faceted search has been implemented and its possible to 'drill-down' on the facets
-<b>NEW</b>: New rake tasks you can use to start/stop the solr server in test, development and production environments: (thanks Matt Clark)
- rake solr:start|stop RAILS_ENV=test|development|production (defaults to development if none given)
-
-<b>NEW</b>: Changes to the plugin's test framework and it now supports Sqlite as well (thanks Matt Clark)
-<b>FIX</b>: Patch applied (thanks Micah) that allows one to have multiple solr instances in the same servlet
-<b>FIX</b>: Patch applied (thanks Micah) that allows indexing of STIs
-<b>FIX</b>: Patch applied (thanks Gordon) that allows the plugin to use a table's primary key different than 'id'
-<b>FIX</b>: Returning empty array instead of empty strings when no records are found
-<b>FIX</b>: Problem with unit tests failing due to order of the tests and speed of the commits
-
-=== 02-16-2007: Version 0.7
-<b>NEW</b>: You can now specify the field types when indexing and searching if
-you'd like to preserve its original type:
-
-<b>Indexing</b>
-
-Each field passed can also be a hash with the value being a field type
-
- class Electronic < ActiveRecord::Base
- acts_as_solr :fields => [{:price => :range_float}, {:current_time => :date}]
- def current_time
- Time.now
- end
- end
-
-<b>Searching</b>
- Electronic.find_by_solr "ipod AND price:[* TO 59.99]",
- :field_types => [{:price => :range_float}]
-
-The field types accepted are:
-<em>:float</em>:: Index the field value as a float (ie.: 12.87)
-<em>:integer</em>:: Index the field value as an integer (ie.: 31)
-<em>:boolean</em>:: Index the field value as a boolean (ie.: true/false)
-<em>:date</em>:: Index the field value as a date (ie.: Wed Nov 15 23:13:03 PST 2006)
-<em>:string</em>:: Index the field value as a text string, not applying the same indexing filters as a regular text field
-<em>:range_integer</em>:: Index the field value for integer range queries (ie.:[5 TO 20])
-<em>:range_float</em>:: Index the field value for float range queries (ie.:[14.56 TO 19.99])
-
-<b>Setting the field type preserves its original type when indexed</b>
-
-<b>FIX</b>: Fixing sorting bug. Thanks for the catch Laurel
-
-<b>FIX</b>: Fixing small bug when installing the plugin
-
-<b>NEW</b>: Adding the :additional_fields option to the acts_as_solr method
-
-=== 02-05-2007: Version 0.6.5
-<b>NEW</b>:: Added multi-model search, which can be used to execute a search across multiple models:
- Book.multi_solr_search "Napoleon OR Tom", :models => [Movie]
-
-====options:
-Accepts the same options as find_by_solr plus:
-models:: The additional models you'd like to include in the search
-results_format:: Specify the format of the results found
- :objects :: Will return an array with the results being objects (default). Example:
- Book.multi_solr_search "Napoleon OR Tom", :models => [Movie], :results_format => :objects
- :ids :: Will return an array with the ids of each entry found. Example:
- Book.multi_solr_search "Napoleon OR Tom", :models => [Movie], :results_format => :ids
- => [{"id" => "Movie:1"},{"id" => Book:1}]
- Where the value of each array is as Model:instance_id
-
-=== 02-03-2007: Version 0.6
-<b>NEW</b>:: Added basic faceted search functionality for indexing and searching:
-
-==== Indexing:
-
- class Electronic < ActiveRecord::Base
- acts_as_solr :facets => [:category, :manufacturer]
- end
-
-==== Searching:
-
- Electronic.find_with_facet "memory", :facets => {:fields =>[:category]}
-
-=== 01-15-2007: Version 0.5
-<b>NEW</b>:: Added model association indexing, which means you can include any :has_one, :has_many,
-:belongs_to and :has_and_belongs_to_many association to be indexed:
-
- class Category < ActiveRecord::Base
- has_many :books
- acts_as_solr :include => [:books]
- end
-
- class Book < ActiveRecord::Base
- belongs_to :category
- acts_as_solr :include => [:category]
- end
-
-=== 01-11-2007:
-<b>NEW</b>:: Added the acts_as_solr's plugin tests
-
-=== 11-07-2006: Version 0.4
-<b>NEW</b>:: Added :background option, which takes and integer value (in minutes) to wait before committing the changes to Solr. This depends on rail_cron being installed. By setting up the background job we prevent the users from having to wait for Solr records to be created, and we keep from updating the index over and over for quickly successive changes. (Rob Kaufman)
-
-=== 11-02-2006: Version 0.3
-<b>NEW</b>:: Added a method (Model.count_by_solr) that returns the total number of documents found based on query passed
-<b>NEW</b>:: Added configuration for production and development environments
-
-=== 10-21-2006: Version 0.2
-<b>PLUGIN</b>
-<b>FIX</b>:: Fixed bug when mixing search-by-field and 'free' search: Model.find_by_solr 'solr AND name:Thiago'
-<b>FIX</b>:: Fixed bug with multi-terms search: Book.find_by_solr 'anteater john'
-<b>FIX</b>:: Fixed bug when including more than one search field: Model.find_by_solr 'name:Thiago AND engine:Solr'
-<b>FIX</b>:: Fixed bug when rebuilding the index, it wasn't saving the data
-<b>NEW</b>:: Added the ability to index custom methods from a model as search fields
-<b>NEW</b>:: Added a search method (Model.find_id_by_solr) that will return only the id of the results
-
-<b>SCHEMA.XML</b>
-<b>NEW</b>:: Added a new field: <field name="default" type="text" indexed="true" stored="true" />
-<b>NEW</b>:: Added a default search field: <defaultSearchField>default</defaultSearchField>
-<b>FIX</b>:: Changed the defaultOperator to AND instead of OR
-
-=== 09-29-2006: Version 0.1
-<b>PLUGIN</b>
-<b>NEW</b>:: Included the option of having a Solr config file inside the rails env.
-<b>NEW</b>:: Added the ability of indexing only certain fields, if you chose to.
-<b>NEW</b>:: Added configuration options
-<b>NEW</b>:: Changed the way the search was done:
- Old: You were forced the specify the field you wanted to look for
- ('field:value') and you had to specify a default search field as
- well, for when you didn't include the 'field' in the search term
- New: The new search features include:
- - You don't have to specify a default search field;
- - You are not forced to include the field name in the search term,
- unless you choose to search for a specific field ('name:Thiago');
- - You can pass the starting row and the number of rows per page,
- which is usefull for pagination
-<b>NEW</b>:: Included a method to rebuild the index files
-
-<b>SCHEMA.XML</b>
-<b>NEW</b>:: Created an optimized version of the config file to better work with this plugin \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/LICENSE b/vendor/plugins/acts_as_solr/LICENSE
deleted file mode 100644
index e4a2ef549..000000000
--- a/vendor/plugins/acts_as_solr/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2006 Erik Hatcher, Thiago Jackiw
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE. \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/README b/vendor/plugins/acts_as_solr/README
deleted file mode 100644
index 32ca95ff4..000000000
--- a/vendor/plugins/acts_as_solr/README
+++ /dev/null
@@ -1,44 +0,0 @@
-= acts_as_solr Rails plugin
-This plugin adds full text search capabilities and many other nifty features from Apache's Solr[http://lucene.apache.org/solr/] to any Rails model.
-It was based on the first draft by Erik Hatcher.
-
-== Current Release
-The current stable release is v0.9 and was released on 06-18-2007.
-
-== Changes
-Please refer to the CHANGE_LOG[link:files/CHANGE_LOG.html]
-
-== Installation
-=== Requirements
-* Java Runtime Environment(JRE) 1.5 aka 5.0 (http://www.java.com/en/download/index.jsp)
-
-=== Default
-On your Rails' root directory, just type
-
- script/plugin install svn://svn.railsfreaks.com/projects/acts_as_solr/trunk
-
-== Basic Usage
-Just include the line below to any of your ActiveRecord models:
-
- acts_as_solr
-
-Or if you want, you can specify only the fields that should be indexed:
-
- acts_as_solr :fields => [:name, :author]
-
-Then to find instances of your model, just do:
-
- Model.find_by_solr(query) #Query is a string representing your query
-
-Please see ActsAsSolr::ActsMethods for a complete info
-
-== Authors
-Erik Hatcher:: First draft
-Thiago Jackiw:: Current developer (tjackiw at gmail dot com)
-
-== Release Information
-Released under the MIT license.
-
-== More info
-http://acts-as-solr.railsfreaks.com
-http://acts_as_solr.railsfreaks.com \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/Rakefile b/vendor/plugins/acts_as_solr/Rakefile
deleted file mode 100644
index 4133069dc..000000000
--- a/vendor/plugins/acts_as_solr/Rakefile
+++ /dev/null
@@ -1,25 +0,0 @@
-require 'rubygems'
-require 'rake'
-require 'rake/testtask'
-
-Dir["#{File.dirname(__FILE__)}/lib/tasks/**/*.rake"].sort.each { |ext| load ext }
-
-desc "Default Task"
-task :default => [:test]
-
-desc 'Runs the tests'
-task :test do
- ENV['RAILS_ENV'] = "test"
- require File.dirname(__FILE__) + '/config/environment'
- puts "Using " + DB
- %x(mysql -u#{MYSQL_USER} < #{File.dirname(__FILE__) + "/test/fixtures/db_definitions/mysql.sql"}) if DB == 'mysql'
-
- Rake::Task["test:migrate"].invoke
- Rake::Task[:test_units].invoke
-end
-
-desc "Unit Tests"
- Rake::TestTask.new('test_units') do |t|
- t.pattern = "test/unit/*_test.rb"
- t.verbose = true
-end
diff --git a/vendor/plugins/acts_as_solr/TESTING_THE_PLUGIN b/vendor/plugins/acts_as_solr/TESTING_THE_PLUGIN
deleted file mode 100644
index 516f5db39..000000000
--- a/vendor/plugins/acts_as_solr/TESTING_THE_PLUGIN
+++ /dev/null
@@ -1,8 +0,0 @@
-== How to run unit tests for this plugin:
-To run the acts_as_solr's plugin tests run the following steps:
-- rake solr:start RAILS_ENV=test
-- rake (Accepts the following arguments: DB=sqlite|mysql and MYSQL_USER=user)
-
-== Troubleshooting:
-If for some reason the tests don't run and you get MySQL errors, make sure you edit the MYSQL_USER entry under
-config/environment.rb. It's recommended to create or use a MySQL user with no password. \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/config/environment.rb b/vendor/plugins/acts_as_solr/config/environment.rb
deleted file mode 100644
index 851b59788..000000000
--- a/vendor/plugins/acts_as_solr/config/environment.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-ENV['RAILS_ENV'] = (ENV['RAILS_ENV'] || 'development').dup
-SOLR_PATH = "#{File.dirname(File.expand_path(__FILE__))}/../solr" unless defined? SOLR_PATH
-
-# XXX hacky stuff to read the port from the main config file
-RAILS_SOLR_CONFIG="#{SOLR_PATH}/../../../../config/solr.yml"
-rails_solr_config = YAML.load(File.read(RAILS_SOLR_CONFIG))
-rails_solr_config_read = rails_solr_config[ENV['RAILS_ENV']]
-raise "no config in solr.yml for " + ENV['RAILS_ENV'] if rails_solr_config_read.nil?
-rails_solr_url = rails_solr_config_read['url']
-rails_solr_port = rails_solr_url.match(/http:\/\/localhost:(\d+)\/solr/)[1]
-SOLR_PORT = rails_solr_port.to_i
-
-unless defined? SOLR_PORT
- SOLR_PORT = ENV['PORT'] || case ENV['RAILS_ENV']
- when 'test' then 8981
- when 'production' then 8983
- else 8982
- end
-end
-
-if ENV['RAILS_ENV'] == 'test'
- DB = (ENV['DB'] ? ENV['DB'] : 'mysql') unless defined? DB
- MYSQL_USER = (ENV['MYSQL_USER'].nil? ? 'root' : ENV['MYSQL_USER']) unless defined? MYSQL_USER
- require File.join(File.dirname(File.expand_path(__FILE__)), '..', 'test', 'db', 'connections', DB, 'connection.rb')
-end
diff --git a/vendor/plugins/acts_as_solr/config/solr.yml b/vendor/plugins/acts_as_solr/config/solr.yml
deleted file mode 100644
index a6f861839..000000000
--- a/vendor/plugins/acts_as_solr/config/solr.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-# Config file for the acts_as_solr plugin.
-#
-# If you change the host or port number here, make sure you update
-# them in your Solr config file
-
-development:
- url: http://localhost:8982/solr
-
-production:
- url: http://localhost:8983/solr \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/init.rb b/vendor/plugins/acts_as_solr/init.rb
deleted file mode 100644
index fcbeb750a..000000000
--- a/vendor/plugins/acts_as_solr/init.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright (c) 2006 Erik Hatcher, Thiago Jackiw
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in all
-# copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-
-require 'acts_as_solr' \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/install.rb b/vendor/plugins/acts_as_solr/install.rb
deleted file mode 100644
index 99ad8ffa1..000000000
--- a/vendor/plugins/acts_as_solr/install.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-require 'fileutils'
-
-def install(file)
- puts "Installing: #{file}"
- target = File.join(File.dirname(__FILE__), '..', '..', '..', file)
- FileUtils.cp File.join(File.dirname(__FILE__), file), target
- dir_to_rename = File.dirname(__FILE__) + '/../trunk'
- FileUtils.mv(dir_to_rename, File.dirname(__FILE__) + '/../acts_as_solr') if File.exists? dir_to_rename
-end
-
-install File.join( 'config', 'solr.yml' )
diff --git a/vendor/plugins/acts_as_solr/lib/acts_as_solr.rb b/vendor/plugins/acts_as_solr/lib/acts_as_solr.rb
deleted file mode 100644
index e88a1aae2..000000000
--- a/vendor/plugins/acts_as_solr/lib/acts_as_solr.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright (c) 2006 Erik Hatcher, Thiago Jackiw
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in all
-# copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-
-require 'active_record'
-require 'rexml/document'
-require 'net/http'
-require 'yaml'
-
-require File.dirname(__FILE__) + '/solr'
-require File.dirname(__FILE__) + '/acts_methods'
-require File.dirname(__FILE__) + '/class_methods'
-require File.dirname(__FILE__) + '/instance_methods'
-require File.dirname(__FILE__) + '/common_methods'
-require File.dirname(__FILE__) + '/deprecation'
-require File.dirname(__FILE__) + '/search_results'
-
-module ActsAsSolr
-
- class Post
- def self.execute(request)
- begin
- if File.exists?(RAILS_ROOT+'/config/solr.yml')
- config = YAML::load_file(RAILS_ROOT+'/config/solr.yml')
- url = config[RAILS_ENV]['url']
- # for backwards compatibility
- url ||= "http://#{config[RAILS_ENV]['host']}:#{config[RAILS_ENV]['port']}/#{config[RAILS_ENV]['servlet_path']}"
- else
- url = 'http://localhost:8982/solr'
- end
- connection = Solr::Connection.new(url)
- return connection.send(request)
- rescue
- raise "Couldn't connect to the Solr server at #{url}. #{$!}"
- false
- end
- end
- end
-
-end
-
-# reopen ActiveRecord and include the acts_as_solr method
-ActiveRecord::Base.extend ActsAsSolr::ActsMethods
diff --git a/vendor/plugins/acts_as_solr/lib/acts_methods.rb b/vendor/plugins/acts_as_solr/lib/acts_methods.rb
deleted file mode 100644
index d7dcc4e41..000000000
--- a/vendor/plugins/acts_as_solr/lib/acts_methods.rb
+++ /dev/null
@@ -1,172 +0,0 @@
-module ActsAsSolr #:nodoc:
-
- module ActsMethods
-
- # declares a class as solr-searchable
- #
- # ==== options:
- # fields:: This option can be used to specify only the fields you'd
- # like to index. If not given, all the attributes from the
- # class will be indexed. You can also use this option to
- # include methods that should be indexed as fields
- #
- # class Movie < ActiveRecord::Base
- # acts_as_solr :fields => [:name, :description, :current_time]
- # def current_time
- # Time.now.to_s
- # end
- # end
- #
- # Each field passed can also be a hash with the value being a field type
- #
- # class Electronic < ActiveRecord::Base
- # acts_as_solr :fields => [{:price => :range_float}]
- # def current_time
- # Time.now
- # end
- # end
- #
- # The field types accepted are:
- #
- # :float:: Index the field value as a float (ie.: 12.87)
- # :integer:: Index the field value as an integer (ie.: 31)
- # :boolean:: Index the field value as a boolean (ie.: true/false)
- # :date:: Index the field value as a date (ie.: Wed Nov 15 23:13:03 PST 2006)
- # :string:: Index the field value as a text string, not applying the same indexing
- # filters as a regular text field
- # :range_integer:: Index the field value for integer range queries (ie.:[5 TO 20])
- # :range_float:: Index the field value for float range queries (ie.:[14.56 TO 19.99])
- #
- # Setting the field type preserves its original type when indexed
- #
- # additional_fields:: This option takes fields to be include in the index
- # in addition to those derived from the database. You
- # can also use this option to include custom fields
- # derived from methods you define. This option will be
- # ignored if the :fields option is given. It also accepts
- # the same field types as the option above
- #
- # class Movie < ActiveRecord::Base
- # acts_as_solr :additional_fields => [:current_time]
- # def current_time
- # Time.now.to_s
- # end
- # end
- #
- # exclude_fields:: This option taks an array of fields that should be ignored from indexing:
- #
- # class User < ActiveRecord::Base
- # acts_as_solr :exclude_fields => [:password, :login, :credit_card_number]
- # end
- #
- # include:: This option can be used for association indexing, which
- # means you can include any :has_one, :has_many, :belongs_to
- # and :has_and_belongs_to_many association to be indexed:
- #
- # class Category < ActiveRecord::Base
- # has_many :books
- # acts_as_solr :include => [:books]
- # end
- #
- # facets:: This option can be used to specify the fields you'd like to
- # index as facet fields
- #
- # class Electronic < ActiveRecord::Base
- # acts_as_solr :facets => [:category, :manufacturer]
- # end
- #
- # boost:: You can pass a boost (float) value that will be used to boost the document and/or a field:
- #
- # class Electronic < ActiveRecord::Base
- # acts_as_solr :fields => [{:price => {:boost => 5.0}}], :boost => 10.0
- # end
- #
- # if:: Only indexes the record if the condition evaluated is true. The argument has to be
- # either a symbol, string (to be eval'ed), proc/method, or class implementing a static
- # validation method. It behaves the same way as ActiveRecord's :if option.
- #
- # class Electronic < ActiveRecord::Base
- # acts_as_solr :if => proc{|record| record.is_active?}
- # end
- #
- # auto_commit:: The commit command will be sent to Solr only if its value is set to true:
- #
- # class Author < ActiveRecord::Base
- # acts_as_solr :auto_commit => false
- # end
- #
- def acts_as_solr(options={}, solr_options={})
-
- extend ClassMethods
- include InstanceMethods
- include CommonMethods
- include ParserMethods
-
- cattr_accessor :configuration
- cattr_accessor :solr_configuration
-
- self.configuration = {
- :fields => nil,
- :additional_fields => nil,
- :exclude_fields => [],
- :auto_commit => true,
- :include => nil,
- :facets => nil,
- :boost => nil,
- :if => "true"
- }
- self.solr_configuration = {
- :type_field => "type_s", # was type_t in original, but that breaks highlighting as words in class names get highlighted
- :primary_key_field => "pk_i",
- :default_boost => 1.0
- }
-
- configuration.update(options) if options.is_a?(Hash)
- solr_configuration.update(solr_options) if solr_options.is_a?(Hash)
- Deprecation.validate_index(configuration)
-
- configuration[:solr_fields] = []
-
- after_save :solr_save
- after_destroy :solr_destroy
-
- if configuration[:fields].respond_to?(:each)
- process_fields(configuration[:fields])
- else
- process_fields(self.new.attributes.keys.map { |k| k.to_sym })
- process_fields(configuration[:additional_fields])
- end
-
- end
-
- private
- def get_field_value(field)
- configuration[:solr_fields] << field
- type = field.is_a?(Hash) ? field.values[0] : nil
- field = field.is_a?(Hash) ? field.keys[0] : field
- define_method("#{field}_for_solr".to_sym) do
- begin
- value = self[field] || self.instance_variable_get("@#{field.to_s}".to_sym) || self.send(field.to_sym)
- case type
- # format dates properly; return nil for nil dates
- when :date: value ? value.utc.strftime("%Y-%m-%dT%H:%M:%SZ") : nil
- else value
- end
- rescue
- value = ''
- logger.debug "There was a problem getting the value for the field '#{field}': #{$!}"
- end
- end
- end
-
- def process_fields(raw_field)
- if raw_field.respond_to?(:each)
- raw_field.each do |field|
- next if configuration[:exclude_fields].include?(field)
- get_field_value(field)
- end
- end
- end
-
- end
-end
diff --git a/vendor/plugins/acts_as_solr/lib/class_methods.rb b/vendor/plugins/acts_as_solr/lib/class_methods.rb
deleted file mode 100644
index a3e31726b..000000000
--- a/vendor/plugins/acts_as_solr/lib/class_methods.rb
+++ /dev/null
@@ -1,149 +0,0 @@
-require File.dirname(__FILE__) + '/common_methods'
-require File.dirname(__FILE__) + '/parser_methods'
-
-module ActsAsSolr #:nodoc:
-
- module ClassMethods
- include CommonMethods
- include ParserMethods
-
- # Finds instances of a model. Terms are ANDed by default, can be overwritten
- # by using OR between terms
- #
- # Here's a sample (untested) code for your controller:
- #
- # def search
- # results = Book.find_by_solr params[:query]
- # end
- #
- # You can also search for specific fields by searching for 'field:value'
- #
- # ====options:
- # offset:: - The first document to be retrieved (offset)
- # limit:: - The number of rows per page
- # order:: - Orders (sort by) the result set using a given criteria:
- #
- # Book.find_by_solr 'ruby', :order => 'description asc'
- #
- # field_types:: This option is deprecated and will be obsolete by version 1.0.
- # There's no need to specify the :field_types anymore when doing a
- # search in a model that specifies a field type for a field. The field
- # types are automatically traced back when they're included.
- #
- # class Electronic < ActiveRecord::Base
- # acts_as_solr :fields => [{:price => :range_float}]
- # end
- #
- # facets:: This option argument accepts the following arguments:
- # fields:: The fields to be included in the faceted search (Solr's facet.field)
- # query:: The queries to be included in the faceted search (Solr's facet.query)
- # zeros:: Display facets with count of zero. (true|false)
- # sort:: Sorts the faceted resuls by highest to lowest count. (true|false)
- # browse:: This is where the 'drill-down' of the facets work. Accepts an array of
- # fields in the format "facet_field:term"
- #
- # Example:
- #
- # Electronic.find_by_solr "memory", :facets => {:zeros => false, :sort => true,
- # :query => ["price:[* TO 200]",
- # "price:[200 TO 500]",
- # "price:[500 TO *]"],
- # :fields => [:category, :manufacturer],
- # :browse => ["category:Memory","manufacturer:Someone"]}
- #
- # scores:: If set to true this will return the score as a 'solr_score' attribute
- # for each one of the instances found. Does not currently work with find_id_by_solr
- #
- # books = Book.find_by_solr 'ruby OR splinter', :scores => true
- # books.records.first.solr_score
- # => 1.21321397
- # books.records.last.solr_score
- # => 0.12321548
- #
- def find_by_solr(query, options={})
- data = parse_query(query, options)
- return parse_results(data, options) if data
- end
-
- # Finds instances of a model and returns an array with the ids:
- # Book.find_id_by_solr "rails" => [1,4,7]
- # The options accepted are the same as find_by_solr
- #
- def find_id_by_solr(query, options={})
- data = parse_query(query, options)
- return parse_results(data, {:format => :ids}) if data
- end
-
- # This method can be used to execute a search across multiple models:
- # Book.multi_solr_search "Napoleon OR Tom", :models => [Movie]
- #
- # ====options:
- # Accepts the same options as find_by_solr plus:
- # models:: The additional models you'd like to include in the search
- # results_format:: Specify the format of the results found
- # :objects :: Will return an array with the results being objects (default). Example:
- # Book.multi_solr_search "Napoleon OR Tom", :models => [Movie], :results_format => :objects
- # :ids :: Will return an array with the ids of each entry found. Example:
- # Book.multi_solr_search "Napoleon OR Tom", :models => [Movie], :results_format => :ids
- # => [{"id" => "Movie:1"},{"id" => Book:1}]
- # Where the value of each array is as Model:instance_id
- #
- def multi_solr_search(query, options = {})
- models = "AND (#{solr_configuration[:type_field]}:#{self.name}"
- options[:models].each{|m| models << " OR #{solr_configuration[:type_field]}:"+m.to_s} if options[:models].is_a?(Array)
- options.update(:results_format => :objects) unless options[:results_format]
- data = parse_query(query, options, models<<")")
-
- return multi_parse_results(data, options) if data
- end
-
- # returns the total number of documents found in the query specified:
- # Book.count_by_solr 'rails' => 3
- #
- def count_by_solr(query, options = {})
- data = parse_query(query, options)
- data.total_hits
- end
-
- # It's used to rebuild the Solr index for a specific model.
- # Book.rebuild_solr_index
- #
- # If batch_size is greater than 0, adds will be done in batches.
- # NOTE: If using sqlserver, be sure to use a finder with an explicit order.
- # Non-edge versions of rails do not handle pagination correctly for sqlserver
- # without an order clause.
- #
- # If a finder block is given, it will be called to retrieve the items to index.
- # This can be very useful for things such as updating based on conditions or
- # using eager loading for indexed associations.
- def rebuild_solr_index(batch_size=0, &finder)
- finder ||= lambda { |ar, options| ar.find(:all, options.merge({:order => self.primary_key})) }
-
- if batch_size > 0
- items_processed = 0
- limit = batch_size
- offset = 0
- begin
- items = finder.call(self, {:limit => limit, :offset => offset})
- add_batch = items.collect { |content| content.to_solr_doc }
-
- if items.size > 0
- solr_add add_batch
- solr_commit
- end
-
- items_processed += items.size
- logger.debug "#{items_processed} items for #{self.name} have been batch added to index."
- offset += items.size
- end while items.nil? || items.size > 0
- else
- items = finder.call(self, {})
- items.each { |content| content.solr_save }
- items_processed = items.size
- end
- solr_optimize
- logger.debug items_processed > 0 ? "Index for #{self.name} has been rebuilt" : "Nothing to index for #{self.name}"
- end
- end
-
-end
diff --git a/vendor/plugins/acts_as_solr/lib/common_methods.rb b/vendor/plugins/acts_as_solr/lib/common_methods.rb
deleted file mode 100644
index 39dd022cd..000000000
--- a/vendor/plugins/acts_as_solr/lib/common_methods.rb
+++ /dev/null
@@ -1,76 +0,0 @@
-module ActsAsSolr #:nodoc:
-
- module CommonMethods
-
- # Converts field types into Solr types
- def get_solr_field_type(field_type)
- if field_type.is_a?(Symbol)
- case field_type
- when :float: return "f"
- when :integer: return "i"
- when :boolean: return "b"
- when :string: return "s"
- when :date: return "d"
- when :range_float: return "rf"
- when :range_integer: return "ri"
- when :facet: return "facet"
- when :text: return "t"
- else
- raise "Unknown field_type symbol: #{field_type}"
- end
- elsif field_type.is_a?(String)
- return field_type
- else
- raise "Unknown field_type class: #{field_type.class}: #{field_type}"
- end
- end
-
- # Sets a default value when value being set is nil.
- def set_value_if_nil(field_type)
- case field_type
- when "b", :boolean: return "false"
- when "s", "t", "d", :date, :string, :text: return ""
- when "f", "rf", :float, :range_float: return 0.00
- when "i", "ri", :integer, :range_integer: return 0
- else
- return ""
- end
- end
-
- # Sends an add command to Solr
- def solr_add(add_xml)
- ActsAsSolr::Post.execute(Solr::Request::AddDocument.new(add_xml))
- end
-
- # Sends the delete command to Solr
- def solr_delete(solr_ids)
- ActsAsSolr::Post.execute(Solr::Request::Delete.new(:id => solr_ids))
- end
-
- # Sends the commit command to Solr
- def solr_commit
- ActsAsSolr::Post.execute(Solr::Request::Commit.new)
- end
-
- # Optimizes the Solr index. Solr says:
- #
- # Optimizations can take nearly ten minutes to run.
- # We are presuming optimizations should be run once following large
- # batch-like updates to the collection and/or once a day.
- #
- # One of the solutions for this would be to create a cron job that
- # runs every day at midnight and optmizes the index:
- # 0 0 * * * /your_rails_dir/script/runner -e production "Model.solr_optimize"
- #
- def solr_optimize
- ActsAsSolr::Post.execute(Solr::Request::Optimize.new)
- end
-
- # Returns the id for the given instance
- def record_id(object)
- eval "object.#{object.class.primary_key}"
- end
-
- end
-
-end \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/lib/deprecation.rb b/vendor/plugins/acts_as_solr/lib/deprecation.rb
deleted file mode 100644
index 94d2194c8..000000000
--- a/vendor/plugins/acts_as_solr/lib/deprecation.rb
+++ /dev/null
@@ -1,61 +0,0 @@
-module ActsAsSolr #:nodoc:
-
- class Post
- def initialize(body, mode = :search)
- @body = body
- @mode = mode
- puts "The method ActsAsSolr::Post.new(body, mode).execute_post is depracated. " +
- "Use ActsAsSolr::Post.execute(body, mode) instead!"
- end
-
- def execute_post
- ActsAsSolr::Post.execute(@body, @mode)
- end
- end
-
- module ClassMethods
- def find_with_facet(query, options={})
- Deprecation.plog "The method find_with_facet is deprecated. Use find_by_solr instead, passing the " +
- "arguments the same way you used to do with find_with_facet."
- find_by_solr(query, options)
- end
- end
-
- class Deprecation
- # Validates the options passed during query
- def self.validate_query options={}
- if options[:field_types]
- plog "The option :field_types for searching is deprecated. " +
- "The field types are automatically traced back when you specify a field type in your model."
- end
- if options[:sort_by]
- plog "The option :sort_by is deprecated, use :order instead!"
- options[:order] ||= options[:sort_by]
- end
- if options[:start]
- plog "The option :start is deprecated, use :offset instead!"
- options[:offset] ||= options[:start]
- end
- if options[:rows]
- plog "The option :rows is deprecated, use :limit instead!"
- options[:limit] ||= options[:rows]
- end
- end
-
- # Validates the options passed during indexing
- def self.validate_index options={}
- if options[:background]
- plog "The :background option is being deprecated. There are better and more efficient " +
- "ways to handle delayed saving of your records."
- end
- end
-
- # This will print the text to stdout and log the text
- # if rails logger is available
- def self.plog text
- puts text
- RAILS_DEFAULT_LOGGER.warn text if defined? RAILS_DEFAULT_LOGGER
- end
- end
-
-end
diff --git a/vendor/plugins/acts_as_solr/lib/instance_methods.rb b/vendor/plugins/acts_as_solr/lib/instance_methods.rb
deleted file mode 100644
index c53df94f3..000000000
--- a/vendor/plugins/acts_as_solr/lib/instance_methods.rb
+++ /dev/null
@@ -1,139 +0,0 @@
-module ActsAsSolr #:nodoc:
-
- module InstanceMethods
-
- # Solr id is <class.name>:<id> to be unique across all models
- def solr_id
- "#{self.class.name}:#{record_id(self)}"
- end
-
- # saves to the Solr index
- def solr_save
- return true unless configuration[:if]
- if evaluate_condition(configuration[:if], self)
- logger.debug "solr_save: #{self.class.name} : #{record_id(self)}"
- solr_add to_solr_doc
- solr_commit if configuration[:auto_commit]
- true
- else
- solr_destroy
- end
- end
-
- # remove from index
- def solr_destroy
- logger.debug "solr_destroy: #{self.class.name} : #{record_id(self)}"
- solr_delete solr_id
- solr_commit if configuration[:auto_commit]
- true
- end
-
- # convert instance to Solr document
- def to_solr_doc
- logger.debug "to_solr_doc: creating doc for class: #{self.class.name}, id: #{record_id(self)}"
- doc = Solr::Document.new
- doc.boost = validate_boost(configuration[:boost]) if configuration[:boost]
-
- doc << {:id => solr_id,
- solr_configuration[:type_field] => self.class.name,
- solr_configuration[:primary_key_field] => record_id(self).to_s}
-
- # iterate through the fields and add them to the document,
- configuration[:solr_fields].each do |field|
- field_name = field
- field_type = configuration[:facets] && configuration[:facets].include?(field) ? :facet : :text
- field_boost= solr_configuration[:default_boost]
-
- if field.is_a?(Hash)
- field_name = field.keys.pop
- if field.values.pop.respond_to?(:each_pair)
- attributes = field.values.pop
- field_type = get_solr_field_type(attributes[:type]) if attributes[:type]
- field_boost= attributes[:boost] if attributes[:boost]
- else
- field_type = get_solr_field_type(field.values.pop)
- field_boost= field[:boost] if field[:boost]
- end
- end
- value = self.send("#{field_name}_for_solr")
- value = set_value_if_nil(field_type) if value.to_s == ""
-
- # add the field to the document, but only if it's not the id field
- # or the type field (from single table inheritance), since these
- # fields have already been added above.
- if field_name.to_s != self.class.primary_key and field_name.to_s != "type"
- suffix = get_solr_field_type(field_type)
- # This next line ensures that e.g. nil dates are excluded from the
- # document, since they choke Solr. Also ignores e.g. empty strings,
- # but these can't be searched for anyway:
- # http://www.mail-archive.com/solr-dev@lucene.apache.org/msg05423.html
- next if value.nil? || value.to_s.strip.empty?
- [value].flatten.each do |v|
- v = set_value_if_nil(suffix) if value.to_s == ""
- field = Solr::Field.new("#{field_name}_#{suffix}" => ERB::Util.html_escape(v.to_s))
- field.boost = validate_boost(field_boost)
- doc << field
- end
- end
- end
-
- add_includes(doc) if configuration[:include]
- logger.debug doc.to_xml.to_s
- return doc
- end
-
- private
- def add_includes(doc)
- if configuration[:include].is_a?(Array)
- configuration[:include].each do |association|
- data = ""
- klass = association.to_s.singularize
- case self.class.reflect_on_association(association).macro
- when :has_many, :has_and_belongs_to_many
- records = self.send(association).to_a
- unless records.empty?
- records.each{|r| data << r.attributes.inject([]){|k,v| k << "#{v.first}=#{ERB::Util.html_escape(v.last)}"}.join(" ")}
- doc["#{klass}_t"] = data
- end
- when :has_one, :belongs_to
- record = self.send(association)
- unless record.nil?
- data = record.attributes.inject([]){|k,v| k << "#{v.first}=#{ERB::Util.html_escape(v.last)}"}.join(" ")
- doc["#{klass}_t"] = data
- end
- end
- end
- end
- end
-
- def validate_boost(boost)
- if boost.class != Float || boost < 0
- logger.warn "The boost value has to be a float and posisive, but got #{boost}. Using default boost value."
- return solr_configuration[:default_boost]
- end
- boost
- end
-
- def condition_block?(condition)
- condition.respond_to?("call") && (condition.arity == 1 || condition.arity == -1)
- end
-
- def evaluate_condition(condition, field)
- case condition
- when Symbol: field.send(condition)
- when String: eval(condition, binding)
- else
- if condition_block?(condition)
- condition.call(field)
- else
- raise(
- ArgumentError,
- "The :if option has to be either a symbol, string (to be eval'ed), proc/method, or " +
- "class implementing a static validation method"
- )
- end
- end
- end
-
- end
-end
diff --git a/vendor/plugins/acts_as_solr/lib/parser_methods.rb b/vendor/plugins/acts_as_solr/lib/parser_methods.rb
deleted file mode 100644
index 7a112618a..000000000
--- a/vendor/plugins/acts_as_solr/lib/parser_methods.rb
+++ /dev/null
@@ -1,215 +0,0 @@
-module ActsAsSolr #:nodoc:
-
- module ParserMethods
-
- protected
-
- # Method used by mostly all the ClassMethods when doing a search
- def parse_query(query=nil, options={}, models=nil)
- valid_options = [:offset, :limit, :facets, :models, :results_format, :order, :scores, :operator, :highlight, :include]
- query_options = {}
- return if query.nil?
- raise "Invalid parameters: #{(options.keys - valid_options).join(',')}" unless (options.keys - valid_options).empty?
- begin
- Deprecation.validate_query(options)
- query_options[:start] = options[:offset]
- query_options[:rows] = options[:limit]
- query_options[:operator] = options[:operator]
-
- # first steps on the facet parameter processing
- if options[:facets]
- query_options[:facets] = {}
- query_options[:facets][:limit] = -1 # TODO: make this configurable
- query_options[:facets][:sort] = :count if options[:facets][:sort]
- query_options[:facets][:mincount] = 0
- query_options[:facets][:mincount] = 1 if options[:facets][:zeros] == false
- query_options[:facets][:fields] = options[:facets][:fields].collect{|k| "#{k}_facet"} if options[:facets][:fields]
- query_options[:filter_queries] = replace_types(options[:facets][:browse].collect{|k| "#{k.sub!(/ *: */,"_facet:")}"}) if options[:facets][:browse]
- query_options[:facets][:queries] = replace_types(options[:facets][:query].collect{|k| "#{k.sub!(/ *: */,"_t:")}"}) if options[:facets][:query]
- end
-
- if models.nil?
- # TODO: use a filter query for type, allowing Solr to cache it individually
- models = "AND #{solr_configuration[:type_field]}:#{self.name}"
- field_list = solr_configuration[:primary_key_field]
- else
- field_list = "id"
- end
-
- query_options[:field_list] = [field_list, 'score']
- if query.strip.empty? # make it work with empty queries
- models.sub!("AND ", "")
- query = models
- else
- query = "(#{query.gsub(/ *: */,"_t:")})"
- query = query + " #{models}"
- end
- order = options[:order].split(/\s*,\s*/).collect{|e| e.gsub(/\s+/,'_t ').gsub(/\bscore_t\b/, 'score') }.join(',') if options[:order]
- query_options[:query] = replace_types([query])[0] # TODO adjust replace_types to work with String or Array
-
- if options[:highlight]
- query_options[:highlighting] = {}
- query_options[:highlighting][:field_list] = []
- query_options[:highlighting][:field_list] << options[:highlight][:fields].collect {|k| "#{k}_t"} if options[:highlight][:fields]
- query_options[:highlighting][:require_field_match] = options[:highlight][:require_field_match] if options[:highlight][:require_field_match]
- query_options[:highlighting][:max_snippets] = options[:highlight][:max_snippets] if options[:highlight][:max_snippets]
- query_options[:highlighting][:fragsize] = options[:highlight][:fragsize] if options[:highlight][:fragsize]
- query_options[:highlighting][:prefix] = options[:highlight][:prefix] if options[:highlight][:prefix]
- query_options[:highlighting][:suffix] = options[:highlight][:suffix] if options[:highlight][:suffix]
- end
-
- if options[:order]
- # TODO: set the sort parameter instead of the old ;order. style.
- query_options[:query] << ';' << replace_types([order], false)[0]
- end
-
- ActsAsSolr::Post.execute(Solr::Request::Standard.new(query_options))
- rescue
- raise "There was a problem executing your search: #{$!}"
- end
- end
-
- # Parses the data returned from Solr
- def parse_results(solr_data, options = {})
- results = {
- :docs => [],
- :total => 0
- }
- configuration = {
- :format => :objects
- }
- results.update(:facets => {'facet_fields' => []}) if options[:facets]
- return SearchResults.new(results) if solr_data.total == 0
-
- configuration.update(options) if options.is_a?(Hash)
-
- ids = solr_data.docs.collect {|doc| doc["#{solr_configuration[:primary_key_field]}"]}.flatten
- conditions = [ "#{self.table_name}.#{primary_key} in (?)", ids ]
- result = configuration[:format] == :objects ? reorder(self.find(:all, :conditions => conditions), ids) : ids
- add_scores(result, solr_data) if configuration[:format] == :objects && options[:scores]
- highlighted = {}
- solr_data.highlighting.map do |x,y|
- e={}
- y1=y.map{|x1,y1| e[x1.gsub(/_[^_]*/,"")]=y1} unless y.nil?
- highlighted[x.gsub(/[^:]*:/,"").to_i]=e
- end unless solr_data.highlighting.nil?
-
- results.update(:facets => solr_data.data['facet_counts']) if options[:facets]
- results.update({:docs => result, :total => solr_data.total, :max_score => solr_data.max_score})
- results.update({:highlights=>highlighted})
- SearchResults.new(results)
- end
- # Reorders the instances keeping the order returned from Solr
- def reorder(things, ids)
- ordered_things = []
- ids.each do |id|
- record = things.find {|thing| record_id(thing).to_s == id.to_s}
- raise "Out of sync! The id #{id} is in the Solr index but missing in the database!" unless record
- ordered_things << record
- end
- ordered_things
- end
-
-
- # Parses the data returned from Solr
- # XXX can be merged with parse_results
- def multi_parse_results(solr_data, options = {})
- results = {
- :docs => [],
- :total => 0
- }
- configuration = {
- :format => :objects
- }
- results.update(:facets => {'facet_fields' => []}) if options[:facets]
- return SearchResults.new(results) if solr_data.total == 0
-
- configuration.update(options) if options.is_a?(Hash)
-
- result = []
- docs = solr_data.docs
- if options[:results_format] == :objects
- # NOTE: All this bit is new, by mySociety, to reduce number of SQL queries
- # find all ids for each class
- lhash = {}
- lhash.default = []
- for doc in docs
- k = doc.fetch('id').to_s.split(':')
- lhash[k[0]] = lhash[k[0]] + [k[1]]
- end
- # for each class, look up all ids
- chash = {}
- for cls, ids in lhash
- conditions = [ "#{cls.constantize.table_name}.#{primary_key} in (?)", ids ]
- found = reorder(cls.constantize.find(:all, :conditions => conditions, :include => options[:include][cls.to_sym]), ids)
- for f in found
- chash[[cls, f.id]] = f
- end
- end
- # now get them in right order again
- docs.each{|doc| k = doc.fetch('id').to_s.split(':'); result << chash[[k[0], k[1].to_i]]}
- elsif options[:results_format] == :ids
- docs.each{|doc| result << {"id"=>doc.values.pop.to_s}}
- end
-
- #ids = solr_data.docs.collect {|doc| doc["#{solr_configuration[:primary_key_field]}"]}.flatten
- #conditions = [ "#{self.table_name}.#{primary_key} in (?)", ids ]
- #result = configuration[:format] == :objects ? reorder(self.find(:all, :conditions => conditions), ids) : ids
-
- add_scores(result, solr_data) if configuration[:format] == :objects && options[:scores]
- highlighted = {}
- solr_data.highlighting.map do |x,y|
- e={}
- y1=y.map{|x1,y1| e[x1.gsub(/_[^_]*/,"")]=y1} unless y.nil?
- classname=x.gsub(/:[^:]*/,"")
- id = x.gsub(/[^:]*:/,"").to_i
- if highlighted[classname].nil?
- highlighted[classname] = {}
- end
- highlighted[classname][id]=e
- end unless solr_data.highlighting.nil?
-
- results.update(:facets => solr_data.data['facet_counts']) if options[:facets]
- results.update({:docs => result, :total => solr_data.total, :max_score => solr_data.max_score})
- results.update({:highlights=>highlighted})
- SearchResults.new(results)
- end
-
- # Replaces the field types based on the types (if any) specified
- # on the acts_as_solr call
- def replace_types(strings, include_colon=true)
- suffix = include_colon ? ":" : ""
- if configuration[:solr_fields] && configuration[:solr_fields].is_a?(Array)
- configuration[:solr_fields].each do |solr_field|
- field_type = get_solr_field_type(:text)
- if solr_field.is_a?(Hash)
- solr_field.each do |name,value|
- if value.respond_to?(:each_pair)
- field_type = get_solr_field_type(value[:type]) if value[:type]
- else
- field_type = get_solr_field_type(value)
- end
- field = "#{name.to_s}_#{field_type}#{suffix}"
- strings.each_with_index {|s,i| strings[i] = s.gsub(/#{name.to_s}_t#{suffix}/,field) }
- end
- end
- end
- end
- strings
- end
-
- # Adds the score to each one of the instances found
- def add_scores(results, solr_data)
- with_score = []
- solr_data.docs.each do |doc|
- with_score.push([doc["score"],
- results.find {|record| record_id(record).to_s == doc["#{solr_configuration[:primary_key_field]}"].to_s }])
- end
- with_score.each do |score,object|
- class <<object; attr_accessor :solr_score; end
- object.solr_score = score
- end
- end
- end
-
-end
diff --git a/vendor/plugins/acts_as_solr/lib/search_results.rb b/vendor/plugins/acts_as_solr/lib/search_results.rb
deleted file mode 100644
index 386d5c8e7..000000000
--- a/vendor/plugins/acts_as_solr/lib/search_results.rb
+++ /dev/null
@@ -1,68 +0,0 @@
-module ActsAsSolr #:nodoc:
-
- # TODO: Possibly looking into hooking it up with Solr::Response::Standard
- #
- # Class that returns the search results with four methods.
- #
- # books = Book.find_by_solr 'ruby'
- #
- # the above will return a SearchResults class with 4 methods:
- #
- # docs|results|records: will return an array of records found
- #
- # books.records.empty?
- # => false
- #
- # total|num_found|total_hits: will return the total number of records found
- #
- # books.total
- # => 2
- #
- # facets: will return the facets when doing a faceted search
- #
- # max_score|highest_score: returns the highest score found
- #
- # books.max_score
- # => 1.3213213
- #
- #
- class SearchResults
- def initialize(solr_data={})
- @solr_data = solr_data
- end
-
- # Returns an array with the instances. This method
- # is also aliased as docs and records
- def results
- @solr_data[:docs]
- end
-
- # Returns the total records found. This method is
- # also aliased as num_found and total_hits
- def total
- @solr_data[:total]
- end
-
- # Returns the facets when doing a faceted search
- def facets
- @solr_data[:facets]
- end
-
- # Returns the highest score found. This method is
- # also aliased as highest_score
- def max_score
- @solr_data[:max_score]
- end
-
- # Returns the highlighted fields which one has asked for..
- def highlights
- @solr_data[:highlights]
- end
- alias docs results
- alias records results
- alias num_found total
- alias total_hits total
- alias highest_score max_score
- end
-
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr.rb b/vendor/plugins/acts_as_solr/lib/solr.rb
deleted file mode 100755
index aea686fff..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-module Solr; end
-require 'solr/exception'
-require 'solr/request'
-require 'solr/connection'
-require 'solr/response'
-require 'solr/util'
-require 'solr/xml'
-require 'solr/importer'
-require 'solr/indexer'
diff --git a/vendor/plugins/acts_as_solr/lib/solr/connection.rb b/vendor/plugins/acts_as_solr/lib/solr/connection.rb
deleted file mode 100755
index 963d13627..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/connection.rb
+++ /dev/null
@@ -1,162 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-require 'net/http'
-
-# TODO: add a convenience method to POST a Solr .xml file, like Solr's example post.sh
-
-class Solr::Connection
- attr_reader :url, :autocommit, :connection
-
- # create a connection to a solr instance using the url for the solr
- # application context:
- #
- # conn = Solr::Connection.new("http://example.com:8080/solr")
- #
- # if you would prefer to have all adds/updates autocommitted,
- # use :autocommit => :on
- #
- # conn = Solr::Connection.new('http://example.com:8080/solr',
- # :autocommit => :on)
-
- def initialize(url, opts={})
- @url = URI.parse(url)
- unless @url.kind_of? URI::HTTP
- raise "invalid http url: #{url}"
- end
-
- # TODO: Autocommit seems nice at one level, but it currently is confusing because
- # only calls to Connection#add/#update/#delete, though a Connection#send(AddDocument.new(...))
- # does not autocommit. Maybe #send should check for the request types that require a commit and
- # commit in #send instead of the individual methods?
- @autocommit = opts[:autocommit] == :on
-
- # Not actually opening the connection yet, just setting up the persistent connection.
- @connection = Net::HTTP.new(@url.host, @url.port)
-
- @connection.read_timeout = opts[:timeout] if opts[:timeout]
- end
-
- # add a document to the index. you can pass in either a hash
- #
- # conn.add(:id => 123, :title => 'Tlon, Uqbar, Orbis Tertius')
- #
- # or a Solr::Document
- #
- # conn.add(Solr::Document.new(:id => 123, :title = 'On Writing')
- #
- # true/false will be returned to designate success/failure
-
- def add(doc)
- request = Solr::Request::AddDocument.new(doc)
- response = send(request)
- commit if @autocommit
- return response.ok?
- end
-
- # update a document in the index (really just an alias to add)
-
- def update(doc)
- return add(doc)
- end
-
- # performs a standard query and returns a Solr::Response::Standard
- #
- # response = conn.query('borges')
- #
- # alternative you can pass in a block and iterate over hits
- #
- # conn.query('borges') do |hit|
- # puts hit
- # end
-
- def query(query, options={}, &action)
- # TODO: Shouldn't this return an exception if the Solr status is not ok? (rather than true/false).
- create_and_send_query(Solr::Request::Standard, options.update(:query => query), &action)
- end
-
- def search(query, options={}, &action)
- create_and_send_query(Solr::Request::Dismax, options.update(:query => query), &action)
- end
-
- # sends a commit message to the server
- def commit(options={})
- response = send(Solr::Request::Commit.new(options))
- return response.ok?
- end
-
- # sends an optimize message to the server
- def optimize
- response = send(Solr::Request::Optimize.new)
- return response.ok?
- end
-
- # pings the connection and returns true/false if it is alive or not
- def ping
- begin
- response = send(Solr::Request::Ping.new)
- return response.ok?
- rescue
- return false
- end
- end
-
- # delete a document from the index using the document id
- def delete(document_id)
- response = send(Solr::Request::Delete.new(:id => document_id))
- commit if @autocommit
- response.ok?
- end
-
- # delete using a query
- def delete_by_query(query)
- response = send(Solr::Request::Delete.new(:query => query))
- commit if @autocommit
- response.ok?
- end
-
- def info
- send(Solr::Request::IndexInfo.new)
- end
-
- # send a given Solr::Request and return a RubyResponse or XmlResponse
- # depending on the type of request
- def send(request)
- data = post(request)
- Solr::Response::Base.make_response(request, data)
- end
-
- # send the http post request to solr; for convenience there are shortcuts
- # to some requests: add(), query(), commit(), delete() or send()
- def post(request)
- response = @connection.post(@url.path + "/" + request.handler,
- request.to_s,
- { "Content-Type" => request.content_type })
-
- case response
- when Net::HTTPSuccess then response.body
- else
- response.error!
- end
-
- end
-
-private
-
- def create_and_send_query(klass, options = {}, &action)
- request = klass.new(options)
- response = send(request)
- return response unless action
- response.each {|hit| action.call(hit)}
- end
-
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/document.rb b/vendor/plugins/acts_as_solr/lib/solr/document.rb
deleted file mode 100644
index ba03efd6b..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/document.rb
+++ /dev/null
@@ -1,73 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-require 'solr/xml'
-require 'solr/field'
-
-class Solr::Document
- include Enumerable
- attr_accessor :boost
-
- # Create a new Solr::Document, optionally passing in a hash of
- # key/value pairs for the fields
- #
- # doc = Solr::Document.new(:creator => 'Jorge Luis Borges')
- def initialize(hash={})
- @fields = []
- self << hash
- end
-
- # Append a Solr::Field
- #
- # doc << Solr::Field.new(:creator => 'Jorge Luis Borges')
- #
- # If you are truly lazy you can simply pass in a hash:
- #
- # doc << {:creator => 'Jorge Luis Borges'}
- def <<(fields)
- case fields
- when Hash
- fields.each_pair do |name,value|
- if value.respond_to?(:each) && !value.is_a?(String)
- value.each {|v| @fields << Solr::Field.new(name => v)}
- else
- @fields << Solr::Field.new(name => value)
- end
- end
- when Solr::Field
- @fields << fields
- else
- raise "must pass in Solr::Field or Hash"
- end
- end
-
- # shorthand to allow hash lookups
- # doc['name']
- def [](name)
- field = @fields.find {|f| f.name == name.to_s}
- return field.value if field
- return nil
- end
-
- # shorthand to assign as a hash
- def []=(name,value)
- @fields << Solr::Field.new(name => value)
- end
-
- # convert the Document to a REXML::Element
- def to_xml
- e = Solr::XML::Element.new 'doc'
- e.attributes['boost'] = @boost.to_s if @boost
- @fields.each {|f| e.add_element(f.to_xml)}
- return e
- end
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/exception.rb b/vendor/plugins/acts_as_solr/lib/solr/exception.rb
deleted file mode 100644
index a439e6728..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/exception.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-class Solr::Exception < Exception; end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/field.rb b/vendor/plugins/acts_as_solr/lib/solr/field.rb
deleted file mode 100644
index 0731d0e0a..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/field.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-require 'solr/xml'
-require 'time'
-
-class Solr::Field
- VALID_PARAMS = [:boost]
- attr_accessor :name
- attr_accessor :value
- attr_accessor :boost
-
- # Accepts an optional <tt>:boost</tt> parameter, used to boost the relevance of a particular field.
- def initialize(params)
- @boost = params[:boost]
- name_key = (params.keys - VALID_PARAMS).first
- @name, @value = name_key.to_s, params[name_key]
- # Convert any Time values into UTC/XML schema format (which Solr requires).
- @value = @value.respond_to?(:utc) ? @value.utc.xmlschema : @value.to_s
- end
-
- def to_xml
- e = Solr::XML::Element.new 'field'
- e.attributes['name'] = @name
- e.attributes['boost'] = @boost.to_s if @boost
- e.text = @value
- return e
- end
-
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/importer.rb b/vendor/plugins/acts_as_solr/lib/solr/importer.rb
deleted file mode 100755
index d607b2c39..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/importer.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-module Solr; module Importer; end; end
-require 'solr/importer/mapper'
-require 'solr/importer/array_mapper'
-require 'solr/importer/delimited_file_source'
-require 'solr/importer/hpricot_mapper'
-require 'solr/importer/xpath_mapper'
-require 'solr/importer/solr_source' \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/lib/solr/importer/array_mapper.rb b/vendor/plugins/acts_as_solr/lib/solr/importer/array_mapper.rb
deleted file mode 100755
index abef90755..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/importer/array_mapper.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-
-class Solr::Importer::ArrayMapper < Solr::Importer::Mapper
- # TODO document that initializer takes an array of Mappers [mapper1, mapper2, ... mapperN]
-
- # TODO: make merge conflict handling configurable. as is, the last map fields win.
- def map(orig_data_array)
- mapped_data = {}
- orig_data_array.each_with_index do |data,i|
- mapped_data.merge!(@mapping[i].map(data))
- end
- mapped_data
- end
-end \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/lib/solr/importer/delimited_file_source.rb b/vendor/plugins/acts_as_solr/lib/solr/importer/delimited_file_source.rb
deleted file mode 100755
index 70f226a2e..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/importer/delimited_file_source.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# For files with the first line containing field names
-# Currently not designed for enormous files, as all lines are
-# read into an array
-class Solr::Importer::DelimitedFileSource
- include Enumerable
-
- def initialize(filename, splitter=/\t/)
- @filename = filename
- @splitter = splitter
- end
-
- def each
- lines = IO.readlines(@filename)
- headers = lines[0].split(@splitter).collect{|h| h.chomp}
-
- lines[1..-1].each do |line|
- data = headers.zip(line.split(@splitter).collect{|s| s.chomp})
- def data.[](key)
- self.assoc(key.to_s)[1]
- end
-
- yield(data)
- end
- end
-
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/importer/hpricot_mapper.rb b/vendor/plugins/acts_as_solr/lib/solr/importer/hpricot_mapper.rb
deleted file mode 100644
index 53a48e431..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/importer/hpricot_mapper.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-begin
- require 'hpricot'
-
- class Solr::Importer::HpricotMapper < Solr::Importer::Mapper
- def field_data(doc, path)
- doc.search(path.to_s).collect { |e| e.inner_html }
- end
- end
-rescue LoadError => e # If we can't load hpricot
- class Solr::Importer::HpricotMapper
- def initialize(mapping, options={})
- raise "Hpricot not installed."
- end
- end
-end \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/lib/solr/importer/mapper.rb b/vendor/plugins/acts_as_solr/lib/solr/importer/mapper.rb
deleted file mode 100755
index d0acae99f..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/importer/mapper.rb
+++ /dev/null
@@ -1,51 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-class Solr::Importer::Mapper
- def initialize(mapping, options={})
- @mapping = mapping
- @options = options
- end
-
- def field_data(orig_data, field_name)
- orig_data[field_name]
- end
-
- def mapped_field_value(orig_data, field_mapping)
- case field_mapping
- when String
- field_mapping
- when Proc
- field_mapping.call(orig_data)
- when Symbol
- field_data(orig_data, @options[:stringify_symbols] ? field_mapping.to_s : field_mapping)
- when Enumerable
- field_mapping.collect {|orig_field_name| mapped_field_value(orig_data, orig_field_name)}.flatten
- else
- raise "Unknown mapping for #{field_mapping}"
- end
- end
-
- def map(orig_data)
- mapped_data = {}
- @mapping.each do |solr_name, field_mapping|
- value = mapped_field_value(orig_data, field_mapping)
- mapped_data[solr_name] = value if value
- end
-
- mapped_data
- end
-
-
-
-
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/importer/solr_source.rb b/vendor/plugins/acts_as_solr/lib/solr/importer/solr_source.rb
deleted file mode 100755
index 11c0fd1c5..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/importer/solr_source.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-require 'solr'
-
-class Solr::Importer::SolrSource
- def initialize(solr_url, query, filter_queries, options={})
- @connection = Solr::Connection.new(solr_url)
- @query = query
- @filter_queries = filter_queries
-
- @page_size = options[:page_size] || 1000
- @field_list = options[:field_list] || ["*"]
- end
-
- def each
- done = false
- start = 0
- until done do
- # request N documents from a starting point
- request = Solr::Request::Standard.new(:query => @query,
- :rows => @page_size,
- :start => start,
- :field_list => @field_list,
- :filter_queries => @filter_queries)
- response = @connection.send(request)
- response.each do |doc|
- yield doc # TODO: perhaps convert to HashWithIndifferentAccess.new(doc), so stringify_keys isn't necessary
- end
- done = start + @page_size >= response.total_hits
- start = start + @page_size
- end
- end
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/importer/xpath_mapper.rb b/vendor/plugins/acts_as_solr/lib/solr/importer/xpath_mapper.rb
deleted file mode 100755
index 772e1c3c1..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/importer/xpath_mapper.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-begin
- require 'xml/libxml'
-
- # For files with the first line containing field names
- class Solr::Importer::XPathMapper < Solr::Importer::Mapper
- def field_data(doc, xpath)
- doc.find(xpath.to_s).collect do |node|
- case node
- when XML::Attr
- node.value
- when XML::Node
- node.content
- end
- end
- end
- end
-rescue LoadError => e # If we can't load libxml
- class Solr::Importer::XPathMapper
- def initialize(mapping, options={})
- raise "libxml not installed"
- end
- end
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/indexer.rb b/vendor/plugins/acts_as_solr/lib/solr/indexer.rb
deleted file mode 100755
index 5210f05a7..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/indexer.rb
+++ /dev/null
@@ -1,52 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-class Solr::Indexer
- attr_reader :solr
-
- # TODO: document options!
- def initialize(data_source, mapper_or_mapping, options={})
- solr_url = options[:solr_url] || ENV["SOLR_URL"] || "http://localhost:8983/solr"
- @solr = Solr::Connection.new(solr_url, options) #TODO - these options contain the solr_url and debug keys also, so tidy up what gets passed
-
- @data_source = data_source
- @mapper = mapper_or_mapping.is_a?(Hash) ? Solr::Importer::Mapper.new(mapper_or_mapping) : mapper_or_mapping
-
- @buffer_docs = options[:buffer_docs]
- @debug = options[:debug]
- end
-
- def index
- buffer = []
- @data_source.each do |record|
- document = @mapper.map(record)
-
- # TODO: check arrity of block, if 3, pass counter as 3rd argument
- yield(record, document) if block_given? # TODO check return of block, if not true then don't index, or perhaps if document.empty?
-
- buffer << document
-
- if !@buffer_docs || buffer.size == @buffer_docs
- add_docs(buffer)
- buffer.clear
- end
- end
- add_docs(buffer) if !buffer.empty?
-
- @solr.commit unless @debug
- end
-
- def add_docs(documents)
- @solr.add(documents) unless @debug
- puts documents.inspect if @debug
- end
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/request.rb b/vendor/plugins/acts_as_solr/lib/solr/request.rb
deleted file mode 100755
index a25aaf434..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/request.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-module Solr; module Request; end; end
-require 'solr/request/add_document'
-require 'solr/request/base'
-require 'solr/request/commit'
-require 'solr/request/delete'
-require 'solr/request/ping'
-require 'solr/request/select'
-require 'solr/request/standard'
-require 'solr/request/dismax'
-require 'solr/request/update'
-require 'solr/request/index_info'
-require 'solr/request/optimize'
diff --git a/vendor/plugins/acts_as_solr/lib/solr/request/add_document.rb b/vendor/plugins/acts_as_solr/lib/solr/request/add_document.rb
deleted file mode 100644
index 82835bc10..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/request/add_document.rb
+++ /dev/null
@@ -1,63 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-require 'solr/xml'
-require 'solr/request/base'
-require 'solr/document'
-require 'solr/request/update'
-
-class Solr::Request::AddDocument < Solr::Request::Update
-
- # create the request, optionally passing in a Solr::Document
- #
- # request = Solr::Request::AddDocument.new doc
- #
- # as a short cut you can pass in a Hash instead:
- #
- # request = Solr::Request.new :creator => 'Jorge Luis Borges'
- #
- # or an array, to add multiple documents at the same time:
- #
- # request = Solr::Request::AddDocument.new([doc1, doc2, doc3])
-
- def initialize(doc={})
- @docs = []
- if doc.is_a?(Array)
- doc.each { |d| add_doc(d) }
- else
- add_doc(doc)
- end
- end
-
- # returns the request as a string suitable for posting
-
- def to_s
- e = Solr::XML::Element.new 'add'
- for doc in @docs
- e.add_element doc.to_xml
- end
- return e.to_s
- end
-
- private
- def add_doc(doc)
- case doc
- when Hash
- @docs << Solr::Document.new(doc)
- when Solr::Document
- @docs << doc
- else
- raise "must pass in Solr::Document or Hash"
- end
- end
-
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/request/base.rb b/vendor/plugins/acts_as_solr/lib/solr/request/base.rb
deleted file mode 100644
index 9ce8d0cfc..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/request/base.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-class Solr::Request::Base
-
-
- #TODO : Add base support for the debugQuery flag, and such that the response provides debug output easily
-
- # returns either :xml or :ruby depending on what the
- # response type is for a given request
-
- def response_format
- raise "unknown request type: #{self.class}"
- end
-
- def content_type
- 'text/xml; charset=utf-8'
- end
-
- # returns the solr handler or url fragment that can
- # respond to this type of request
-
- def handler
- raise "unkown request type: #{self.class}"
- end
-
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/request/commit.rb b/vendor/plugins/acts_as_solr/lib/solr/request/commit.rb
deleted file mode 100644
index bcf1308d8..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/request/commit.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-require 'solr/xml'
-
-class Solr::Request::Commit < Solr::Request::Update
-
- def initialize(options={})
- @wait_searcher = options[:wait_searcher] || true
- @wait_flush = options[:wait_flush] || true
- end
-
-
- def to_s
- e = Solr::XML::Element.new('commit')
- e.attributes['waitSearcher'] = @wait_searcher ? 'true' : 'false'
- e.attributes['waitFlush'] = @wait_flush ? 'true' : 'false'
-
- e.to_s
- end
-
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/request/delete.rb b/vendor/plugins/acts_as_solr/lib/solr/request/delete.rb
deleted file mode 100644
index 916b44ad7..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/request/delete.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-require 'solr/xml'
-
-class Solr::Request::Delete < Solr::Request::Update
-
- # A delete request can be for a specific document id
- #
- # request = Solr::Request::Delete.new(:id => 1234)
- #
- # or by query:
- #
- # request = Solr::Request::Delete.new(:query =>
- #
- def initialize(options)
- unless options.kind_of?(Hash) and (options[:id] or options[:query])
- raise Solr::Exception.new("must pass in :id or :query")
- end
- if options[:id] and options[:query]
- raise Solr::Exception.new("can't pass in both :id and :query")
- end
- @document_id = options[:id]
- @query = options[:query]
- end
-
- def to_s
- delete_element = Solr::XML::Element.new('delete')
- if @document_id
- id_element = Solr::XML::Element.new('id')
- id_element.text = @document_id
- delete_element.add_element(id_element)
- elsif @query
- query = Solr::XML::Element.new('query')
- query.text = @query
- delete_element.add_element(query)
- end
- delete_element.to_s
- end
-end
-
diff --git a/vendor/plugins/acts_as_solr/lib/solr/request/dismax.rb b/vendor/plugins/acts_as_solr/lib/solr/request/dismax.rb
deleted file mode 100644
index 1addb044d..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/request/dismax.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-class Solr::Request::Dismax < Solr::Request::Standard
-
- VALID_PARAMS.replace(VALID_PARAMS + [:tie_breaker, :query_fields, :minimum_match, :phrase_fields, :phrase_slop,
- :boost_query, :boost_functions])
-
- def initialize(params)
- @alternate_query = params.delete(:alternate_query)
- @sort_values = params.delete(:sort)
-
- super(params)
-
- @query_type = "dismax"
- end
-
- def to_hash
- hash = super
- hash[:tie] = @params[:tie_breaker]
- hash[:mm] = @params[:minimum_match]
- hash[:qf] = @params[:query_fields]
- hash[:pf] = @params[:phrase_fields]
- hash[:ps] = @params[:phrase_slop]
- hash[:bq] = @params[:boost_query]
- hash[:bf] = @params[:boost_functions]
- hash["q.alt"] = @alternate_query
- # FIXME: 2007-02-13 <coda.hale@gmail.com> -- This code is duplicated in
- # Solr::Request::Standard. It should be refactored into a single location.
- hash[:sort] = @sort_values.collect do |sort|
- key = sort.keys[0]
- "#{key.to_s} #{sort[key] == :descending ? 'desc' : 'asc'}"
- end.join(',') if @sort_values
- return hash
- end
-
-end \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/lib/solr/request/index_info.rb b/vendor/plugins/acts_as_solr/lib/solr/request/index_info.rb
deleted file mode 100755
index d4eeea54d..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/request/index_info.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-class Solr::Request::IndexInfo < Solr::Request::Select
-
- def handler
- 'admin/luke'
- end
-
- def to_hash
- {:numTerms => 0}.merge(super.to_hash)
- end
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/request/optimize.rb b/vendor/plugins/acts_as_solr/lib/solr/request/optimize.rb
deleted file mode 100755
index 3bd1fc4e4..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/request/optimize.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-require 'solr/xml'
-
-class Solr::Request::Optimize < Solr::Request::Update
-
- def to_s
- Solr::XML::Element.new('optimize').to_s
- end
-
-end \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/lib/solr/request/ping.rb b/vendor/plugins/acts_as_solr/lib/solr/request/ping.rb
deleted file mode 100644
index 6b420bee0..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/request/ping.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# TODO: Consider something lazy like this?
-# Solr::Request::Ping = Solr::Request.simple_request :format=>:xml, :handler=>'admin/ping'
-# class Solr::Request
-# def self.simple_request(options)
-# Class.new do
-# def response_format
-# options[:format]
-# end
-# def handler
-# options[:handler]
-# end
-# end
-# end
-# end
-
-class Solr::Request::Ping < Solr::Request::Base
- def response_format
- :xml
- end
-
- def handler
- 'admin/ping'
- end
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/request/select.rb b/vendor/plugins/acts_as_solr/lib/solr/request/select.rb
deleted file mode 100644
index 6e04deb4b..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/request/select.rb
+++ /dev/null
@@ -1,58 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-require 'erb'
-
-# "Abstract" base class, only useful with subclasses that add parameters
-class Solr::Request::Select < Solr::Request::Base
-
- # TODO add a constant for the all-docs query, which currently is [* TO *]
- # (caveat, that is all docs that have a value in the default field)
- # When the Lucene JAR is upgraded in Solr, the all-docs query becomes simply *
- attr_reader :query_type
-
- def initialize(qt=nil)
- @query_type = qt
- end
-
- def response_format
- :ruby
- end
-
- def handler
- 'select'
- end
-
- def content_type
- 'application/x-www-form-urlencoded; charset=utf-8'
- end
-
- def to_hash
- return {:qt => query_type, :wt => 'ruby'}
- end
-
- def to_s
- raw_params = self.to_hash
-
- http_params = []
- raw_params.each do |key,value|
- if value.respond_to? :each
- value.each { |v| http_params << "#{key}=#{ERB::Util::url_encode(v)}" unless v.nil?}
- else
- http_params << "#{key}=#{ERB::Util::url_encode(value)}" unless value.nil?
- end
- end
-
- http_params.join("&")
- end
-
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/request/standard.rb b/vendor/plugins/acts_as_solr/lib/solr/request/standard.rb
deleted file mode 100755
index ec2dc219e..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/request/standard.rb
+++ /dev/null
@@ -1,108 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-class Solr::Request::Standard < Solr::Request::Select
-
- VALID_PARAMS = [:query, :sort, :default_field, :operator, :start, :rows,
- :filter_queries, :field_list, :debug_query, :explain_other, :facets, :highlighting]
-
- def initialize(params)
- super('standard')
-
- raise "Invalid parameters: #{(params.keys - VALID_PARAMS).join(',')}" unless
- (params.keys - VALID_PARAMS).empty?
-
- raise ":query parameter required" unless params[:query]
-
- @params = params.dup
-
- # Validate operator
- if params[:operator]
- raise "Only :and/:or operators allowed" unless
- [:and, :or].include?(params[:operator])
-
- @params[:operator] = params[:operator].to_s.upcase
- end
-
- # Validate start, rows can be transformed to ints
- @params[:start] = params[:start].to_i if params[:start]
- @params[:rows] = params[:rows].to_i if params[:rows]
-
- @params[:field_list] ||= ["*","score"]
- end
-
- def to_hash
- hash = {}
-
- # standard request param processing
- sort = @params[:sort].collect do |sort|
- key = sort.keys[0]
- "#{key.to_s} #{sort[key] == :descending ? 'desc' : 'asc'}"
- end.join(',') if @params[:sort]
- hash[:q] = sort ? "#{@params[:query]};#{sort}" : @params[:query]
- hash["q.op"] = @params[:operator]
- hash[:df] = @params[:default_field]
-
- # common parameter processing
- hash[:start] = @params[:start]
- hash[:rows] = @params[:rows]
- hash[:fq] = @params[:filter_queries]
- hash[:fl] = @params[:field_list].join(',')
- hash[:debugQuery] = @params[:debug_query]
- hash[:explainOther] = @params[:explain_other]
-
- # facet parameter processing
- if @params[:facets]
- # TODO need validation of all that is under the :facets Hash too
- hash[:facet] = true
- hash["facet.field"] = []
- hash["facet.query"] = @params[:facets][:queries]
- hash["facet.sort"] = (@params[:facets][:sort] == :count) if @params[:facets][:sort]
- hash["facet.limit"] = @params[:facets][:limit]
- hash["facet.missing"] = @params[:facets][:missing]
- hash["facet.mincount"] = @params[:facets][:mincount]
- hash["facet.prefix"] = @params[:facets][:prefix]
- if @params[:facets][:fields] # facet fields are optional (could be facet.query only)
- @params[:facets][:fields].each do |f|
- if f.kind_of? Hash
- key = f.keys[0]
- value = f[key]
- hash["facet.field"] << key
- hash["f.#{key}.facet.sort"] = (value[:sort] == :count) if value[:sort]
- hash["f.#{key}.facet.limit"] = value[:limit]
- hash["f.#{key}.facet.missing"] = value[:missing]
- hash["f.#{key}.facet.mincount"] = value[:mincount]
- hash["f.#{key}.facet.prefix"] = value[:prefix]
- else
- hash["facet.field"] << f
- end
- end
- end
- end
-
- # highlighting parameter processing - http://wiki.apache.org/solr/HighlightingParameters
- #TODO need to add per-field overriding to snippets, fragsize, requiredFieldMatch, formatting, and simple.pre/post
- if @params[:highlighting]
- hash[:hl] = true
- hash["hl.fl"] = @params[:highlighting][:field_list].join(',') if @params[:highlighting][:field_list]
- hash["hl.fragsize"] = @params[:highlighting][:fragsize]
- hash["hl.snippets"] = @params[:highlighting][:max_snippets]
- hash["hl.requireFieldMatch"] = @params[:highlighting][:require_field_match]
- hash["hl.simple.pre"] = @params[:highlighting][:prefix]
- hash["hl.simple.post"] = @params[:highlighting][:suffix]
- end
-
-
- hash.merge(super.to_hash)
- end
-
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/request/update.rb b/vendor/plugins/acts_as_solr/lib/solr/request/update.rb
deleted file mode 100644
index 8bd844886..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/request/update.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# a parent class for all requests that go through the solr update handler
-# TODO: Use new xml update handler for better error responses
-class Solr::Request::Update < Solr::Request::Base
- def response_format
- :xml
- end
-
- def handler
- 'update'
- end
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/response.rb b/vendor/plugins/acts_as_solr/lib/solr/response.rb
deleted file mode 100755
index b14b2c239..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/response.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-module Solr; module Response; end; end
-require 'solr/response/base'
-require 'solr/response/xml'
-require 'solr/response/ruby'
-require 'solr/response/ping'
-require 'solr/response/add_document'
-require 'solr/response/standard'
-require 'solr/response/dismax'
-require 'solr/response/commit'
-require 'solr/response/delete'
-require 'solr/response/index_info'
-require 'solr/response/optimize' \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/lib/solr/response/add_document.rb b/vendor/plugins/acts_as_solr/lib/solr/response/add_document.rb
deleted file mode 100644
index 275a879f3..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/response/add_document.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-class Solr::Response::AddDocument < Solr::Response::Xml
- def initialize(xml)
- super(xml)
- end
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/response/base.rb b/vendor/plugins/acts_as_solr/lib/solr/response/base.rb
deleted file mode 100644
index a66d2a4d4..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/response/base.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-class Solr::Response::Base
- attr_reader :raw_response
-
- def initialize(raw_response)
- @raw_response = raw_response
- end
-
- # factory method for creating a Solr::Response::* from
- # a request and the raw response content
- def self.make_response(request, raw)
-
- # make sure response format seems sane
- unless [:xml, :ruby].include?(request.response_format)
- raise Solr::Exception.new("unknown response format: #{request.response_format}" )
- end
-
- # TODO: Factor out this case... perhaps the request object should provide the response class instead? Or dynamically align by class name?
- # Maybe the request itself could have the response handling features that get mixed in with a single general purpose response object?
-
- begin
- klass = eval(request.class.name.sub(/Request/,'Response'))
- rescue NameError
- raise Solr::Exception.new("unknown request type: #{request.class}")
- else
- klass.new(raw)
- end
-
- end
-
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/response/commit.rb b/vendor/plugins/acts_as_solr/lib/solr/response/commit.rb
deleted file mode 100644
index ff937a36a..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/response/commit.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-require 'rexml/xpath'
-
-class Solr::Response::Commit < Solr::Response::Xml
-end
-
diff --git a/vendor/plugins/acts_as_solr/lib/solr/response/delete.rb b/vendor/plugins/acts_as_solr/lib/solr/response/delete.rb
deleted file mode 100644
index 083612809..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/response/delete.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-class Solr::Response::Delete < Solr::Response::Xml; end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/response/dismax.rb b/vendor/plugins/acts_as_solr/lib/solr/response/dismax.rb
deleted file mode 100644
index d495843bc..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/response/dismax.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-class Solr::Response::Dismax < Solr::Response::Standard
- # no need for special processing
-
- # FIXME: 2007-02-07 <coda.hale@gmail.com> -- The existence of this class indicates that
- # the Request/Response pair architecture is a little hinky. Perhaps we could refactor
- # out some of the most common functionality -- Common Query Parameters, Highlighting Parameters,
- # Simple Facet Parameters, etc. -- into modules?
-end \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/lib/solr/response/index_info.rb b/vendor/plugins/acts_as_solr/lib/solr/response/index_info.rb
deleted file mode 100755
index 1c5be5d3d..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/response/index_info.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-class Solr::Response::IndexInfo < Solr::Response::Ruby
- def initialize(ruby_code)
- super(ruby_code)
- end
-
- def num_docs
- return @data['index']['numDocs']
- end
-
- def field_names
- return @data['fields'].keys
- end
-
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/response/optimize.rb b/vendor/plugins/acts_as_solr/lib/solr/response/optimize.rb
deleted file mode 100755
index 4594d90d0..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/response/optimize.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-class Solr::Response::Optimize < Solr::Response::Commit
-end \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/lib/solr/response/ping.rb b/vendor/plugins/acts_as_solr/lib/solr/response/ping.rb
deleted file mode 100644
index 92fd89303..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/response/ping.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-require 'rexml/xpath'
-
-class Solr::Response::Ping < Solr::Response::Xml
-
- def initialize(xml)
- super(xml)
- @ok = REXML::XPath.first(@doc, './solr/ping') ? true : false
- end
-
- # returns true or false depending on whether the ping
- # was successful or not
- def ok?
- @ok
- end
-
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/response/ruby.rb b/vendor/plugins/acts_as_solr/lib/solr/response/ruby.rb
deleted file mode 100644
index f423aa6c5..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/response/ruby.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-class Solr::Response::Ruby < Solr::Response::Base
- attr_reader :data
-
- def initialize(ruby_code)
- super(ruby_code)
- begin
- #TODO: what about pulling up data/header/response to ResponseBase,
- # or maybe a new middle class like SelectResponseBase since
- # all Select queries return this same sort of stuff??
- # XML (&wt=xml) and Ruby (&wt=ruby) responses contain exactly the same structure.
- # a goal of solrb is to make it irrelevant which gets used under the hood,
- # but favor Ruby responses.
- @data = eval(ruby_code)
- @header = @data['responseHeader']
- raise "response should be a hash" unless @data.kind_of? Hash
- raise "response header missing" unless @header.kind_of? Hash
- rescue SyntaxError => e
- raise Solr::Exception.new("invalid ruby code: #{e}")
- end
- end
-
- def ok?
- @header['status'] == 0
- end
-
- def query_time
- @header['QTime']
- end
-
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/response/standard.rb b/vendor/plugins/acts_as_solr/lib/solr/response/standard.rb
deleted file mode 100644
index 3344c923a..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/response/standard.rb
+++ /dev/null
@@ -1,68 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-class Solr::Response::Standard < Solr::Response::Ruby
- FacetValue = Struct.new(:name, :value)
- include Enumerable
-
- def initialize(ruby_code)
- super(ruby_code)
- @response = @data['response']
- raise "response section missing" unless @response.kind_of? Hash
- end
-
- def total_hits
- @response['numFound']
- end
-
- def start
- @response['start']
- end
-
- def hits
- @response['docs']
- end
-
- def max_score
- @response['maxScore']
- end
-
- def field_facets(field)
- facets = []
- values = @data['facet_counts']['facet_fields'][field]
- Solr::Util.paired_array_each(values) do |key, value|
- facets << FacetValue.new(key, value)
- end
-
- facets
- end
-
- def highlighted(id, field)
- @data['highlighting'][id.to_s][field.to_s] rescue nil
- end
-
- def highlighting
- @data['highlighting']
- end
-
- # supports enumeration of hits
- # TODO revisit - should this iterate through *all* hits by re-requesting more?
- def each
- @response['docs'].each {|hit| yield hit}
- end
-
- alias num_found total_hits
- alias total total_hits
- alias offset start
- alias docs hits
-
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/response/xml.rb b/vendor/plugins/acts_as_solr/lib/solr/response/xml.rb
deleted file mode 100644
index 3e1cc2c81..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/response/xml.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-require 'rexml/document'
-require 'solr/exception'
-
-class Solr::Response::Xml < Solr::Response::Base
- attr_reader :doc, :status_code, :status_message
-
- def initialize(xml)
- super(xml)
- # parse the xml
- @doc = REXML::Document.new(xml)
-
- # look for the result code and string
- # <?xml version="1.0" encoding="UTF-8"?>
- # <response>
- # <lst name="responseHeader"><int name="status">0</int><int name="QTime">2</int></lst>
- # </response>
- result = REXML::XPath.first(@doc, './response/lst[@name="responseHeader"]/int[@name="status"]')
- if result
- @status_code = result.text
- @status_message = result.text # TODO: any need for a message?
- end
- rescue REXML::ParseException => e
- raise Solr::Exception.new("invalid response xml: #{e}")
- end
-
- def ok?
- return @status_code == '0'
- end
-
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/solrtasks.rb b/vendor/plugins/acts_as_solr/lib/solr/solrtasks.rb
deleted file mode 100755
index 3a1f76a54..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/solrtasks.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env ruby
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# TODO: fill out Solr tasks: start, stop, ping, optimize, etc.
-
-require 'rake'
-require 'rake/tasklib'
-
-module Solr
- namespace :solr do
- desc "Start Solr"
- task :start do
- # TODO: actually start it up!
- puts "Starting..."
- end
- end
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/util.rb b/vendor/plugins/acts_as_solr/lib/solr/util.rb
deleted file mode 100755
index a024a1369..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/util.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-class Solr::Util
- # paired_array_each([key1,value1,key2,value2]) yields twice:
- # |key1,value1| and |key2,value2|
- def self.paired_array_each(a, &block)
- 0.upto(a.size / 2 - 1) do |i|
- n = i * 2
- yield(a[n], a[n+1])
- end
- end
-
- # paired_array_to_hash([key1,value1,key2,value2]) => {key1 => value1, key2, value2}
- def self.paired_array_to_hash(a)
- h = {}
-
- paired_array_each(a) do |key,value|
- h[key] = value
- end
-
- h
- end
-
-end
diff --git a/vendor/plugins/acts_as_solr/lib/solr/xml.rb b/vendor/plugins/acts_as_solr/lib/solr/xml.rb
deleted file mode 100644
index 626ecd295..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr/xml.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-module Solr::XML
-end
-
-begin
-
- # If we can load rubygems and libxml-ruby...
- require 'rubygems'
- require 'xml/libxml'
-
- # then make a few modifications to XML::Node so it can stand in for REXML::Element
- class XML::Node
- # element.add_element(another_element) should work
- alias_method :add_element, :<<
-
- # element.attributes['blah'] should work
- def attributes
- self
- end
-
- # element.text = "blah" should work
- def text=(x)
- self << x.to_s
- end
- end
-
- # And use XML::Node for our XML generation
- Solr::XML::Element = XML::Node
-
-rescue LoadError => e # If we can't load either rubygems or libxml-ruby
-
- # Just use REXML.
- require 'rexml/document'
- Solr::XML::Element = REXML::Element
-
-end \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/lib/solr_fixtures.rb b/vendor/plugins/acts_as_solr/lib/solr_fixtures.rb
deleted file mode 100644
index c16781eb8..000000000
--- a/vendor/plugins/acts_as_solr/lib/solr_fixtures.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-module ActsAsSolr
-
- class SolrFixtures
- def self.load(table_names)
- [table_names].flatten.map { |n| n.to_s }.each do |table_name|
- klass = instance_eval(File.split(table_name.to_s).last.to_s.gsub('_',' ').split(" ").collect{|w| w.capitalize}.to_s.singularize)
- klass.rebuild_solr_index if klass.respond_to?(:rebuild_solr_index)
- end
- ActsAsSolr::Post.execute(Solr::Request::Commit.new)
- end
- end
-
-end \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/schema.xml b/vendor/plugins/acts_as_solr/schema.xml
deleted file mode 100644
index e559039b3..000000000
--- a/vendor/plugins/acts_as_solr/schema.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!--
- This is the Solr schema file. This file should be named "schema.xml" and
- should be in the conf directory under the solr home
- (i.e. ./solr/conf/schema.xml by default)
- or located where the classloader for the Solr webapp can find it.
-
- This example schema is the recommended starting point for users.
- It should be kept correct and concise, usable out-of-the-box.
-
- For more information, on how to customize this file, please see
- http://wiki.apache.org/solr/SchemaXml
--->
-
-<schema name="acts_as_solr" version="0.9">
- <types>
- <fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="false"/>
- <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="false"/>
- <fieldType name="integer" class="solr.IntField" omitNorms="false"/>
- <fieldType name="long" class="solr.LongField" omitNorms="false"/>
- <fieldType name="float" class="solr.FloatField" omitNorms="false"/>
- <fieldType name="double" class="solr.DoubleField" omitNorms="false"/>
- <fieldType name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="false"/>
- <fieldType name="slong" class="solr.SortableLongField" sortMissingLast="true" omitNorms="false"/>
- <fieldType name="sfloat" class="solr.SortableFloatField" sortMissingLast="true" omitNorms="false"/>
- <fieldType name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true" omitNorms="false"/>
- <fieldType name="date" class="solr.DateField" sortMissingLast="true" omitNorms="false"/>
- <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
- <analyzer>
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
- </analyzer>
- </fieldType>
-
- <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
- <analyzer type="index">
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
- <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
- <filter class="solr.LowerCaseFilterFactory"/>
- <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
- <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
- </analyzer>
- <analyzer type="query">
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
- <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0"/>
- <filter class="solr.LowerCaseFilterFactory"/>
- <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
- <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
- </analyzer>
- </fieldType>
-
- <fieldType name="textTight" class="solr.TextField" positionIncrementGap="100" >
- <analyzer>
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
- <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
- <filter class="solr.LowerCaseFilterFactory"/>
- <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
- <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
- </analyzer>
- </fieldType>
-
- <fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="false">
- <analyzer>
- <tokenizer class="solr.KeywordTokenizerFactory"/>
- <filter class="solr.LowerCaseFilterFactory" />
- <filter class="solr.TrimFilterFactory" />
- <filter class="solr.PatternReplaceFilterFactory" pattern="([^a-z])" replacement="" replace="all"/>
- </analyzer>
- </fieldType>
-
- <fieldtype name="text_zh" class="solr.TextField">
- <analyzer class="org.apache.lucene.analysis.cn.ChineseAnalyzer"/>
- </fieldtype>
-
- </types>
-
-
- <fields>
- <field name="id" type="string" indexed="true" stored="true" required="true" />
- <field name="pk_i" type="integer" indexed="true" stored="true"/>
- <field name="pk_s" type="string" indexed="true" stored="true"/>
- <field name="text" type="text" indexed="true" stored="false" multiValued="true"/>
-
- <dynamicField name="*_i" type="integer" indexed="true" stored="false"/>
- <dynamicField name="*_t" type="text" indexed="true" stored="false"/>
- <dynamicField name="*_f" type="float" indexed="true" stored="false"/>
- <dynamicField name="*_b" type="boolean" indexed="true" stored="false"/>
- <dynamicField name="*_d" type="date" indexed="true" stored="false"/>
- <dynamicField name="*_s" type="string" indexed="true" stored="false"/>
- <dynamicField name="*_ri" type="sint" indexed="true" stored="false"/>
- <dynamicField name="*_rf" type="sfloat" indexed="true" stored="false"/>
- <dynamicField name="*_facet" type="string" indexed="true" stored="false"/>
- <dynamicField name="*_s_mv" type="string" indexed="true" stored="false" multiValued="true"/>
- <dynamicField name="*_zh_text" type="text_zh" indexed="true" stored="false" multiValued="true"/>
- <dynamicField name="*_display" type="text" indexed="false" stored="true" multiValued="true"/>
- </fields>
-
- <uniqueKey>id</uniqueKey>
- <defaultSearchField>text</defaultSearchField>
-
- <copyField source="*_t" dest="text"/>
- <copyField source="*_facet" dest="text"/>
- <solrQueryParser defaultOperator="AND"/>
-
-</schema>
diff --git a/vendor/plugins/acts_as_solr/solr/.cvsignore b/vendor/plugins/acts_as_solr/solr/.cvsignore
deleted file mode 100644
index a9d864931..000000000
--- a/vendor/plugins/acts_as_solr/solr/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-logs
-tmp
diff --git a/vendor/plugins/acts_as_solr/solr/CHANGES.txt b/vendor/plugins/acts_as_solr/solr/CHANGES.txt
deleted file mode 100644
index da4acb343..000000000
--- a/vendor/plugins/acts_as_solr/solr/CHANGES.txt
+++ /dev/null
@@ -1,562 +0,0 @@
- Apache Solr Version 1.2
- Release Notes
-
-Introduction
-------------
-Apache Solr is an open source enterprise search server based on the Lucene Java
-search library, with XML/HTTP and JSON APIs, hit highlighting, faceted search,
-caching, replication, and a web administration interface. It runs in a Java
-servlet container such as Tomcat.
-
-See http://lucene.apache.org/solr for more information.
-
-
-Getting Started
----------------
-You need a Java 1.5 VM or later installed.
-In this release, there is an example Solr server including a bundled
-servlet container in the directory named "example".
-See the tutorial at http://lucene.apache.org/solr/tutorial.html
-
-
-$Id: CHANGES.txt,v 1.1 2008-02-20 19:13:44 francis Exp $
-
-================== Release 1.2, 20070603 ==================
-
-Upgrading from Solr 1.1
--------------------------------------
-IMPORTANT UPGRADE NOTE: In a master/slave configuration, all searchers/slaves
-should be upgraded before the master! If the master were to be updated
-first, the older searchers would not be able to read the new index format.
-
-Older Apache Solr installations can be upgraded by replacing
-the relevant war file with the new version. No changes to configuration
-files should be needed.
-
-This version of Solr contains a new version of Lucene implementing
-an updated index format. This version of Solr/Lucene can still read
-and update indexes in the older formats, and will convert them to the new
-format on the first index change. One change in the new index format
-is that all "norms" are kept in a single file, greatly reducing the number
-of files per segment. Users of compound file indexes will want to consider
-converting to the non-compound format for faster indexing and slightly better
-search concurrency.
-
-The JSON response format for facets has changed to make it easier for
-clients to retain sorted order. Use json.nl=map explicitly in clients
-to get the old behavior, or add it as a default to the request handler
-in solrconfig.xml
-
-The Lucene based Solr query syntax is slightly more strict.
-A ':' in a field value must be escaped or the whole value must be quoted.
-
-The Solr "Request Handler" framework has been updated in two key ways:
-First, if a Request Handler is registered in solrconfig.xml with a name
-starting with "/" then it can be accessed using path-based URL, instead of
-using the legacy "/select?qt=name" URL structure. Second, the Request
-Handler framework has been extended making it possible to write Request
-Handlers that process streams of data for doing updates, and there is a
-new-style Request Handler for XML updates given the name of "/update" in
-the example solrconfig.xml. Existing installations without this "/update"
-handler will continue to use the old update servlet and should see no
-changes in behavior. For new-style update handlers, errors are now
-reflected in the HTTP status code, Content-type checking is more strict,
-and the response format has changed and is controllable via the wt
-parameter.
-
-
-
-Detailed Change List
---------------------
-
-New Features
- 1. SOLR-82: Default field values can be specified in the schema.xml.
- (Ryan McKinley via hossman)
-
- 2. SOLR-89: Two new TokenFilters with corresponding Factories...
- * TrimFilter - Trims leading and trailing whitespace from Tokens
- * PatternReplaceFilter - applies a Pattern to each token in the
- stream, replacing match occurances with a specified replacement.
- (hossman)
-
- 3. SOLR-91: allow configuration of a limit of the number of searchers
- that can be warming in the background. This can be used to avoid
- out-of-memory errors, or contention caused by more and more searchers
- warming in the background. An error is thrown if the limit specified
- by maxWarmingSearchers in solrconfig.xml is exceeded. (yonik)
-
- 4. SOLR-106: New faceting parameters that allow specification of a
- minimum count for returned facets (facet.mincount), paging through facets
- (facet.offset, facet.limit), and explicit sorting (facet.sort).
- facet.zeros is now deprecated. (yonik)
-
- 5. SOLR-80: Negative queries are now allowed everywhere. Negative queries
- are generated and cached as their positive counterpart, speeding
- generation and generally resulting in smaller sets to cache.
- Set intersections in SolrIndexSearcher are more efficient,
- starting with the smallest positive set, subtracting all negative
- sets, then intersecting with all other positive sets. (yonik)
-
- 6. SOLR-117: Limit a field faceting to constraints with a prefix specified
- by facet.prefix or f.<field>.facet.prefix. (yonik)
-
- 7. SOLR-107: JAVA API: Change NamedList to use Java5 generics
- and implement Iterable<Map.Entry> (Ryan McKinley via yonik)
-
- 8. SOLR-104: Support for "Update Plugins" -- RequestHandlers that want
- access to streams of data for doing updates. ContentStreams can come
- from the raw POST body, multi-part form data, or remote URLs.
- Included in this change is a new SolrDispatchFilter that allows
- RequestHandlers registered with names that begin with a "/" to be
- accessed using a URL structure based on that name.
- (Ryan McKinley via hossman)
-
- 9. SOLR-126: DirectUpdateHandler2 supports autocommitting after a specified time
- (in ms), using <autoCommit><maxTime>10000</maxTime></autoCommit>.
- (Ryan McKinley via klaas).
-
-10. SOLR-116: IndexInfoRequestHandler added. (Erik Hatcher)
-
-11. SOLR-79: Add system property ${<sys.prop>[:<default>]} substitution for
- configuration files loaded, including schema.xml and solrconfig.xml.
- (Erik Hatcher with inspiration from Andrew Saar)
-
-12. SOLR-149: Changes to make Solr more easily embeddable, in addition
- to logging which request handler handled each request.
- (Ryan McKinley via yonik)
-
-13. SOLR-86: Added standalone Java-based command-line updater.
- (Erik Hatcher via Bertrand Delecretaz)
-
-14. SOLR-152: DisMaxRequestHandler now supports configurable alternate
- behavior when q is not specified. A "q.alt" param can be specified
- using SolrQueryParser syntax as a mechanism for specifying what query
- the dismax handler should execute if the main user query (q) is blank.
- (Ryan McKinley via hossman)
-
-15. SOLR-158: new "qs" (Query Slop) param for DisMaxRequestHandler
- allows for specifying the amount of default slop to use when parsing
- explicit phrase queries from the user.
- (Adam Hiatt via hossman)
-
-16. SOLR-81: SpellCheckerRequestHandler that uses the SpellChecker from
- the Lucene contrib.
- (Otis Gospodnetic and Adam Hiatt)
-
-17. SOLR-182: allow lazy loading of request handlers on first request.
- (Ryan McKinley via yonik)
-
-18. SOLR-81: More SpellCheckerRequestHandler enhancements, inlcluding
- support for relative or absolute directory path configurations, as
- well as RAM based directory. (hossman)
-
-19. SOLR-197: New parameters for input: stream.contentType for specifying
- or overriding the content type of input, and stream.file for reading
- local files. (Ryan McKinley via yonik)
-
-20. SOLR-66: CSV data format for document additions and updates. (yonik)
-
-21. SOLR-184: add echoHandler=true to responseHeader, support echoParams=all
- (Ryan McKinley via ehatcher)
-
-22. SOLR-211: Added a regex PatternTokenizerFactory. This extracts tokens
- from the input string using a regex Pattern. (Ryan McKinley)
-
-23. SOLR-162: Added a "Luke" request handler and other admin helpers.
- This exposes the system status through the standard requestHandler
- framework. (ryan)
-
-24. SOLR-212: Added a DirectSolrConnection class. This lets you access
- solr using the standard request/response formats, but does not require
- an HTTP connection. It is designed for embedded applications. (ryan)
-
-25. SOLR-204: The request dispatcher (added in SOLR-104) can handle
- calls to /select. This offers uniform error handling for /update and
- /select. To enable this behavior, you must add:
- <requestDispatcher handleSelect="true" > to your solrconfig.xml
- See the example solrconfig.xml for details. (ryan)
-
-26. SOLR-170: StandardRequestHandler now supports a "sort" parameter.
- Using the ';' syntax is still supported, but it is recommended to
- transition to the new syntax. (ryan)
-
-27. SOLR-181: The index schema now supports "required" fields. Attempts
- to add a document without a required field will fail, returning a
- descriptive error message. By default, the uniqueKey field is
- a required field. This can be disabled by setting required=false
- in schema.xml. (Greg Ludington via ryan)
-
-28. SOLR-217: Fields configured in the schema to be neither indexed or
- stored will now be quietly ignored by Solr when Documents are added.
- The example schema has a comment explaining how this can be used to
- ignore any "unknown" fields.
- (Will Johnson via hossman)
-
-29. SOLR-227: If schema.xml defines multiple fieldTypes, fields, or
- dynamicFields with the same name, a severe error will be logged rather
- then quietly continuing. Depending on the <abortOnConfigurationError>
- settings, this may halt the server. Likewise, if solrconfig.xml
- defines multiple RequestHandlers with the same name it will also add
- an error. (ryan)
-
-30. SOLR-226: Added support for dynamic field as the destination of a
- copyField using glob (*) replacement. (ryan)
-
-31. SOLR-224: Adding a PhoneticFilterFactory that uses apache commons codec
- language encoders to build phonetically similar tokens. This currently
- supports: DoubleMetaphone, Metaphone, Soundex, and RefinedSoundex (ryan)
-
-32. SOLR-199: new n-gram tokenizers available via NGramTokenizerFactory
- and EdgeNGramTokenizerFactory. (Adam Hiatt via yonik)
-
-33. SOLR-234: TrimFilter can update the Token's startOffset and endOffset
- if updateOffsets="true". By default the Token offsets are unchanged.
- (ryan)
-
-34. SOLR-208: new example_rss.xsl and example_atom.xsl to provide more
- examples for people about the Solr XML response format and how they
- can transform it to suit different needs.
- (Brian Whitman via hossman)
-
-35. SOLR-249: Deprecated SolrException( int, ... ) constructors in favor
- of constructors that takes an ErrorCode enum. This will ensure that
- all SolrExceptions use a valid HTTP status code. (ryan)
-
-Changes in runtime behavior
- 1. Highlighting using DisMax will only pick up terms from the main
- user query, not boost or filter queries (klaas).
-
- 2. SOLR-125: Change default of json.nl to flat, change so that
- json.nl only affects items where order matters (facet constraint
- listings). Fix JSON output bug for null values. Internal JAVA API:
- change most uses of NamedList to SimpleOrderedMap. (yonik)
-
- 3. A new method "getSolrQueryParser" has been added to the IndexSchema
- class for retrieving a new SolrQueryParser instance with all options
- specified in the schema.xml's <solrQueryParser> block set. The
- documentation for the SolrQueryParser constructor and it's use of
- IndexSchema have also been clarified.
- (Erik Hatcher and hossman)
-
- 4. DisMaxRequestHandler's bq, bf, qf, and pf parameters can now accept
- multiple values (klaas).
-
- 5. Query are re-written before highlighting is performed. This enables
- proper highlighting of prefix and wildcard queries (klaas).
-
- 6. A meaningful exception is raised when attempting to add a doc missing
- a unique id if it is declared in the schema and allowDups=false.
- (ryan via klaas)
-
- 7. SOLR-183: Exceptions with error code 400 are raised when
- numeric argument parsing fails. RequiredSolrParams class added
- to facilitate checking for parameters that must be present.
- (Ryan McKinley, J.J. Larrea via yonik)
-
- 8. SOLR-179: By default, solr will abort after any severe initalization
- errors. This behavior can be disabled by setting:
- <abortOnConfigurationError>false</abortOnConfigurationError>
- in solrconfig.xml (ryan)
-
- 9. The example solrconfig.xml maps /update to XmlUpdateRequestHandler using
- the new request dispatcher (SOLR-104). This requires posted content to
- have a valid contentType: curl -H 'Content-type:text/xml; charset=utf-8'
- The response format matches that of /select and returns standard error
- codes. To enable solr1.1 style /update, do not map "/update" to any
- handler in solrconfig.xml (ryan)
-
-10. SOLR-231: If a charset is not specified in the contentType,
- ContentStream.getReader() will use UTF-8 encoding. (ryan)
-
-11. SOLR-230: More options for post.jar to support stdin, xml on the
- commandline, and defering commits. Tutorial modified to take
- advantage of these options so there is no need for curl.
- (hossman)
-
-12. SOLR-128: Upgraded Jetty to the latest stable release 6.1.3 (ryan)
-
-Optimizations
- 1. SOLR-114: HashDocSet specific implementations of union() and andNot()
- for a 20x performance improvement for those set operations, and a new
- hash algorithm speeds up exists() by 10% and intersectionSize() by 8%.
- (yonik)
-
- 2. SOLR-115: Solr now uses BooleanQuery.clauses() instead of
- BooleanQuery.getClauses() in any situation where there is no risk of
- modifying the original query.
- (hossman)
-
- 3. SOLR-221: Speed up sorted faceting on multivalued fields by ~60%
- when the base set consists of a relatively large portion of the
- index. (yonik)
-
- 4. SOLR-221: Added a facet.enum.cache.minDf parameter which avoids
- using the filterCache for terms that match few documents, trading
- decreased memory usage for increased query time. (yonik)
-
-Bug Fixes
- 1. SOLR-87: Parsing of synonym files did not correctly handle escaped
- whitespace such as \r\n\t\b\f. (yonik)
-
- 2. SOLR-92: DOMUtils.getText (used when parsing config files) did not
- work properly with many DOM implementations when dealing with
- "Attributes". (Ryan McKinley via hossman)
-
- 3. SOLR-9,SOLR-99: Tighten up sort specification error checking, throw
- exceptions for missing sort specifications or a sort on a non-indexed
- field. (Ryan McKinley via yonik)
-
- 4. SOLR-145: Fix for bug introduced in SOLR-104 where some Exceptions
- were being ignored by all "out of the box" RequestHandlers. (hossman)
-
- 5. SOLR-166: JNDI solr.home code refactoring. SOLR-104 moved
- some JNDI related code to the init method of a Servlet Filter -
- according to the Servlet Spec, all Filter's should be initialized
- prior to initializing any Servlets, but this is not the case in at
- least one Servlet Container (Resin). This "bug fix" refactors
- this JNDI code so that it should be executed the first time any
- attempt is made to use the solr.home dir.
- (Ryan McKinley via hossman)
-
- 6. SOLR-173: Bug fix to SolrDispatchFilter to reduce "too many open
- files" problem was that SolrDispatchFilter was not closing requests
- when finished. Also modified ResponseWriters to only fetch a Searcher
- reference if necessary for writing out DocLists.
- (Ryan McKinley via hossman)
-
- 7. SOLR-168: Fix display positioning of multiple tokens at the same
- position in analysis.jsp (yonik)
-
- 8. SOLR-167: The SynonymFilter sometimes generated incorrect offsets when
- multi token synonyms were mached in the source text. (yonik)
-
- 9. SOLR-188: bin scripts do not support non-default webapp names. Added "-U"
- option to specify a full path to the update url, overriding the
- "-h" (hostname), "-p" (port) and "-w" (webapp name) parameters.
- (Jeff Rodenburg via billa)
-
-10. SOLR-198: RunExecutableListener always waited for the process to
- finish, even when wait="false" was set. (Koji Sekiguchi via yonik)
-
-11. SOLR-207: Changed distribution scripts to remove recursive find
- and avoid use of "find -maxdepth" on platforms where it is not
- supported. (yonik)
-
-12. SOLR-222: Changing writeLockTimeout in solrconfig.xml did not
- change the effective timeout. (Koji Sekiguchi via yonik)
-
-13. Changed the SOLR-104 RequestDispatcher so that /select?qt=xxx can not
- access handlers that start with "/". This makes path based authentication
- possible for path based request handlers. (ryan)
-
-14. SOLR-214: Some servlet containers (including Tomcat and Resin) do not
- obey the specified charset. Rather then letting the the container handle
- it solr now uses the charset from the header contentType to decode posted
- content. Using the contentType: "text/xml; charset=utf-8" will force
- utf-8 encoding. If you do not specify a contentType, it will use the
- platform default. (Koji Sekiguchi via ryan)
-
-15. SOLR-241: Undefined system properties used in configuration files now
- cause a clear message to be logged rather than an obscure exception thrown.
- (Koji Sekiguchi via ehatcher)
-
-Other Changes
- 1. Updated to Lucene 2.1
-
- 2. Updated to Lucene 2007-05-20_00-04-53
-
-================== Release 1.1.0, 20061222 ==================
-
-Status
-------
-This is the first release since Solr joined the Incubator, and brings many
-new features and performance optimizations including highlighting,
-faceted browsing, and JSON/Python/Ruby response formats.
-
-
-Upgrading from previous Solr versions
--------------------------------------
-Older Apache Solr installations can be upgraded by replacing
-the relevant war file with the new version. No changes to configuration
-files are needed and the index format has not changed.
-
-The default version of the Solr XML response syntax has been changed to 2.2.
-Behavior can be preserved for those clients not explicitly specifying a
-version by adding a default to the request handler in solrconfig.xml
-
-By default, Solr will no longer use a searcher that has not fully warmed,
-and requests will block in the meantime. To change back to the previous
-behavior of using a cold searcher in the event there is no other
-warm searcher, see the useColdSearcher config item in solrconfig.xml
-
-The XML response format when adding multiple documents to the collection
-in a single <add> command has changed to return a single <result>.
-
-
-Detailed Change List
---------------------
-
-New Features
- 1. added support for setting Lucene's positionIncrementGap
- 2. Admin: new statistics for SolrIndexSearcher
- 3. Admin: caches now show config params on stats page
- 3. max() function added to FunctionQuery suite
- 4. postOptimize hook, mirroring the functionallity of the postCommit hook,
- but only called on an index optimize.
- 5. Ability to HTTP POST query requests to /select in addition to HTTP-GET
- 6. The default search field may now be overridden by requests to the
- standard request handler using the df query parameter. (Erik Hatcher)
- 7. Added DisMaxRequestHandler and SolrPluginUtils. (Chris Hostetter)
- 8. Support for customizing the QueryResponseWriter per request
- (Mike Baranczak / SOLR-16 / hossman)
- 9. Added KeywordTokenizerFactory (hossman)
-10. copyField accepts dynamicfield-like names as the source.
- (Darren Erik Vengroff via yonik, SOLR-21)
-11. new DocSet.andNot(), DocSet.andNotSize() (yonik)
-12. Ability to store term vectors for fields. (Mike Klaas via yonik, SOLR-23)
-13. New abstract BufferedTokenStream for people who want to write
- Tokenizers or TokenFilters that require arbitrary buffering of the
- stream. (SOLR-11 / yonik, hossman)
-14. New RemoveDuplicatesToken - useful in situations where
- synonyms, stemming, or word-deliminater-ing produce identical tokens at
- the same position. (SOLR-11 / yonik, hossman)
-15. Added highlighting to SolrPluginUtils and implemented in StandardRequestHandler
- and DisMaxRequestHandler (SOLR-24 / Mike Klaas via hossman,yonik)
-16. SnowballPorterFilterFactory language is configurable via the "language"
- attribute, with the default being "English". (Bertrand Delacretaz via yonik, SOLR-27)
-17. ISOLatin1AccentFilterFactory, instantiates ISOLatin1AccentFilter to remove accents.
- (Bertrand Delacretaz via yonik, SOLR-28)
-18. JSON, Python, Ruby QueryResponseWriters: use wt="json", "python" or "ruby"
- (yonik, SOLR-31)
-19. Make web admin pages return UTF-8, change Content-type declaration to include a
- space between the mime-type and charset (Philip Jacob, SOLR-35)
-20. Made query parser default operator configurable via schema.xml:
- <solrQueryParser defaultOperator="AND|OR"/>
- The default operator remains "OR".
-21. JAVA API: new version of SolrIndexSearcher.getDocListAndSet() which takes
- flags (Greg Ludington via yonik, SOLR-39)
-22. A HyphenatedWordsFilter, a text analysis filter used during indexing to rejoin
- words that were hyphenated and split by a newline. (Boris Vitez via yonik, SOLR-41)
-23. Added a CompressableField base class which allows fields of derived types to
- be compressed using the compress=true setting. The field type also gains the
- ability to specify a size threshold at which field data is compressed.
- (klaas, SOLR-45)
-24. Simple faceted search support for fields (enumerating terms)
- and arbitrary queries added to both StandardRequestHandler and
- DisMaxRequestHandler. (hossman, SOLR-44)
-25. In addition to specifying default RequestHandler params in the
- solrconfig.xml, support has been added for configuring values to be
- appended to the multi-val request params, as well as for configuring
- invariant params that can not overridden in the query. (hossman, SOLR-46)
-26. Default operator for query parsing can now be specified with q.op=AND|OR
- from the client request, overriding the schema value. (ehatcher)
-27. New XSLTResponseWriter does server side XSLT processing of XML Response.
- In the process, an init(NamedList) method was added to QueryResponseWriter
- which works the same way as SolrRequestHandler.
- (Bertrand Delacretaz / SOLR-49 / hossman)
-28. json.wrf parameter adds a wrapper-function around the JSON response,
- useful in AJAX with dynamic script tags for specifying a JavaScript
- callback function. (Bertrand Delacretaz via yonik, SOLR-56)
-29. autoCommit can be specified every so many documents added (klaas, SOLR-65)
-30. ${solr.home}/lib directory can now be used for specifying "plugin" jars
- (hossman, SOLR-68)
-31. Support for "Date Math" relative "NOW" when specifying values of a
- DateField in a query -- or when adding a document.
- (hossman, SOLR-71)
-32. useColdSearcher control in solrconfig.xml prevents the first searcher
- from being used before it's done warming. This can help prevent
- thrashing on startup when multiple requests hit a cold searcher.
- The default is "false", preventing use before warm. (yonik, SOLR-77)
-
-Changes in runtime behavior
- 1. classes reorganized into different packages, package names changed to Apache
- 2. force read of document stored fields in QuerySenderListener
- 3. Solr now looks in ./solr/conf for config, ./solr/data for data
- configurable via solr.solr.home system property
- 4. Highlighter params changed to be prefixed with "hl."; allow fragmentsize
- customization and per-field overrides on many options
- (Andrew May via klaas, SOLR-37)
- 5. Default param values for DisMaxRequestHandler should now be specified
- using a '<lst name="defaults">...</lst>' init param, for backwards
- compatability all init prams will be used as defaults if an init param
- with that name does not exist. (hossman, SOLR-43)
- 6. The DisMaxRequestHandler now supports multiple occurances of the "fq"
- param. (hossman, SOLR-44)
- 7. FunctionQuery.explain now uses ComplexExplanation to provide more
- accurate score explanations when composed in a BooleanQuery.
- (hossman, SOLR-25)
- 8. Document update handling locking is much sparser, allowing performance gains
- through multiple threads. Large commits also might be faster (klaas, SOLR-65)
- 9. Lazy field loading can be enabled via a solrconfig directive. This will be faster when
- not all stored fields are needed from a document (klaas, SOLR-52)
-10. Made admin JSPs return XML and transform them with new XSL stylesheets
- (Otis Gospodnetic, SOLR-58)
-11. If the "echoParams=explicit" request parameter is set, request parameters are copied
- to the output. In an XML output, they appear in new <lst name="params"> list inside
- the new <lst name="responseHeader"> element, which replaces the old <responseHeader>.
- Adding a version=2.1 parameter to the request produces the old format, for backwards
- compatibility (bdelacretaz and yonik, SOLR-59).
-
-Optimizations
- 1. getDocListAndSet can now generate both a DocList and a DocSet from a
- single lucene query.
- 2. BitDocSet.intersectionSize(HashDocSet) no longer generates an intermediate
- set
- 3. OpenBitSet completed, replaces BitSet as the implementation for BitDocSet.
- Iteration is faster, and BitDocSet.intersectionSize(BitDocSet) and unionSize
- is between 3 and 4 times faster. (yonik, SOLR-15)
- 4. much faster unionSize when one of the sets is a HashDocSet: O(smaller_set_size)
- 5. Optimized getDocSet() for term queries resulting in a 36% speedup of facet.field
- queries where DocSets aren't cached (for example, if the number of terms in the field
- is larger than the filter cache.) (yonik)
- 6. Optimized facet.field faceting by as much as 500 times when the field has
- a single token per document (not multiValued & not tokenized) by using the
- Lucene FieldCache entry for that field to tally term counts. The first request
- utilizing the FieldCache will take longer than subsequent ones.
-
-Bug Fixes
- 1. Fixed delete-by-id for field types who's indexed form is different
- from the printable form (mainly sortable numeric types).
- 2. Added escaping of attribute values in the XML response (Erik Hatcher)
- 3. Added empty extractTerms() to FunctionQuery to enable use in
- a MultiSearcher (Yonik)
- 4. WordDelimiterFilter sometimes lost token positionIncrement information
- 5. Fix reverse sorting for fields were sortMissingFirst=true
- (Rob Staveley, yonik)
- 6. Worked around a Jetty bug that caused invalid XML responses for fields
- containing non ASCII chars. (Bertrand Delacretaz via yonik, SOLR-32)
- 7. WordDelimiterFilter can throw exceptions if configured with both
- generate and catenate off. (Mike Klaas via yonik, SOLR-34)
- 8. Escape '>' in XML output (because ]]> is illegal in CharData)
- 9. field boosts weren't being applied and doc boosts were being applied to fields (klaas)
-10. Multiple-doc update generates well-formed xml (klaas, SOLR-65)
-11. Better parsing of pingQuery from solrconfig.xml (hossman, SOLR-70)
-12. Fixed bug with "Distribution" page introduced when Versions were
- added to "Info" page (hossman)
-13. Fixed HTML escaping issues with user input to analysis.jsp and action.jsp
- (hossman, SOLR-74)
-
-Other Changes
- 1. Upgrade to Lucene 2.0 nightly build 2006-06-22, lucene SVN revision 416224,
- http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?view=markup&pathrev=416224
- 2. Modified admin styles to improve display in Internet Explorer (Greg Ludington via billa, SOLR-6)
- 3. Upgrade to Lucene 2.0 nightly build 2006-07-15, lucene SVN revision 422302,
- 4. Included unique key field name/value (if available) in log message of add (billa, SOLR-18)
- 5. Updated to Lucene 2.0 nightly build 2006-09-07, SVN revision 462111
- 6. Added javascript to catch empty query in admin query forms (Tomislav Nakic-Alfirevic via billa, SOLR-48
- 7. blackslash escape * in ssh command used in snappuller for zsh compatibility, SOLR-63
- 8. check solr return code in admin scripts, SOLR-62
- 9. Updated to Lucene 2.0 nightly build 2006-11-15, SVN revision 475069
-10. Removed src/apps containing the legacy "SolrTest" app (hossman, SOLR-3)
-11. Simplified index.jsp and form.jsp, primarily by removing/hiding XML
- specific params, and adding an option to pick the output type. (hossman)
-12. Added new numeric build property "specversion" to allow clean
- MANIFEST.MF files (hossman)
-13. Added Solr/Lucene versions to "Info" page (hossman)
-14. Explicitly set mime-type of .xsl files in web.xml to
- application/xslt+xml (hossman)
-15. Config parsing should now work useing DOM Level 2 parsers -- Solr
- previously relied on getTextContent which is a DOM Level 3 addition
- (Alexander Saar via hossman, SOLR-78)
-
-2006/01/17 Solr open sourced, moves to Apache Incubator
diff --git a/vendor/plugins/acts_as_solr/solr/LICENSE.txt b/vendor/plugins/acts_as_solr/solr/LICENSE.txt
deleted file mode 100644
index b87e08680..000000000
--- a/vendor/plugins/acts_as_solr/solr/LICENSE.txt
+++ /dev/null
@@ -1,608 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-==========================================================================
-The following license applies only to the xpp3 jar included with Solr
---------------------------------------------------------------------------
-Indiana University Extreme! Lab Software License
-
-Version 1.1.1
-
-Copyright (c) 2002 Extreme! Lab, Indiana University. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the distribution.
-
-3. The end-user documentation included with the redistribution, if any,
- must include the following acknowledgment:
-
- "This product includes software developed by the Indiana University
- Extreme! Lab (http://www.extreme.indiana.edu/)."
-
-Alternately, this acknowledgment may appear in the software itself,
-if and wherever such third-party acknowledgments normally appear.
-
-4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab"
-must not be used to endorse or promote products derived from this
-software without prior written permission. For written permission,
-please contact http://www.extreme.indiana.edu/.
-
-5. Products derived from this software may not use "Indiana Univeristy"
-name nor may "Indiana Univeristy" appear in their name, without prior
-written permission of the Indiana University.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHORS, COPYRIGHT HOLDERS OR ITS CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==========================================================================
-Portions of Jetty 6 are bundled in the Solr example server.
-Jetty 6 includes a binary javax.servlet package licensed under the
-Common Development and Distribution License.
---------------------------------------------------------------------------
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-1.1. Contributor means each individual or entity that creates or contributes to
-the creation of Modifications.
-
-1.2. Contributor Version means the combination of the Original Software, prior
-Modifications used by a Contributor (if any), and the Modifications made by
-that particular Contributor.
-
-1.3. Covered Software means (a) the Original Software, or (b) Modifications, or
-(c) the combination of files containing Original Software with files containing
-Modifications, in each case including portions thereof.
-
-1.4. Executable means the Covered Software in any form other than Source Code.
-
-1.5. Initial Developer means the individual or entity that first makes Original
-Software available under this License.
-
-1.6. Larger Work means a work which combines Covered Software or portions
-thereof with code not governed by the terms of this License.
-
-1.7. License means this document.
-
-1.8. Licensable means having the right to grant, to the maximum extent
-possible, whether at the time of the initial grant or subsequently acquired,
-any and all of the rights conveyed herein.
-
-1.9. Modifications means the Source Code and Executable form of any of the
-following:
-
-A. Any file that results from an addition to, deletion from or modification of
-the contents of a file containing Original Software or previous Modifications;
-
-B. Any new file that contains any part of the Original Software or previous
-Modification; or
-
-C. Any new file that is contributed or otherwise made available under the terms
-of this License.
-
-1.10. Original Software means the Source Code and Executable form of computer
-software code that is originally released under this License.
-
-1.11. Patent Claims means any patent claim(s), now owned or hereafter acquired,
-including without limitation, method, process, and apparatus claims, in any
-patent Licensable by grantor.
-
-1.12. Source Code means (a) the common form of computer software code in which
-modifications are made and (b) associated documentation included in or with
-such code.
-
-1.13. You (or Your) means an individual or a legal entity exercising rights
-under, and complying with all of the terms of, this License. For legal
-entities, You includes any entity which controls, is controlled by, or is under
-common control with You. For purposes of this definition, control means (a)áthe
-power, direct or indirect, to cause the direction or management of such entity,
-whether by contract or otherwise, or (b)áownership of more than fifty percent
-(50%) of the outstanding shares or beneficial ownership of such entity.
-
-2. License Grants.
-
-2.1. The Initial Developer Grant. Conditioned upon Your compliance with
-Section 3.1 below and subject to third party intellectual property claims, the
-Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive
-license: (a) under intellectual property rights (other than patent or
-trademark) Licensable by Initial Developer, to use, reproduce, modify, display,
-perform, sublicense and distribute the Original Software (or portions thereof),
-with or without Modifications, and/or as part of a Larger Work; and (b) under
-Patent Claims infringed by the making, using or selling of Original Software,
-to make, have made, use, practice, sell, and offer for sale, and/or otherwise
-dispose of the Original Software (or portions thereof). (c) The licenses
-granted in Sectionsá2.1(a) and (b) are effective on the date Initial Developer
-first distributes or otherwise makes the Original Software available to a third
-party under the terms of this License. (d) Notwithstanding Sectioná2.1(b)
-above, no patent license is granted: (1)áfor code that You delete from the
-Original Software, or (2)áfor infringements caused by: (i)áthe modification of
-the Original Software, or (ii)áthe combination of the Original Software with
-other software or devices.
-
-2.2. Contributor Grant. Conditioned upon Your compliance with Section 3.1
-below and subject to third party intellectual property claims, each Contributor
-hereby grants You a world-wide, royalty-free, non-exclusive license: (a) under
-intellectual property rights (other than patent or trademark) Licensable by
-Contributor to use, reproduce, modify, display, perform, sublicense and
-distribute the Modifications created by such Contributor (or portions thereof),
-either on an unmodified basis, with other Modifications, as Covered Software
-and/or as part of a Larger Work; and (b) under Patent Claims infringed by the
-making, using, or selling of Modifications made by that Contributor either
-alone and/or in combination with its Contributor Version (or portions of such
-combination), to make, use, sell, offer for sale, have made, and/or otherwise
-dispose of: (1)áModifications made by that Contributor (or portions thereof);
-and (2)áthe combination of Modifications made by that Contributor with its
-Contributor Version (or portions of such combination). (c) The licenses
-granted in Sectionsá2.2(a) and 2.2(b) are effective on the date Contributor
-first distributes or otherwise makes the Modifications available to a third
-party. (d) Notwithstanding Sectioná2.2(b) above, no patent license is granted:
-(1)áfor any code that Contributor has deleted from the Contributor Version;
-(2)áfor infringements caused by: (i)áthird party modifications of Contributor
-Version, or (ii)áthe combination of Modifications made by that Contributor with
-other software (except as part of the Contributor Version) or other devices; or
-(3)áunder Patent Claims infringed by Covered Software in the absence of
-Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make available in
-Executable form must also be made available in Source Code form and that Source
-Code form must be distributed only under the terms of this License. You must
-include a copy of this License with every copy of the Source Code form of the
-Covered Software You distribute or otherwise make available. You must inform
-recipients of any such Covered Software in Executable form as to how they can
-obtain such Covered Software in Source Code form in a reasonable manner on or
-through a medium customarily used for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You contribute are governed by
-the terms of this License. You represent that You believe Your Modifications
-are Your original creation(s) and/or You have sufficient rights to grant the
-rights conveyed by this License.
-
-3.3. Required Notices. You must include a notice in each of Your Modifications
-that identifies You as the Contributor of the Modification. You may not remove
-or alter any copyright, patent or trademark notices contained within the
-Covered Software, or any notices of licensing or any descriptive text giving
-attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms. You may not offer or impose any terms on
-any Covered Software in Source Code form that alters or restricts the
-applicable version of this License or the recipients rights hereunder. You may
-choose to offer, and to charge a fee for, warranty, support, indemnity or
-liability obligations to one or more recipients of Covered Software. However,
-you may do so only on Your own behalf, and not on behalf of the Initial
-Developer or any Contributor. You must make it absolutely clear that any such
-warranty, support, indemnity or liability obligation is offered by You alone,
-and You hereby agree to indemnify the Initial Developer and every Contributor
-for any liability incurred by the Initial Developer or such Contributor as a
-result of warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions. You may distribute the Executable
-form of the Covered Software under the terms of this License or under the terms
-of a license of Your choice, which may contain terms different from this
-License, provided that You are in compliance with the terms of this License and
-that the license for the Executable form does not attempt to limit or alter the
-recipients rights in the Source Code form from the rights set forth in this
-License. If You distribute the Covered Software in Executable form under a
-different license, You must make it absolutely clear that any terms which
-differ from this License are offered by You alone, not by the Initial Developer
-or Contributor. You hereby agree to indemnify the Initial Developer and every
-Contributor for any liability incurred by the Initial Developer or such
-Contributor as a result of any such terms You offer.
-
-3.6. Larger Works. You may create a Larger Work by combining Covered Software
-with other code not governed by the terms of this License and distribute the
-Larger Work as a single product. In such a case, You must make sure the
-requirements of this License are fulfilled for the Covered Software.
-
-4. Versions of the License.
-
-4.1. New Versions. Sun Microsystems, Inc. is the initial license steward and
-may publish revised and/or new versions of this License from time to time. Each
-version will be given a distinguishing version number. Except as provided in
-Section 4.3, no one other than the license steward has the right to modify this
-License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise make the Covered
-Software available under the terms of the version of the License under which
-You originally received the Covered Software. If the Initial Developer includes
-a notice in the Original Software prohibiting it from being distributed or
-otherwise made available under any subsequent version of the License, You must
-distribute and make the Covered Software available under the terms of the
-version of the License under which You originally received the Covered
-Software. Otherwise, You may also choose to use, distribute or otherwise make
-the Covered Software available under the terms of any subsequent version of the
-License published by the license steward. 4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a new license for Your
-Original Software, You may create and use a modified version of this License if
-You: (a)árename the license and remove any references to the name of the
-license steward (except to note that the license differs from this License);
-and (b)áotherwise make it clear that the license contains terms which differ
-from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT
-WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT
-LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS,
-MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK
-AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD
-ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL
-DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING,
-REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART
-OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT
-UNDER THIS DISCLAIMER.
-
-6. TERMINATION.
-
-6.1. This License and the rights granted hereunder will terminate automatically
-if You fail to comply with terms herein and fail to cure such breach within 30
-days of becoming aware of the breach. Provisions which, by their nature, must
-remain in effect beyond the termination of this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding declaratory judgment
-actions) against Initial Developer or a Contributor (the Initial Developer or
-Contributor against whom You assert such claim is referred to as Participant)
-alleging that the Participant Software (meaning the Contributor Version where
-the Participant is a Contributor or the Original Software where the Participant
-is the Initial Developer) directly or indirectly infringes any patent, then any
-and all rights granted directly or indirectly to You by such Participant, the
-Initial Developer (if the Initial Developer is not the Participant) and all
-Contributors under Sectionsá2.1 and/or 2.2 of this License shall, upon 60 days
-notice from Participant terminate prospectively and automatically at the
-expiration of such 60 day notice period, unless if within such 60 day period
-You withdraw Your claim with respect to the Participant Software against such
-Participant either unilaterally or pursuant to a written agreement with
-Participant.
-
-6.3. In the event of termination under Sectionsá6.1 or 6.2 above, all end user
-licenses that have been validly granted by You or any distributor hereunder
-prior to termination (excluding licenses granted to You by any distributor)
-shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
-NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
-OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF
-ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
-INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER
-FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN
-IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS
-LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
-INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW
-PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR
-LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND
-LIMITATION MAY NOT APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a commercial item, as that term is defined in
-48áC.F.R.á2.101 (Oct. 1995), consisting of commercial computer software (as
-that term is defined at 48 C.F.R. á252.227-7014(a)(1)) and commercial computer
-software documentation as such terms are used in 48áC.F.R.á12.212 (Sept. 1995).
-Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4
-(June 1995), all U.S. Government End Users acquire Covered Software with only
-those rights set forth herein. This U.S. Government Rights clause is in lieu
-of, and supersedes, any other FAR, DFAR, or other clause or provision that
-addresses Government rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject matter
-hereof. If any provision of this License is held to be unenforceable, such
-provision shall be reformed only to the extent necessary to make it
-enforceable. This License shall be governed by the law of the jurisdiction
-specified in a notice contained within the Original Software (except to the
-extent applicable law, if any, provides otherwise), excluding such
-jurisdictions conflict-of-law provisions. Any litigation relating to this
-License shall be subject to the jurisdiction of the courts located in the
-jurisdiction and venue specified in a notice contained within the Original
-Software, with the losing party responsible for costs, including, without
-limitation, court costs and reasonable attorneys fees and expenses. The
-application of the United Nations Convention on Contracts for the International
-Sale of Goods is expressly excluded. Any law or regulation which provides that
-the language of a contract shall be construed against the drafter shall not
-apply to this License. You agree that You alone are responsible for compliance
-with the United States export administration regulations (and the export
-control laws and regulation of any other countries) when You use, distribute or
-otherwise make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is responsible
-for claims and damages arising, directly or indirectly, out of its utilization
-of rights under this License and You agree to work with Initial Developer and
-Contributors to distribute such responsibility on an equitable basis. Nothing
-herein is intended or shall be deemed to constitute any admission of liability.
-
-NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE
-(CDDL) The GlassFish code released under the CDDL shall be governed by the laws
-of the State of California (excluding conflict-of-law provisions). Any
-litigation relating to this License shall be subject to the jurisdiction of the
-Federal Courts of the Northern District of California and the state courts of
-the State of California, with venue lying in Santa Clara County, California.
-
-
-==========================================================================
-The following license applies to parts of the lucene-snowball jar
-that are generated from the snowball sources at http://snowball.tartarus.org/
---------------------------------------------------------------------------
-The BSD License
-
-Copyright (c) 2001, Dr Martin Porter, Copyright (c) 2002, Richard Boulton
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- * Neither the name of the <ORGANIZATION> nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-==========================================================================
-The following license applies to easymock.jar
---------------------------------------------------------------------------
-EasyMock 2 License (MIT License)
-Copyright (c) 2001-2007 OFFIS, Tammo Freese.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
diff --git a/vendor/plugins/acts_as_solr/solr/NOTICE.txt b/vendor/plugins/acts_as_solr/solr/NOTICE.txt
deleted file mode 100644
index 753f92424..000000000
--- a/vendor/plugins/acts_as_solr/solr/NOTICE.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-==============================================================
- Apache Solr
- Copyright 2007 The Apache Software Foundation
-==============================================================
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-Includes software from other Apache Software Foundation projects,
-including, but not limited to:
- - Apache Lucene Java
- - Apache Tomcat (lib/servlet-api-2.4.jar)
-
-This product includes software developed by the Indiana University
-Extreme! Lab (http://www.extreme.indiana.edu/).
-(specifically, the XPP3 XML pull parser)
-
-This product includes software developed by Mort Bay Consulting
-(specifically, Jetty 6.1.3, the bundled servlet container in example)
-
-This product includes software developed by Dr Martin Porter,
-Copyright 2001 and and Richard Boulton (for the Java developments),
-Copyright 2002.
-(generated snowball stemmer code in the lucene-snowball jar)
-
-This product includes tests written with EasyMock Copyright 2001-2007
-Tammo Freese (http://www.easymock.org/)
-
-
-
-==============================================================
- Jetty Web Container
- Copyright 1995-2006 Mort Bay Consulting Pty Ltd
-==============================================================
-
-This product includes some software developed at The Apache Software
-Foundation (http://www.apache.org/).
-
-The javax.servlet package used by Jetty is copyright
-Sun Microsystems, Inc and Apache Software Foundation. It is
-distributed under the Common Development and Distribution License.
-You can obtain a copy of the license at
-https://glassfish.dev.java.net/public/CDDLv1.0.html.
-
-The UnixCrypt.java code ~Implements the one way cryptography used by
-Unix systems for simple password protection. Copyright 1996 Aki Yoshida,
-modified April 2001 by Iris Van den Broeke, Daniel Deville.
-
-The default JSP implementation is provided by the Glassfish JSP engine
-from project Glassfish http://glassfish.dev.java.net. Copyright 2005
-Sun Microsystems, Inc. and portions Copyright Apache Software Foundation.
-
-Some portions of the code are Copyright:
- 2006 Tim Vernum
- 1999 Jason Gilbert.
-
-The jboss integration module contains some LGPL code.
diff --git a/vendor/plugins/acts_as_solr/solr/etc/jetty.xml b/vendor/plugins/acts_as_solr/solr/etc/jetty.xml
deleted file mode 100644
index 3b3dc6961..000000000
--- a/vendor/plugins/acts_as_solr/solr/etc/jetty.xml
+++ /dev/null
@@ -1,206 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
-
-<!-- =============================================================== -->
-<!-- Configure the Jetty Server -->
-<!-- -->
-<!-- Documentation of this file format can be found at: -->
-<!-- http://docs.codehaus.org/display/JETTY/jetty.xml -->
-<!-- -->
-<!-- =============================================================== -->
-
-
-<Configure id="Server" class="org.mortbay.jetty.Server">
-
- <!-- =========================================================== -->
- <!-- Server Thread Pool -->
- <!-- =========================================================== -->
- <Set name="ThreadPool">
- <!-- Default bounded blocking threadpool
- -->
- <New class="org.mortbay.thread.BoundedThreadPool">
- <Set name="minThreads">10</Set>
- <Set name="lowThreads">50</Set>
- <Set name="maxThreads">250</Set>
- </New>
-
- <!-- Optional Java 5 bounded threadpool with job queue
- <New class="org.mortbay.thread.concurrent.ThreadPool">
- <Arg type="int">0</Arg>
- <Set name="corePoolSize">10</Set>
- <Set name="maximumPoolSize">250</Set>
- </New>
- -->
- </Set>
-
-
-
- <!-- =========================================================== -->
- <!-- Set connectors -->
- <!-- =========================================================== -->
- <!-- One of each type! -->
- <!-- =========================================================== -->
-
- <!-- Use this connector for many frequently idle connections
- and for threadless continuations. -->
- <!-- <Call name="addConnector">
- <Arg>
- <New class="org.mortbay.jetty.nio.SelectChannelConnector">
- <Set name="port"><SystemProperty name="jetty.port" default="8983"/></Set>
- <Set name="maxIdleTime">30000</Set>
- <Set name="Acceptors">2</Set>
- <Set name="confidentialPort">8443</Set>
- </New>
- </Arg>
- </Call> -->
-
-
- <!-- Use this connector if NIO is not available. -->
- <!-- This connector is currently being used for Solr because the
- nio.SelectChannelConnector showed poor performance under WindowsXP
- from a single client with non-persistent connections (35s vs ~3min)
- to complete 10,000 requests)
- -->
- <Call name="addConnector">
- <Arg>
- <New class="org.mortbay.jetty.bio.SocketConnector">
- <Set name="port"><SystemProperty name="jetty.port" default="8983"/></Set>
- <Set name="maxIdleTime">50000</Set>
- <Set name="lowResourceMaxIdleTime">1500</Set>
- </New>
- </Arg>
- </Call>
-
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <!-- To add a HTTPS SSL listener -->
- <!-- see jetty-ssl.xml to add an ssl connector. use -->
- <!-- java -jar start.jar etc/jetty.xml etc/jetty-ssl.xml -->
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <!-- =========================================================== -->
- <!-- Set up global session ID manager -->
- <!-- =========================================================== -->
- <!--
- <Set name="sessionIdManager">
- <New class="org.mortbay.jetty.servlet.HashSessionIdManager">
- <Set name="workerName">node1</Set>
- </New>
- </Set>
- -->
-
- <!-- =========================================================== -->
- <!-- Set handler Collection Structure -->
- <!-- =========================================================== -->
- <Set name="handler">
- <New id="Handlers" class="org.mortbay.jetty.handler.HandlerCollection">
- <Set name="handlers">
- <Array type="org.mortbay.jetty.Handler">
- <Item>
- <New id="Contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection"/>
- </Item>
- <Item>
- <New id="DefaultHandler" class="org.mortbay.jetty.handler.DefaultHandler"/>
- </Item>
- <Item>
- <New id="RequestLog" class="org.mortbay.jetty.handler.RequestLogHandler"/>
- </Item>
- </Array>
- </Set>
- </New>
- </Set>
-
- <!-- =========================================================== -->
- <!-- Configure the context deployer -->
- <!-- A context deployer will deploy contexts described in -->
- <!-- configuration files discovered in a directory. -->
- <!-- The configuration directory can be scanned for hot -->
- <!-- deployments at the configured scanInterval. -->
- <!-- -->
- <!-- This deployer is configured to deploy contexts configured -->
- <!-- in the $JETTY_HOME/contexts directory -->
- <!-- -->
- <!-- =========================================================== -->
- <Call name="addLifeCycle">
- <Arg>
- <New class="org.mortbay.jetty.deployer.ContextDeployer">
- <Set name="contexts"><Ref id="Contexts"/></Set>
- <Set name="configurationDir"><SystemProperty name="jetty.home" default="."/>/contexts</Set>
- <Set name="scanInterval">1</Set>
- </New>
- </Arg>
- </Call>
-
- <!-- =========================================================== -->
- <!-- Configure the webapp deployer. -->
- <!-- A webapp deployer will deploy standard webapps discovered -->
- <!-- in a directory at startup, without the need for additional -->
- <!-- configuration files. It does not support hot deploy or -->
- <!-- non standard contexts (see ContextDeployer above). -->
- <!-- -->
- <!-- This deployer is configured to deploy webapps from the -->
- <!-- $JETTY_HOME/webapps directory -->
- <!-- -->
- <!-- Normally only one type of deployer need be used. -->
- <!-- -->
- <!-- =========================================================== -->
- <Call name="addLifeCycle">
- <Arg>
- <New class="org.mortbay.jetty.deployer.WebAppDeployer">
- <Set name="contexts"><Ref id="Contexts"/></Set>
- <Set name="webAppDir"><SystemProperty name="jetty.home" default="."/>/webapps</Set>
- <Set name="parentLoaderPriority">false</Set>
- <Set name="extract">true</Set>
- <Set name="allowDuplicates">false</Set>
- <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
- </New>
- </Arg>
- </Call>
-
- <!-- =========================================================== -->
- <!-- Configure Authentication Realms -->
- <!-- Realms may be configured for the entire server here, or -->
- <!-- they can be configured for a specific web app in a context -->
- <!-- configuration (see $(jetty.home)/contexts/test.xml for an -->
- <!-- example). -->
- <!-- =========================================================== -->
- <Set name="UserRealms">
- <Array type="org.mortbay.jetty.security.UserRealm">
- <!--
- <Item>
- <New class="org.mortbay.jetty.security.HashUserRealm">
- <Set name="name">Test Realm</Set>
- <Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set>
- </New>
- </Item>
- -->
- </Array>
- </Set>
-
- <!-- =========================================================== -->
- <!-- Configure Request Log -->
- <!-- Request logs may be configured for the entire server here, -->
- <!-- or they can be configured for a specific web app in a -->
- <!-- contexts configuration (see $(jetty.home)/contexts/test.xml -->
- <!-- for an example). -->
- <!-- =========================================================== -->
- <Ref id="RequestLog">
- <Set name="requestLog">
- <New id="RequestLogImpl" class="org.mortbay.jetty.NCSARequestLog">
- <Arg><SystemProperty name="jetty.logs" default="./logs"/>/yyyy_mm_dd.request.log</Arg>
- <Set name="retainDays">90</Set>
- <Set name="append">true</Set>
- <Set name="extended">false</Set>
- <Set name="LogTimeZone">GMT</Set>
- </New>
- </Set>
- </Ref>
-
- <!-- =========================================================== -->
- <!-- extra options -->
- <!-- =========================================================== -->
- <Set name="stopAtShutdown">true</Set>
- <!-- ensure/prevent Server: header being sent to browsers -->
- <Set name="sendServerVersion">true</Set>
-
-</Configure>
-
diff --git a/vendor/plugins/acts_as_solr/solr/etc/webdefault.xml b/vendor/plugins/acts_as_solr/solr/etc/webdefault.xml
deleted file mode 100644
index 83dc294e1..000000000
--- a/vendor/plugins/acts_as_solr/solr/etc/webdefault.xml
+++ /dev/null
@@ -1,379 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!-- ===================================================================== -->
-<!-- This file contains the default descriptor for web applications. -->
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-<!-- The intent of this descriptor is to include jetty specific or common -->
-<!-- configuration for all webapps. If a context has a webdefault.xml -->
-<!-- descriptor, it is applied before the contexts own web.xml file -->
-<!-- -->
-<!-- A context may be assigned a default descriptor by: -->
-<!-- + Calling WebApplicationContext.setDefaultsDescriptor -->
-<!-- + Passed an arg to addWebApplications -->
-<!-- -->
-<!-- This file is used both as the resource within the jetty.jar (which is -->
-<!-- used as the default if no explicit defaults descriptor is set) and it -->
-<!-- is copied to the etc directory of the Jetty distro and explicitly -->
-<!-- by the jetty.xml file. -->
-<!-- -->
-<!-- ===================================================================== -->
-<web-app
- xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
- metadata-complete="true"
- version="2.5">
-
- <description>
- Default web.xml file.
- This file is applied to a Web application before it's own WEB_INF/web.xml file
- </description>
-
-
- <!-- ==================================================================== -->
- <!-- Context params to control Session Cookies -->
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <!-- UNCOMMENT TO ACTIVATE
- <context-param>
- <param-name>org.mortbay.jetty.servlet.SessionDomain</param-name>
- <param-value>127.0.0.1</param-value>
- </context-param>
-
- <context-param>
- <param-name>org.mortbay.jetty.servlet.SessionPath</param-name>
- <param-value>/</param-value>
- </context-param>
-
- <context-param>
- <param-name>org.mortbay.jetty.servlet.MaxAge</param-name>
- <param-value>-1</param-value>
- </context-param>
- -->
-
- <context-param>
- <param-name>org.mortbay.jetty.webapp.NoTLDJarPattern</param-name>
- <param-value>start.jar|ant-.*\.jar|dojo-.*\.jar|jetty-.*\.jar|jsp-api-.*\.jar|junit-.*\.jar|servlet-api-.*\.jar|dnsns\.jar|rt\.jar|jsse\.jar|tools\.jar|sunpkcs11\.jar|sunjce_provider\.jar|xerces.*\.jar|</param-value>
- </context-param>
-
-
-
- <!-- ==================================================================== -->
- <!-- The default servlet. -->
- <!-- This servlet, normally mapped to /, provides the handling for static -->
- <!-- content, OPTIONS and TRACE methods for the context. -->
- <!-- The following initParameters are supported: -->
- <!-- -->
- <!-- acceptRanges If true, range requests and responses are -->
- <!-- supported -->
- <!-- -->
- <!-- dirAllowed If true, directory listings are returned if no -->
- <!-- welcome file is found. Else 403 Forbidden. -->
- <!-- -->
- <!-- redirectWelcome If true, redirect welcome file requests -->
- <!-- else use request dispatcher forwards -->
- <!-- -->
- <!-- gzip If set to true, then static content will be served-->
- <!-- as gzip content encoded if a matching resource is -->
- <!-- found ending with ".gz" -->
- <!-- -->
- <!-- resoureBase Can be set to replace the context resource base -->
- <!-- -->
- <!-- relativeResourceBase -->
- <!-- Set with a pathname relative to the base of the -->
- <!-- servlet context root. Useful for only serving -->
- <!-- static content from only specific subdirectories. -->
- <!-- -->
- <!-- useFileMappedBuffer -->
- <!-- If set to true (the default), a memory mapped -->
- <!-- file buffer will be used to serve static content -->
- <!-- when using an NIO connector. Setting this value -->
- <!-- to false means that a direct buffer will be used -->
- <!-- instead. If you are having trouble with Windows -->
- <!-- file locking, set this to false. -->
- <!-- -->
- <!-- cacheControl If set, all static content will have this value -->
- <!-- set as the cache-control header. -->
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <servlet>
- <servlet-name>default</servlet-name>
- <servlet-class>org.mortbay.jetty.servlet.DefaultServlet</servlet-class>
- <init-param>
- <param-name>acceptRanges</param-name>
- <param-value>true</param-value>
- </init-param>
- <init-param>
- <param-name>dirAllowed</param-name>
- <param-value>true</param-value>
- </init-param>
- <init-param>
- <param-name>redirectWelcome</param-name>
- <param-value>false</param-value>
- </init-param>
- <init-param>
- <param-name>maxCacheSize</param-name>
- <param-value>2000000</param-value>
- </init-param>
- <init-param>
- <param-name>maxCachedFileSize</param-name>
- <param-value>254000</param-value>
- </init-param>
- <init-param>
- <param-name>maxCachedFiles</param-name>
- <param-value>1000</param-value>
- </init-param>
- <init-param>
- <param-name>gzip</param-name>
- <param-value>false</param-value>
- </init-param>
- <init-param>
- <param-name>useFileMappedBuffer</param-name>
- <param-value>false</param-value>
- </init-param>
- <!--
- <init-param>
- <param-name>cacheControl</param-name>
- <param-value>max-age=3600,public</param-value>
- </init-param>
- -->
- <load-on-startup>0</load-on-startup>
- </servlet>
-
- <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
-
-
- <!-- ==================================================================== -->
- <!-- JSP Servlet -->
- <!-- This is the jasper JSP servlet from the jakarta project -->
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <!-- The JSP page compiler and execution servlet, which is the mechanism -->
- <!-- used by Glassfish to support JSP pages. Traditionally, this servlet -->
- <!-- is mapped to URL patterh "*.jsp". This servlet supports the -->
- <!-- following initialization parameters (default values are in square -->
- <!-- brackets): -->
- <!-- -->
- <!-- checkInterval If development is false and reloading is true, -->
- <!-- background compiles are enabled. checkInterval -->
- <!-- is the time in seconds between checks to see -->
- <!-- if a JSP page needs to be recompiled. [300] -->
- <!-- -->
- <!-- compiler Which compiler Ant should use to compile JSP -->
- <!-- pages. See the Ant documenation for more -->
- <!-- information. [javac] -->
- <!-- -->
- <!-- classdebuginfo Should the class file be compiled with -->
- <!-- debugging information? [true] -->
- <!-- -->
- <!-- classpath What class path should I use while compiling -->
- <!-- generated servlets? [Created dynamically -->
- <!-- based on the current web application] -->
- <!-- Set to ? to make the container explicitly set -->
- <!-- this parameter. -->
- <!-- -->
- <!-- development Is Jasper used in development mode (will check -->
- <!-- for JSP modification on every access)? [true] -->
- <!-- -->
- <!-- enablePooling Determines whether tag handler pooling is -->
- <!-- enabled [true] -->
- <!-- -->
- <!-- fork Tell Ant to fork compiles of JSP pages so that -->
- <!-- a separate JVM is used for JSP page compiles -->
- <!-- from the one Tomcat is running in. [true] -->
- <!-- -->
- <!-- ieClassId The class-id value to be sent to Internet -->
- <!-- Explorer when using <jsp:plugin> tags. -->
- <!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] -->
- <!-- -->
- <!-- javaEncoding Java file encoding to use for generating java -->
- <!-- source files. [UTF-8] -->
- <!-- -->
- <!-- keepgenerated Should we keep the generated Java source code -->
- <!-- for each page instead of deleting it? [true] -->
- <!-- -->
- <!-- logVerbosityLevel The level of detailed messages to be produced -->
- <!-- by this servlet. Increasing levels cause the -->
- <!-- generation of more messages. Valid values are -->
- <!-- FATAL, ERROR, WARNING, INFORMATION, and DEBUG. -->
- <!-- [WARNING] -->
- <!-- -->
- <!-- mappedfile Should we generate static content with one -->
- <!-- print statement per input line, to ease -->
- <!-- debugging? [false] -->
- <!-- -->
- <!-- -->
- <!-- reloading Should Jasper check for modified JSPs? [true] -->
- <!-- -->
- <!-- suppressSmap Should the generation of SMAP info for JSR45 -->
- <!-- debugging be suppressed? [false] -->
- <!-- -->
- <!-- dumpSmap Should the SMAP info for JSR45 debugging be -->
- <!-- dumped to a file? [false] -->
- <!-- False if suppressSmap is true -->
- <!-- -->
- <!-- scratchdir What scratch directory should we use when -->
- <!-- compiling JSP pages? [default work directory -->
- <!-- for the current web application] -->
- <!-- -->
- <!-- tagpoolMaxSize The maximum tag handler pool size [5] -->
- <!-- -->
- <!-- xpoweredBy Determines whether X-Powered-By response -->
- <!-- header is added by generated servlet [false] -->
- <!-- -->
- <!-- If you wish to use Jikes to compile JSP pages: -->
- <!-- Set the init parameter "compiler" to "jikes". Define -->
- <!-- the property "-Dbuild.compiler.emacs=true" when starting Jetty -->
- <!-- to cause Jikes to emit error messages in a format compatible with -->
- <!-- Jasper. -->
- <!-- If you get an error reporting that jikes can't use UTF-8 encoding, -->
- <!-- try setting the init parameter "javaEncoding" to "ISO-8859-1". -->
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <servlet id="jsp">
- <servlet-name>jsp</servlet-name>
- <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
- <init-param>
- <param-name>logVerbosityLevel</param-name>
- <param-value>DEBUG</param-value>
- </init-param>
- <init-param>
- <param-name>fork</param-name>
- <param-value>false</param-value>
- </init-param>
- <init-param>
- <param-name>xpoweredBy</param-name>
- <param-value>false</param-value>
- </init-param>
- <!--
- <init-param>
- <param-name>classpath</param-name>
- <param-value>?</param-value>
- </init-param>
- -->
- <load-on-startup>0</load-on-startup>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>jsp</servlet-name>
- <url-pattern>*.jsp</url-pattern>
- <url-pattern>*.jspf</url-pattern>
- <url-pattern>*.jspx</url-pattern>
- <url-pattern>*.xsp</url-pattern>
- <url-pattern>*.JSP</url-pattern>
- <url-pattern>*.JSPF</url-pattern>
- <url-pattern>*.JSPX</url-pattern>
- <url-pattern>*.XSP</url-pattern>
- </servlet-mapping>
-
- <!-- ==================================================================== -->
- <!-- Dynamic Servlet Invoker. -->
- <!-- This servlet invokes anonymous servlets that have not been defined -->
- <!-- in the web.xml or by other means. The first element of the pathInfo -->
- <!-- of a request passed to the envoker is treated as a servlet name for -->
- <!-- an existing servlet, or as a class name of a new servlet. -->
- <!-- This servlet is normally mapped to /servlet/* -->
- <!-- This servlet support the following initParams: -->
- <!-- -->
- <!-- nonContextServlets If false, the invoker can only load -->
- <!-- servlets from the contexts classloader. -->
- <!-- This is false by default and setting this -->
- <!-- to true may have security implications. -->
- <!-- -->
- <!-- verbose If true, log dynamic loads -->
- <!-- -->
- <!-- * All other parameters are copied to the -->
- <!-- each dynamic servlet as init parameters -->
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <!-- Uncomment for dynamic invocation
- <servlet>
- <servlet-name>invoker</servlet-name>
- <servlet-class>org.mortbay.jetty.servlet.Invoker</servlet-class>
- <init-param>
- <param-name>verbose</param-name>
- <param-value>false</param-value>
- </init-param>
- <init-param>
- <param-name>nonContextServlets</param-name>
- <param-value>false</param-value>
- </init-param>
- <init-param>
- <param-name>dynamicParam</param-name>
- <param-value>anyValue</param-value>
- </init-param>
- <load-on-startup>0</load-on-startup>
- </servlet>
-
- <servlet-mapping> <servlet-name>invoker</servlet-name> <url-pattern>/servlet/*</url-pattern> </servlet-mapping>
- -->
-
-
-
- <!-- ==================================================================== -->
- <session-config>
- <session-timeout>30</session-timeout>
- </session-config>
-
- <!-- ==================================================================== -->
- <!-- Default MIME mappings -->
- <!-- The default MIME mappings are provided by the mime.properties -->
- <!-- resource in the org.mortbay.jetty.jar file. Additional or modified -->
- <!-- mappings may be specified here -->
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <!-- UNCOMMENT TO ACTIVATE
- <mime-mapping>
- <extension>mysuffix</extension>
- <mime-type>mymime/type</mime-type>
- </mime-mapping>
- -->
-
- <!-- ==================================================================== -->
- <welcome-file-list>
- <welcome-file>index.html</welcome-file>
- <welcome-file>index.htm</welcome-file>
- <welcome-file>index.jsp</welcome-file>
- </welcome-file-list>
-
- <!-- ==================================================================== -->
- <locale-encoding-mapping-list>
- <locale-encoding-mapping><locale>ar</locale><encoding>ISO-8859-6</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>be</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>bg</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>ca</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>cs</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>da</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>de</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>el</locale><encoding>ISO-8859-7</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>en</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>es</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>et</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>fi</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>fr</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>hr</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>hu</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>is</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>it</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>iw</locale><encoding>ISO-8859-8</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>ja</locale><encoding>Shift_JIS</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>ko</locale><encoding>EUC-KR</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>lt</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>lv</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>mk</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>nl</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>no</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>pl</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>pt</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>ro</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>ru</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>sh</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>sk</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>sl</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>sq</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>sr</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>sv</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>tr</locale><encoding>ISO-8859-9</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>uk</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>zh</locale><encoding>GB2312</encoding></locale-encoding-mapping>
- <locale-encoding-mapping><locale>zh_TW</locale><encoding>Big5</encoding></locale-encoding-mapping>
- </locale-encoding-mapping-list>
-
-
-
-</web-app>
-
diff --git a/vendor/plugins/acts_as_solr/solr/lib/commons-codec-1.3.jar b/vendor/plugins/acts_as_solr/solr/lib/commons-codec-1.3.jar
deleted file mode 100644
index 957b6752a..000000000
--- a/vendor/plugins/acts_as_solr/solr/lib/commons-codec-1.3.jar
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/solr/lib/commons-csv-0.1-SNAPSHOT.jar b/vendor/plugins/acts_as_solr/solr/lib/commons-csv-0.1-SNAPSHOT.jar
deleted file mode 100644
index 8e096258a..000000000
--- a/vendor/plugins/acts_as_solr/solr/lib/commons-csv-0.1-SNAPSHOT.jar
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/solr/lib/commons-fileupload-1.2.jar b/vendor/plugins/acts_as_solr/solr/lib/commons-fileupload-1.2.jar
deleted file mode 100644
index 12539f5ed..000000000
--- a/vendor/plugins/acts_as_solr/solr/lib/commons-fileupload-1.2.jar
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/solr/lib/commons-io-1.2.jar b/vendor/plugins/acts_as_solr/solr/lib/commons-io-1.2.jar
deleted file mode 100644
index b2867cdde..000000000
--- a/vendor/plugins/acts_as_solr/solr/lib/commons-io-1.2.jar
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/solr/lib/easymock.jar b/vendor/plugins/acts_as_solr/solr/lib/easymock.jar
deleted file mode 100644
index c4159f5a0..000000000
--- a/vendor/plugins/acts_as_solr/solr/lib/easymock.jar
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/solr/lib/jetty-6.1.3.jar b/vendor/plugins/acts_as_solr/solr/lib/jetty-6.1.3.jar
deleted file mode 100644
index ad3d529a4..000000000
--- a/vendor/plugins/acts_as_solr/solr/lib/jetty-6.1.3.jar
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/solr/lib/jetty-util-6.1.3.jar b/vendor/plugins/acts_as_solr/solr/lib/jetty-util-6.1.3.jar
deleted file mode 100644
index 101543bc9..000000000
--- a/vendor/plugins/acts_as_solr/solr/lib/jetty-util-6.1.3.jar
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/solr/lib/jsp-2.1/ant-1.6.5.jar b/vendor/plugins/acts_as_solr/solr/lib/jsp-2.1/ant-1.6.5.jar
deleted file mode 100644
index 3beb3b802..000000000
--- a/vendor/plugins/acts_as_solr/solr/lib/jsp-2.1/ant-1.6.5.jar
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/solr/lib/jsp-2.1/core-3.1.1.jar b/vendor/plugins/acts_as_solr/solr/lib/jsp-2.1/core-3.1.1.jar
deleted file mode 100644
index ae0b63586..000000000
--- a/vendor/plugins/acts_as_solr/solr/lib/jsp-2.1/core-3.1.1.jar
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/solr/lib/jsp-2.1/jsp-2.1.jar b/vendor/plugins/acts_as_solr/solr/lib/jsp-2.1/jsp-2.1.jar
deleted file mode 100644
index 8bb6fcfea..000000000
--- a/vendor/plugins/acts_as_solr/solr/lib/jsp-2.1/jsp-2.1.jar
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/solr/lib/jsp-2.1/jsp-api-2.1.jar b/vendor/plugins/acts_as_solr/solr/lib/jsp-2.1/jsp-api-2.1.jar
deleted file mode 100644
index bbba01f3d..000000000
--- a/vendor/plugins/acts_as_solr/solr/lib/jsp-2.1/jsp-api-2.1.jar
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/solr/lib/lucene-analyzers-2007-05-20_00-04-53.jar b/vendor/plugins/acts_as_solr/solr/lib/lucene-analyzers-2007-05-20_00-04-53.jar
deleted file mode 100644
index ae81757ba..000000000
--- a/vendor/plugins/acts_as_solr/solr/lib/lucene-analyzers-2007-05-20_00-04-53.jar
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/solr/lib/lucene-core-2007-05-20_00-04-53.jar b/vendor/plugins/acts_as_solr/solr/lib/lucene-core-2007-05-20_00-04-53.jar
deleted file mode 100644
index fe7339b42..000000000
--- a/vendor/plugins/acts_as_solr/solr/lib/lucene-core-2007-05-20_00-04-53.jar
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/solr/lib/lucene-highlighter-2007-05-20_00-04-53.jar b/vendor/plugins/acts_as_solr/solr/lib/lucene-highlighter-2007-05-20_00-04-53.jar
deleted file mode 100644
index 4afdc9155..000000000
--- a/vendor/plugins/acts_as_solr/solr/lib/lucene-highlighter-2007-05-20_00-04-53.jar
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/solr/lib/lucene-snowball-2007-05-20_00-04-53.jar b/vendor/plugins/acts_as_solr/solr/lib/lucene-snowball-2007-05-20_00-04-53.jar
deleted file mode 100644
index 39924cab8..000000000
--- a/vendor/plugins/acts_as_solr/solr/lib/lucene-snowball-2007-05-20_00-04-53.jar
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/solr/lib/lucene-spellchecker-2007-05-20_00-04-53.jar b/vendor/plugins/acts_as_solr/solr/lib/lucene-spellchecker-2007-05-20_00-04-53.jar
deleted file mode 100644
index 8ea4154c7..000000000
--- a/vendor/plugins/acts_as_solr/solr/lib/lucene-spellchecker-2007-05-20_00-04-53.jar
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/solr/lib/servlet-api-2.4.jar b/vendor/plugins/acts_as_solr/solr/lib/servlet-api-2.4.jar
deleted file mode 100644
index 018d6effa..000000000
--- a/vendor/plugins/acts_as_solr/solr/lib/servlet-api-2.4.jar
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/solr/lib/servlet-api-2.5-6.1.3.jar b/vendor/plugins/acts_as_solr/solr/lib/servlet-api-2.5-6.1.3.jar
deleted file mode 100644
index 8e9777d56..000000000
--- a/vendor/plugins/acts_as_solr/solr/lib/servlet-api-2.5-6.1.3.jar
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/solr/lib/xpp3-1.1.3.4.O.jar b/vendor/plugins/acts_as_solr/solr/lib/xpp3-1.1.3.4.O.jar
deleted file mode 100644
index 002ef69f0..000000000
--- a/vendor/plugins/acts_as_solr/solr/lib/xpp3-1.1.3.4.O.jar
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/solr/solr/.cvsignore b/vendor/plugins/acts_as_solr/solr/solr/.cvsignore
deleted file mode 100644
index 1269488f7..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-data
diff --git a/vendor/plugins/acts_as_solr/solr/solr/README.txt b/vendor/plugins/acts_as_solr/solr/solr/README.txt
deleted file mode 100644
index f39ad34db..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/README.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-Example "Solr Home" Directory
-=============================
-
-This directory is provided as an example of what a "Solr Home" directory
-should look like.
-
-It's not strictly necessary that you copy all of the files in this
-directory when setting up a new instance of Solr, but it is recommended.
-
-
-Basic Directory Structure
--------------------------
-
-The Solr Home directory typically contains the following subdirectories...
-
- conf/
- This directory is mandatory and must contain your solrconfig.xml
- and schema.xml. Any other optional configuration files would also
- be kept here.
-
- data/
- This directory is the default location where Solr will keep your
- index, and is used by the replication scripts for dealing with
- snapshots. You can override this location in the solrconfig.xml
- and scripts.conf files. Solr will create this directory if it
- does not already exist.
-
- lib/
- This directory is optional. If it exists, Solr will load any Jars
- found in this directory and use them to resolve any "plugins"
- specified in your solrconfig.xml or schema.xml (ie: Analyzers,
- Request Handlers, etc...)
-
- bin/
- This directory is optional. It is the default location used for
- keeping the replication scripts.
diff --git a/vendor/plugins/acts_as_solr/solr/solr/bin/abc b/vendor/plugins/acts_as_solr/solr/solr/bin/abc
deleted file mode 100755
index 5d48415cd..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/bin/abc
+++ /dev/null
@@ -1,176 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Shell script to make an Atomic Backup after Commit of
-# a Solr Lucene collection.
-
-orig_dir=$(pwd)
-cd ${0%/*}/..
-solr_root=$(pwd)
-cd ${orig_dir}
-curl_url=""
-
-unset solr_hostname solr_port data_dir webapp_name user verbose debug solr_url
-. ${solr_root}/bin/scripts-util
-
-# set up variables
-prog=${0##*/}
-log=${solr_root}/logs/${prog}.log
-
-# define usage string
-USAGE="\
-usage: $prog [-h hostname] [-p port] [-d dir] [-w webappname] [-u username] [-U url] [-v] [-V]
- -h specify Solr hostname (defaults to localhost)
- -p specify Solr port number
- -w specify name of Solr webapp (defaults to solr)
- -u specify user to sudo to before running script
- -U specify full update url (overrides -h,-p,-w parameters)
- -d specify directory holding index data
- -v increase verbosity
- -V output debugging info
-"
-
-# parse args
-while getopts h:p:d:w:u:U:vV OPTION
-do
- case $OPTION in
- h)
- solr_hostname="$OPTARG"
- ;;
- p)
- solr_port="$OPTARG"
- ;;
- d)
- data_dir="$OPTARG"
- ;;
- w)
- webapp_name="$OPTARG"
- ;;
- u)
- user="$OPTARG"
- ;;
- U)
- solr_url="$OPTARG"
- ;;
- v)
- verbose="v"
- ;;
- V)
- debug="V"
- ;;
- *)
- echo "$USAGE"
- exit 1
- esac
-done
-
-[[ -n $debug ]] && set -x
-
-# use default value for data_dir if not specified
-# relative path starts at ${solr_root}
-if [[ -z ${data_dir} ]]
-then
- data_dir=${solr_root}/data
-elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]
-then
- data_dir=${solr_root}/${data_dir}
-fi
-
-if [[ -n ${solr_url} ]]
-then
- curl_url=${solr_url}
-else
- if [[ -z ${solr_port} ]]
- then
- echo "Solr port number missing in $confFile or command line."
- echo "$USAGE"
- exit 1
- fi
-
- # use default hostname if not specified
- if [[ -z ${solr_hostname} ]]
- then
- solr_hostname=localhost
- fi
-
- # use default webapp name if not specified
- if [[ -z ${webapp_name} ]]
- then
- webapp_name=solr
- fi
- curl_url=http://${solr_hostname}:${solr_port}/${webapp_name}/update
-fi
-
-fixUser "$@"
-
-start=`date +"%s"`
-
-logMessage started by $oldwhoami
-logMessage command: $0 $@
-
-logMessage sending commit to Solr server at ${curl_url}
-rs=`curl ${curl_url} -s -H 'Content-type:text/xml; charset=utf-8' -d "<commit/>"`
-if [[ $? != 0 ]]
-then
- logMessage failed to connect to Solr server at ${curl_url}
- logMessage commit failed
- logExit failed 1
-fi
-
-# check status of commit request
-echo $rs | grep '<result.*status="0"' > /dev/null 2>&1
-if [[ $? != 0 ]]
-then
- logMessage commit request to Solr at ${curl_url} failed:
- logMessage $rs
- logExit failed 2
-fi
-
-# successful commit creates a snapshot file synchronously
-lastsnap=`ls -drt1 ${data_dir}/snapshot.* 2> /dev/null | tail -1 `
-
-if [[ $lastsnap == "" ]]
-then
- logMessage commit did not create snapshot at ${curl_url}, backup failed:
- logExit failed 3
-fi
-
-name=backup.${lastsnap##*snapshot.}
-temp=temp-${name}
-
-if [[ -d ${data_dir}/${name} ]]
-then
- logMessage backup directory ${data_dir}/${name} already exists
- logExit aborted 1
-fi
-
-if [[ -d ${data_dir}/${temp} ]]
-then
- logMessage backingup of ${data_dir}/${name} in progress
- logExit aborted 1
-fi
-logMessage making backup ${data_dir}/${name}
-
-# clean up after INT/TERM
-trap 'echo cleaning up, please wait ...;/bin/rm -rf ${data_dir}/${name} ${data_dir}/${temp};logExit aborted 13' INT TERM
-
-# make a backup using hard links into temporary location
-# then move it into place atomically
-cp -lr ${lastsnap} ${data_dir}/${temp}
-mv ${data_dir}/${temp} ${data_dir}/${name}
-
-logExit ended 0
diff --git a/vendor/plugins/acts_as_solr/solr/solr/bin/abo b/vendor/plugins/acts_as_solr/solr/solr/bin/abo
deleted file mode 100755
index dc0c1678a..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/bin/abo
+++ /dev/null
@@ -1,176 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Shell script to make an Atomic Backup after Optimize of
-# a Solr Lucene collection.
-
-orig_dir=$(pwd)
-cd ${0%/*}/..
-solr_root=$(pwd)
-cd ${orig_dir}
-curl_url=""
-
-unset solr_hostname solr_port data_dir webapp_name user verbose debug solr_url
-. ${solr_root}/bin/scripts-util
-
-# set up variables
-prog=${0##*/}
-log=${solr_root}/logs/${prog}.log
-
-# define usage string
-USAGE="\
-usage: $prog [-h hostname] [-p port] [-d dir] [-w webapp_name] [-u username] [-U url] [-v] [-V]
- -h specify Solr hostname (defaults to localhost)
- -p specify Solr port number
- -w specify name of Solr webapp (defaults to solr)
- -u specify user to sudo to before running script
- -U specify full update url (overrides -h,-p,-w parameters)
- -d specify directory holding index data (defaults to data)
- -v increase verbosity
- -V output debugging info
-"
-
-# parse args
-while getopts h:p:d:w:u:U:vV OPTION
-do
- case $OPTION in
- h)
- solr_hostname="$OPTARG"
- ;;
- p)
- solr_port="$OPTARG"
- ;;
- d)
- data_dir="$OPTARG"
- ;;
- w)
- webapp_name="$OPTARG"
- ;;
- u)
- user="$OPTARG"
- ;;
- U)
- solr_url="$OPTARG"
- ;;
- v)
- verbose="v"
- ;;
- V)
- debug="V"
- ;;
- *)
- echo "$USAGE"
- exit 1
- esac
-done
-
-[[ -n $debug ]] && set -x
-
-# use default value for data_dir if not specified
-# relative path starts at ${solr_root}
-if [[ -z ${data_dir} ]]
-then
- data_dir=${solr_root}/data
-elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]
-then
- data_dir=${solr_root}/${data_dir}
-fi
-
-if [[ -n ${solr_url} ]]
-then
- curl_url=${solr_url}
-else
- if [[ -z ${solr_port} ]]
- then
- echo "Solr port number missing in $confFile or command line."
- echo "$USAGE"
- exit 1
- fi
-
- # use default hostname if not specified
- if [[ -z ${solr_hostname} ]]
- then
- solr_hostname=localhost
- fi
-
- # use default webapp name if not specified
- if [[ -z ${webapp_name} ]]
- then
- webapp_name=solr
- fi
- curl_url=http://${solr_hostname}:${solr_port}/${webapp_name}/update
-fi
-
-fixUser "$@"
-
-start=`date +"%s"`
-
-logMessage started by $oldwhoami
-logMessage command: $0 $@
-
-logMessage sending optimize to Solr server at ${curl_url}
-rs=`curl ${curl_url} -s -H 'Content-type:text/xml; charset=utf-8' -d "<optimize/>"`
-if [[ $? != 0 ]]
-then
- logMessage failed to connect to Solr server at ${curl_url}
- logMessage optimize failed
- logExit failed 1
-fi
-
-# check status of optimize request
-echo $rs | grep '<result.*status="0"' > /dev/null 2>&1
-if [[ $? != 0 ]]
-then
- logMessage optimize request to Solr at ${curl_url} failed:
- logMessage $rs
- logExit failed 2
-fi
-
-# successful optimize creates a snapshot file synchronously
-lastsnap=`ls -drt1 ${data_dir}/snapshot.* | tail -1 `
-
-if [[ $lastsnap == "" ]]
-then
- logMessage commit did not create snapshot at ${curl_url}, backup failed:
- logExit failed 3
-fi
-
-name=backup.${lastsnap##*snapshot.}
-temp=temp-${name}
-
-if [[ -d ${data_dir}/${name} ]]
-then
- logMessage backup directory ${data_dir}/${name} already exists
- logExit aborted 1
-fi
-
-if [[ -d ${data_dir}/${temp} ]]
-then
- logMessage backingup of ${data_dir}/${name} in progress
- logExit aborted 1
-fi
-logMessage making backup ${data_dir}/${name}
-
-# clean up after INT/TERM
-trap 'echo cleaning up, please wait ...;/bin/rm -rf ${data_dir}/${name} ${data_dir}/${temp};logExit aborted 13' INT TERM
-
-# make a backup using hard links into temporary location
-# then move it into place atomically
-cp -lr ${lastsnap} ${data_dir}/${temp}
-mv ${data_dir}/${temp} ${data_dir}/${name}
-
-logExit ended 0
diff --git a/vendor/plugins/acts_as_solr/solr/solr/bin/backup b/vendor/plugins/acts_as_solr/solr/solr/bin/backup
deleted file mode 100755
index 1fc3b185d..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/bin/backup
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Shell script to make a backup of a Solr Lucene collection.
-
-orig_dir=$(pwd)
-cd ${0%/*}/..
-solr_root=$(pwd)
-cd ${orig_dir}
-
-unset data_dir user verbose debug
-. ${solr_root}/bin/scripts-util
-
-# set up variables
-prog=${0##*/}
-log=${solr_root}/logs/${prog}.log
-
-# define usage string
-USAGE="\
-usage: $prog [-d dir] [-u username] [-v]
- -d specify directory holding index data
- -u specify user to sudo to before running script
- -v increase verbosity
- -V output debugging info
-"
-
-# parse args
-while getopts d:u:vV OPTION
-do
- case $OPTION in
- d)
- data_dir="$OPTARG"
- ;;
- u)
- user="$OPTARG"
- ;;
- v)
- verbose="v"
- ;;
- V)
- debug="V"
- ;;
- *)
- echo "$USAGE"
- exit 1
- esac
-done
-
-[[ -n $debug ]] && set -x
-
-# use default value for data_dir if not specified
-# relative path starts at ${solr_root}
-if [[ -z ${data_dir} ]]
-then
- data_dir=${solr_root}/data
-elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]
-then
- data_dir=${solr_root}/${data_dir}
-fi
-
-fixUser "$@"
-
-start=`date +"%s"`
-
-logMessage started by $oldwhoami
-logMessage command: $0 $@
-
-name=backup.`date +"%Y%m%d%H%M%S"`
-temp=temp-${name}
-
-if [[ -d ${data_dir}/${name} ]]
-then
- logMessage backup directory ${data_dir}/${name} already exists
- logExit aborted 1
-fi
-
-if [[ -d ${data_dir}/${temp} ]]
-then
- logMessage backingup of ${data_dir}/${name} in progress
- logExit aborted 1
-fi
-
-# clean up after INT/TERM
-trap 'echo cleaning up, please wait ...;/bin/rm -rf ${data_dir}/${name} ${data_dir}/${temp};logExit aborted 13' INT TERM
-
-logMessage making backup ${data_dir}/${name}
-
-# make a backup using hard links into temporary location
-# then move it into place atomically
-cp -lr ${data_dir}/index ${data_dir}/${temp}
-mv ${data_dir}/${temp} ${data_dir}/${name}
-
-logExit ended 0
-
diff --git a/vendor/plugins/acts_as_solr/solr/solr/bin/backupcleaner b/vendor/plugins/acts_as_solr/solr/solr/bin/backupcleaner
deleted file mode 100755
index 6c2ac7ca9..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/bin/backupcleaner
+++ /dev/null
@@ -1,142 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Shell script to clean up backups of a Solr Lucene collection.
-
-orig_dir=$(pwd)
-cd ${0%/*}/..
-solr_root=$(pwd)
-cd ${orig_dir}
-
-unset days num data_dir user verbose debug
-. ${solr_root}/bin/scripts-util
-
-# set up variables
-prog=${0##*/}
-log=${solr_root}/logs/${prog}.log
-
-# define usage string
-USAGE="\
-usage: $prog -D <days> | -N <num> [-d dir] [-u username] [-v]
- -D <days> cleanup backups more than <days> days old
- -N <num> keep the most recent <num> number of backups and
- cleanup up the remaining ones that are not being pulled
- -d specify directory holding index data
- -u specify user to sudo to before running script
- -v increase verbosity
- -V output debugging info
-"
-
-# parse args
-while getopts D:N:d:u:vV OPTION
-do
- case $OPTION in
- D)
- days="$OPTARG"
- ;;
- N)
- num="$OPTARG"
- ;;
- d)
- data_dir="$OPTARG"
- ;;
- u)
- user="$OPTARG"
- ;;
- v)
- verbose="v"
- ;;
- V)
- debug="V"
- ;;
- *)
- echo "$USAGE"
- exit 1
- esac
-done
-
-[[ -n $debug ]] && set -x
-
-if [[ -z ${days} && -z ${num} ]]
-then
- echo "$USAGE"
- exit 1
-fi
-
-fixUser "$@"
-
-# use default value for data_dir if not specified
-# relative path starts at ${solr_root}
-if [[ -z ${data_dir} ]]
-then
- data_dir=${solr_root}/data
-elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]
-then
- data_dir=${solr_root}/${data_dir}
-fi
-
-function remove
-{
- logMessage removing backup $1
- /bin/rm -rf $1
-}
-
-start=`date +"%s"`
-
-logMessage started by $oldwhoami
-logMessage command: $0 $@
-
-# trap control-c
-trap 'echo "caught INT/TERM, exiting now but partial cleanup may have already occured";logExit aborted 13' INT TERM
-
-if [[ -n ${days} ]]
-then
- #is maxdepth supported?
- find ${data_dir} -maxdepth 0 -name foobar >/dev/null 2>&1
- if [ $? = 0 ]; then
- maxdepth="-maxdepth 1"
- else
- unset maxdepth
- fi
-
- logMessage cleaning up backups more than ${days} days old
- for i in `find ${data_dir} ${maxdepth} -name 'backup.*' -mtime +${days} -print`
- do
- remove $i
- done
-elif [[ -n ${num} ]]
-then
- logMessage cleaning up all backups except for the most recent ${num} ones
- unset backups count
- backups=`ls -cd ${data_dir}/backup.* 2>/dev/null`
- if [[ $? == 0 ]]
- then
- count=`echo $backups|wc -w`
- startpos=`expr $num + 1`
- if [[ $count -gt $num ]]
- then
- for i in `echo $backups|cut -f${startpos}- -d" "`
- do
- remove $i
- done
- fi
- fi
-fi
-
-logExit ended 0
-
-
diff --git a/vendor/plugins/acts_as_solr/solr/solr/bin/commit b/vendor/plugins/acts_as_solr/solr/solr/bin/commit
deleted file mode 100755
index 872e1cd26..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/bin/commit
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Shell script to force a commit of all changes since last commit
-# for a Solr server
-
-orig_dir=$(pwd)
-cd ${0%/*}/..
-solr_root=$(pwd)
-cd ${orig_dir}
-curl_url=""
-
-unset solr_hostname solr_port webapp_name user verbose debug solr_url
-. ${solr_root}/bin/scripts-util
-
-# set up variables
-prog=${0##*/}
-log=${solr_root}/logs/${prog}.log
-
-# define usage string
-USAGE="\
-usage: $prog [-h hostname] [-p port] [-w webapp_name] [-u username] [-U url] [-v] [-V]
- -h specify Solr hostname (defaults to localhost)
- -p specify Solr port number
- -w specify name of Solr webapp (defaults to solr)
- -u specify user to sudo to before running script
- -U specify full update url (overrides -h,-p,-w parameters)
- -v increase verbosity
- -V output debugging info
-"
-
-# parse args
-while getopts h:p:w:u:U:vV OPTION
-do
- case $OPTION in
- h)
- solr_hostname="$OPTARG"
- ;;
- p)
- solr_port="$OPTARG"
- ;;
- w)
- webapp_name="$OPTARG"
- ;;
- u)
- user="$OPTARG"
- ;;
- U)
- solr_url="$OPTARG"
- ;;
- v)
- verbose="v"
- ;;
- V)
- debug="V"
- ;;
- *)
- echo "$USAGE"
- exit 1
- esac
-done
-
-[[ -n $debug ]] && set -x
-
-if [[ -n ${solr_url} ]]
-then
- curl_url=${solr_url}
-else
- if [[ -z ${solr_port} ]]
- then
- echo "Solr port number missing in $confFile or command line."
- echo "$USAGE"
- exit 1
- fi
-
- # use default hostname if not specified
- if [[ -z ${solr_hostname} ]]
- then
- solr_hostname=localhost
- fi
-
- # use default webapp name if not specified
- if [[ -z ${webapp_name} ]]
- then
- webapp_name=solr
- fi
- curl_url=http://${solr_hostname}:${solr_port}/${webapp_name}/update
-fi
-
-fixUser "$@"
-
-start=`date +"%s"`
-
-logMessage started by $oldwhoami
-logMessage command: $0 $@
-
-rs=`curl ${curl_url} -s -H 'Content-type:text/xml; charset=utf-8' -d "<commit/>"`
-if [[ $? != 0 ]]
-then
- logMessage failed to connect to Solr server at ${curl_url}
- logMessage commit failed
- logExit failed 1
-fi
-
-# check status of commit request
-echo $rs | grep '<result.*status="0"' > /dev/null 2>&1
-if [[ $? != 0 ]]
-then
- logMessage commit request to Solr at ${curl_url} failed:
- logMessage $rs
- logExit failed 2
-fi
-
-logExit ended 0
diff --git a/vendor/plugins/acts_as_solr/solr/solr/bin/optimize b/vendor/plugins/acts_as_solr/solr/solr/bin/optimize
deleted file mode 100755
index 446996e5d..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/bin/optimize
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Shell script to force a optimized commit of all changes since last commit
-# for a Solr server
-
-orig_dir=$(pwd)
-cd ${0%/*}/..
-solr_root=$(pwd)
-cd ${orig_dir}
-curl_url=""
-
-unset solr_hostname solr_port webapp_name user verbose debug solr_url
-. ${solr_root}/bin/scripts-util
-
-# set up variables
-prog=${0##*/}
-log=${solr_root}/logs/${prog}.log
-
-# define usage string
-USAGE="\
-usage: $prog [-h hostname] [-p port] [-u username] [-U url] [-v] [-V]
- -h specify Solr hostname (defaults to localhost)
- -p specify Solr port number
- -w specify name of Solr webapp (defaults to solr)
- -u specify user to sudo to before running script
- -U specify full update url (overrides -h,-p,-w parameters)
- -v increase verbosity
- -V output debugging info
-"
-
-# parse args
-originalargs="$@"
-while getopts h:p:w:u:U:vV OPTION
-do
- case $OPTION in
- h)
- solr_hostname="$OPTARG"
- ;;
- p)
- solr_port="$OPTARG"
- ;;
- w)
- webapp_name="$OPTARG"
- ;;
- u)
- user="$OPTARG"
- ;;
- U)
- solr_url="$OPTARG"
- ;;
- v)
- verbose="v"
- ;;
- V)
- debug="V"
- ;;
- *)
- echo "$USAGE"
- exit 1
- esac
-done
-
-[[ -n $debug ]] && set -x
-
-if [[ -n ${solr_url} ]]
-then
- curl_url=${solr_url}
-else
- if [[ -z ${solr_port} ]]
- then
- echo "Solr port number missing in $confFile or command line."
- echo "$USAGE"
- exit 1
- fi
-
- # use default hostname if not specified
- if [[ -z ${solr_hostname} ]]
- then
- solr_hostname=localhost
- fi
-
- # use default webapp name if not specified
- if [[ -z ${webapp_name} ]]
- then
- webapp_name=solr
- fi
- curl_url=http://${solr_hostname}:${solr_port}/${webapp_name}/update
-fi
-
-fixUser "$@"
-
-start=`date +"%s"`
-
-logMessage started by $oldwhoami
-logMessage command: $0 $@
-
-rs=`curl ${curl_url} -s -H 'Content-type:text/xml; charset=utf-8' -d "<optimize/>"`
-if [[ $? != 0 ]]
-then
- logMessage failed to connect to Solr server at ${curl_url}
- logMessage optimize failed
- logExit failed 1
-fi
-
-# check status of optimize request
-rc=`echo $rs|cut -f2 -d'"'`
-if [[ $? != 0 ]]
-then
- logMessage optimize request to Solr at ${curl_url} failed:
- logMessage $rs
- logExit failed 2
-fi
-
-logExit ended 0
diff --git a/vendor/plugins/acts_as_solr/solr/solr/bin/readercycle b/vendor/plugins/acts_as_solr/solr/solr/bin/readercycle
deleted file mode 100755
index 6a99d630d..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/bin/readercycle
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Shell script to force all old readers closed and a new reader to be opened
-# for a Solr server
-
-orig_dir=$(pwd)
-cd ${0%/*}/..
-solr_root=$(pwd)
-cd ${orig_dir}
-curl_url=""
-
-unset solr_hostname solr_port webapp_name user verbose debug solr_url
-. ${solr_root}/bin/scripts-util
-
-# set up variables
-prog=${0##*/}
-log=${solr_root}/logs/${prog}.log
-
-# define usage string
-USAGE="\
-usage: $prog [-p hostname] [-p port] [-w webapp_name] [-u username] [-U url] [-v] [-V]
- -h specify Solr hostname (defaults to localhost)
- -p specify Solr port number
- -w specify name of Solr webapp (defaults to solr)
- -u specify user to sudo to before running script
- -U specify full update url (overrides -h,-p,-w parameters)
- -v increase verbosity
- -V output debugging info
-"
-
-# parse args
-originalargs="$@"
-while getopts h:p:w:u:U:vV OPTION
-do
- case $OPTION in
- h)
- solr_hostname="$OPTARG"
- ;;
- p)
- solr_port="$OPTARG"
- ;;
- w)
- webapp_name="$OPTARG"
- ;;
- u)
- user="$OPTARG"
- ;;
- U)
- solr_url="$OPTARG"
- ;;
- v)
- verbose="v"
- ;;
- V)
- debug="V"
- ;;
- *)
- echo "$USAGE"
- exit 1
- esac
-done
-
-[[ -n $debug ]] && set -x
-
-if [[ -n ${solr_url} ]]
-then
- curl_url=${solr_url}
-else
- if [[ -z ${solr_port} ]]
- then
- echo "Solr port number missing in $confFile or command line."
- echo "$USAGE"
- exit 1
- fi
-
- # use default hostname if not specified
- if [[ -z ${solr_hostname} ]]
- then
- solr_hostname=localhost
- fi
-
- # use default webapp name if not specified
- if [[ -z ${webapp_name} ]]
- then
- webapp_name=solr
- fi
- curl_url=http://${solr_hostname}:${solr_port}/${webapp_name}/update
-fi
-
-fixUser "$@"
-
-start=`date +"%s"`
-
-logMessage started by $oldwhoami
-logMessage command: $0 $@
-
-rs=`curl ${curl_url} -s -H 'Content-type:text/xml; charset=utf-8' -d "<commit/>"`
-if [[ $? != 0 ]]
-then
- logMessage failed to connect to Solr server at ${curl_url}
- logMessage reader cycle failed
- logExit failed 1
-fi
-
-# check status of commit request
-echo $rs | grep '<response.*status="0"' > /dev/null 2>&1
-if [[ $? != 0 ]]
-then
- logMessage reader cycle request to Solr at ${curl_url} failed:
- logMessage $rs
- logExit failed 2
-fi
-
-logExit ended 0
diff --git a/vendor/plugins/acts_as_solr/solr/solr/bin/rsyncd-disable b/vendor/plugins/acts_as_solr/solr/solr/bin/rsyncd-disable
deleted file mode 100755
index 4affdac85..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/bin/rsyncd-disable
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Shell script to disable rsyncd
-
-orig_dir=$(pwd)
-cd ${0%/*}/..
-solr_root=$(pwd)
-cd ${orig_dir}
-
-unset user verbose debug
-. ${solr_root}/bin/scripts-util
-
-# set up variables
-prog=${0##*/}
-log=${solr_root}/logs/rsyncd.log
-
-# define usage string
-USAGE="\
-usage: $prog [-u username] [-v]
- -u specify user to sudo to before running script
- -v increase verbosity
- -V output debugging info
-"
-
-# parse args
-while getopts u:vV OPTION
-do
- case $OPTION in
- u)
- user="$OPTARG"
- ;;
- v)
- verbose="v"
- ;;
- V)
- debug="V"
- ;;
- *)
- echo "$USAGE"
- exit 1
- esac
-done
-
-[[ -n $debug ]] && set -x
-
-fixUser "$@"
-
-start=`date +"%s"`
-
-logMessage disabled by $oldwhoami
-logMessage command: $0 $@
-name=${solr_root}/logs/rsyncd-enabled
-
-if [[ -f ${name} ]]
-then
- rm -f ${name}
-else
- logMessage rsyncd not currently enabled
- logExit exited 1
-fi
-
-logExit ended 0
diff --git a/vendor/plugins/acts_as_solr/solr/solr/bin/rsyncd-enable b/vendor/plugins/acts_as_solr/solr/solr/bin/rsyncd-enable
deleted file mode 100755
index da2a97a59..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/bin/rsyncd-enable
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Shell script to enable rsyncd
-
-orig_dir=$(pwd)
-cd ${0%/*}/..
-solr_root=$(pwd)
-cd ${orig_dir}
-
-unset user verbose debug
-. ${solr_root}/bin/scripts-util
-
-# set up variables
-log=${solr_root}/logs/rsyncd.log
-
-# define usage string
-USAGE="\
-usage: $prog [-u username] [-v]
- -u specify user to sudo to before running script
- -v increase verbosity
- -V output debugging info
-"
-
-# parse args
-while getopts u:vV OPTION
-do
- case $OPTION in
- u)
- user="$OPTARG"
- ;;
- v)
- verbose="v"
- ;;
- V)
- debug="V"
- ;;
- *)
- echo "$USAGE"
- exit 1
- esac
-done
-
-[[ -n $debug ]] && set -x
-
-fixUser "$@"
-
-start=`date +"%s"`
-
-logMessage enabled by $oldwhoami
-logMessage command: $0 $@
-name=${solr_root}/logs/rsyncd-enabled
-
-if [[ -f ${name} ]]
-then
- logMessage rsyncd already currently enabled
- logExit exited 1
-else
- touch ${name}
-fi
-
-logExit ended 0
diff --git a/vendor/plugins/acts_as_solr/solr/solr/bin/rsyncd-start b/vendor/plugins/acts_as_solr/solr/solr/bin/rsyncd-start
deleted file mode 100755
index 6bfc130c2..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/bin/rsyncd-start
+++ /dev/null
@@ -1,145 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Shell script to start rsyncd on master Solr server
-
-orig_dir=$(pwd)
-cd ${0%/*}/..
-solr_root=$(pwd)
-cd ${orig_dir}
-
-unset data_dir solr_port rsyncd_port user verbose debug
-. ${solr_root}/bin/scripts-util
-
-# set up variables
-prog=${0##*/}
-log=${solr_root}/logs/rsyncd.log
-
-# define usage string
-USAGE="\
-usage: $prog [-d dir] [-p portnum] [-u username] [-v]
- -d specify directory holding index data
- -p specify rsyncd port number
- -u specify user to sudo to before running script
- -v increase verbosity
- -V output debugging info
-"
-
-# parse args
-while getopts d:p:u:vV OPTION
-do
- case $OPTION in
- d)
- data_dir="$OPTARG"
- ;;
- p)
- rsyncd_port="$OPTARG"
- ;;
- u)
- user="$OPTARG"
- ;;
- v)
- verbose="v"
- ;;
- V)
- debug="V"
- ;;
- *)
- echo "$USAGE"
- exit 1
- esac
-done
-
-[[ -n $debug ]] && set -x
-
-fixUser "$@"
-
-# try to determine rsyncd port number from $confFile if not specified on
-# command line, default to solr_port+10000
-if [[ -z ${rsyncd_port} ]]
-then
- if [[ "${solr_port}" ]]
- then
- rsyncd_port=`expr 10000 + ${solr_port}`
- else
- echo "rsyncd port number missing in $confFile or command line."
- echo "$USAGE"
- exit 1
- fi
-fi
-
-# use default value for data_dir if not specified
-# relative path starts at ${solr_root}
-if [[ -z ${data_dir} ]]
-then
- data_dir=${solr_root}/data
-elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]
-then
- data_dir=${solr_root}/${data_dir}
-fi
-
-logMessage started by $oldwhoami
-logMessage command: $0 $@
-
-if [[ ! -f ${solr_root}/logs/rsyncd-enabled ]]
-then
- logMessage rsyncd disabled
- exit 1
-fi
-
-if \
- rsync rsync://localhost:${rsyncd_port} >/dev/null 2>&1
-then
- logMessage "rsyncd already running at port ${rsyncd_port}"
- exit 1
-fi
-
-# create conf/rsyncd.conf on the fly, creating solrlogs directory if needed
-if [[ ! -d ${solr_root}/conf ]]
-then
- mkdir ${solr_root}/conf
-fi
-cat <<EOF > ${solr_root}/conf/rsyncd.conf
-#### rsyncd.conf file ####
-
-uid = $(whoami)
-gid = $(whoami)
-use chroot = no
-list = no
-pid file = ${solr_root}/logs/rsyncd.pid
-log file = ${solr_root}/logs/rsyncd.log
-[solr]
- path = ${data_dir}
- comment = Solr
-EOF
-
-rsync --daemon --port=${rsyncd_port} --config=${solr_root}/conf/rsyncd.conf
-
-# first make sure rsyncd is accepting connections
-i=1
-while \
- ! rsync rsync://localhost:${rsyncd_port} >/dev/null 2>&1
-do
- if (( i++ > 15 ))
- then
- logMessage "rsyncd not accepting connections, exiting" >&2
- exit 2
- fi
- sleep 1
-done
-
-logMessage rsyncd started with data_dir=${data_dir} and accepting requests
diff --git a/vendor/plugins/acts_as_solr/solr/solr/bin/rsyncd-stop b/vendor/plugins/acts_as_solr/solr/solr/bin/rsyncd-stop
deleted file mode 100755
index d19b054cf..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/bin/rsyncd-stop
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Shell script to stop rsyncd on master Solr server
-
-orig_dir=$(pwd)
-cd ${0%/*}/..
-solr_root=$(pwd)
-cd ${orig_dir}
-
-unset user verbose debug
-. ${solr_root}/bin/scripts-util
-
-# set up variables
-prog=${0##*/}
-log=${solr_root}/logs/rsyncd.log
-
-# define usage string
-USAGE="\
-usage: $prog [-u username] [-v]
- -u specify user to sudo to before running script
- -v increase verbosity
- -V output debugging info
-"
-
-# parse args
-while getopts u:vV OPTION
-do
- case $OPTION in
- u)
- user="$OPTARG"
- ;;
- v)
- verbose="v"
- ;;
- V)
- debug="V"
- ;;
- *)
- echo "$USAGE"
- exit 1
- esac
-done
-
-[[ -n $debug ]] && set -x
-
-fixUser "$@"
-
-logMessage stopped by $oldwhoami
-logMessage command: $0 $@
-
-# look for pid file
-if [[ ! -f ${solr_root}/logs/rsyncd.pid ]]
-then
- logMessage "missing rsyncd pid file ${solr_root}/logs/rsyncd.pid"
- exit 2
-fi
-
-# get PID from file
-pid=$(<${solr_root}/logs/rsyncd.pid)
-if [[ -z $pid ]]
-then
- logMessage "unable to get rsyncd's PID"
- exit 2
-fi
-
-kill $pid
-
-# wait until rsyncd dies or we time out
-dead=0
-timer=0
-timeout=300
-while (( ! dead && timer < timeout ))
-do
- if ps -eo pid | grep -qw $pid
- then
- kill $pid
- (( timer++ ))
- sleep 1
- else
- dead=1
- fi
-done
-if ps -eo pid | grep -qw $pid
-then
- logMessage rsyncd failed to stop after $timeout seconds
- exit 3
-fi
-
-# remove rsyncd.conf
-/bin/rm -f ${solr_root}/conf/rsyncd.conf
diff --git a/vendor/plugins/acts_as_solr/solr/solr/bin/scripts-util b/vendor/plugins/acts_as_solr/solr/solr/bin/scripts-util
deleted file mode 100755
index 953bcc81e..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/bin/scripts-util
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# util functions used by scripts
-
-export PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
-
-# set up variables
-prog=${0##*/}
-
-# source the config file if present
-confFile=${solr_root}/conf/scripts.conf
-if [[ -f $confFile ]]
-then
- . $confFile
-fi
-
-function fixUser
-{
-# set user to $(whoami) if not specified
- if [[ -z ${user} ]]
- then
- user=$(whoami)
- fi
-
-# sudo
- if [[ $(whoami) != ${user} ]]
- then
- sudo -u ${user} $0 "$@"
- exit $?
- fi
-
- oldwhoami=$(who -m | cut -d' ' -f1 | sed -e's/^.*!//')
-
- if [[ "${oldwhoami}" == "" ]]
- then
- oldwhoami=`ps h -Hfp $(pgrep -g0 ${0##*/}) | tail -1|cut -f1 -d" "`
- fi
-}
-
-function timeStamp
-{
- date +'%Y/%m/%d %H:%M:%S'
-}
-
-function logMessage
-{
- echo $(timeStamp) $@>>$log
- if [[ -n ${verbose} ]]
- then
- echo $@
- fi
-}
-
-function logExit
-{
- end=`date +"%s"`
- diff=`expr $end - $start`
- echo "$(timeStamp) $1 (elapsed time: $diff sec)">>$log
- exit $2
-}
-
-# create logs directory if not there
-if [[ ! -d ${solr_root}/logs ]]
-then
- mkdir ${solr_root}/logs
-fi
-
-umask 002
diff --git a/vendor/plugins/acts_as_solr/solr/solr/bin/snapcleaner b/vendor/plugins/acts_as_solr/solr/solr/bin/snapcleaner
deleted file mode 100755
index 5301de3a7..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/bin/snapcleaner
+++ /dev/null
@@ -1,148 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Shell script to clean up snapshots of a Solr Lucene collection.
-
-orig_dir=$(pwd)
-cd ${0%/*}/..
-solr_root=$(pwd)
-cd ${orig_dir}
-
-unset days num data_dir user verbose debug
-. ${solr_root}/bin/scripts-util
-
-# set up variables
-prog=${0##*/}
-log=${solr_root}/logs/${prog}.log
-
-# define usage string
-USAGE="\
-usage: $prog -D <days> | -N <num> [-d dir] [-u username] [-v]
- -D <days> cleanup snapshots more than <days> days old
- -N <num> keep the most recent <num> number of snapshots and
- cleanup up the remaining ones that are not being pulled
- -d specify directory holding index data
- -u specify user to sudo to before running script
- -v increase verbosity
- -V output debugging info
-"
-
-# parse args
-while getopts D:N:d:u:vV OPTION
-do
- case $OPTION in
- D)
- days="$OPTARG"
- ;;
- N)
- num="$OPTARG"
- ;;
- d)
- data_dir="$OPTARG"
- ;;
- u)
- user="$OPTARG"
- ;;
- v)
- verbose="v"
- ;;
- V)
- debug="V"
- ;;
- *)
- echo "$USAGE"
- exit 1
- esac
-done
-
-[[ -n $debug ]] && set -x
-
-if [[ -z ${days} && -z ${num} ]]
-then
- echo "$USAGE"
- exit 1
-fi
-
-fixUser "$@"
-
-# use default value for data_dir if not specified
-# relative path starts at ${solr_root}
-if [[ -z ${data_dir} ]]
-then
- data_dir=${solr_root}/data
-elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]
-then
- data_dir=${solr_root}/${data_dir}
-fi
-
-function remove
-{
- syncing=`ps -fwwwu ${user}|grep -w rsync|grep -v grep|grep -w $1`
- if [[ -n $syncing ]]
- then
- logMessage $1 not removed - rsync in progress
- else
- logMessage removing snapshot $1
- /bin/rm -rf $1
- fi
-}
-
-start=`date +"%s"`
-
-logMessage started by $oldwhoami
-logMessage command: $0 $@
-
-# trap control-c
-trap 'echo "caught INT/TERM, exiting now but partial cleanup may have already occured";logExit aborted 13' INT TERM
-
-if [[ -n ${days} ]]
-then
- #is maxdepth supported?
- find ${data_dir} -maxdepth 0 -name foobar >/dev/null 2>&1
- if [ $? = 0 ]; then
- maxdepth="-maxdepth 1"
- else
- unset maxdepth
- fi
-
- logMessage cleaning up snapshots more than ${days} days old
- for i in `find ${data_dir} ${maxdepth} -name 'snapshot.*' -mtime +${days} -print`
- do
- remove $i
- done
-elif [[ -n ${num} ]]
-then
- logMessage cleaning up all snapshots except for the most recent ${num} ones
- unset snapshots count
- snapshots=`ls -cd ${data_dir}/snapshot.* 2>/dev/null`
- if [[ $? == 0 ]]
- then
- count=`echo $snapshots|wc -w`
- startpos=`expr $num + 1`
- if [[ $count -gt $num ]]
- then
- for i in `echo $snapshots|cut -f${startpos}- -d" "`
- do
- remove $i
- done
- fi
- fi
-fi
-
-logExit ended 0
-
-
diff --git a/vendor/plugins/acts_as_solr/solr/solr/bin/snapinstaller b/vendor/plugins/acts_as_solr/solr/solr/bin/snapinstaller
deleted file mode 100755
index f716e1a0b..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/bin/snapinstaller
+++ /dev/null
@@ -1,168 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Shell script to install a snapshot into place as the Lucene collection
-# for a Solr server
-
-orig_dir=$(pwd)
-cd ${0%/*}/..
-solr_root=$(pwd)
-cd ${orig_dir}
-
-unset master_host master_status_dir data_dir user verbose debug
-. ${solr_root}/bin/scripts-util
-
-# set up variables
-prog=${0##*/}
-log=${solr_root}/logs/${prog}.log
-
-# define usage string
-USAGE="\
-usage: $prog [-M master] [-S sdir] [-d dir] [-u username] [-v]
- -M master specify hostname of master server from where to pull index
- snapshot
- -S specify directory holding snapshot status on master server
- -d specify directory holding index data on local machine
- -u specify user to sudo to before running script
- -v increase verbosity
- -V output debugging info
-"
-
-# parse args
-while getopts M:S:d:u:vV OPTION
-do
- case $OPTION in
- M)
- master_host="$OPTARG"
- ;;
- S)
- master_status_dir="$OPTARG"
- ;;
- d)
- data_dir="$OPTARG"
- ;;
- u)
- user="$OPTARG"
- ;;
- v)
- verbose="v"
- ;;
- V)
- debug="V"
- ;;
- *)
- echo "$USAGE"
- exit 1
- esac
-done
-
-[[ -n $debug ]] && set -x
-
-if [[ -z ${master_host} ]]
-then
- echo "name of master server missing in $confFile or command line."
- echo "$USAGE"
- exit 1
-fi
-
-if [[ -z ${master_status_dir} ]]
-then
- echo "directory holding snapshot status on master server missing in $confFile or command line."
- echo "$USAGE"
- exit 1
-fi
-
-fixUser "$@"
-
-# use default value for data_dir if not specified
-# relative path starts at ${solr_root}
-if [[ -z ${data_dir} ]]
-then
- data_dir=${solr_root}/data
-elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]
-then
- data_dir=${solr_root}/${data_dir}
-fi
-
-# assume relative path to start at ${solr_root}
-if [[ "`echo ${master_status_dir}|cut -c1`" != "/" ]]
-then
- master_status_dir=${solr_root}/${master_status_dir}
-fi
-
-start=`date +"%s"`
-
-logMessage started by $oldwhoami
-logMessage command: $0 $@
-
-# get directory name of latest snapshot
-name=`ls ${data_dir}|grep 'snapshot\.'|grep -v wip|sort -r|head -1`
-
-# clean up after INT/TERM
-trap 'echo "caught INT/TERM, exiting now but partial installation may have already occured";/bin/rm -rf ${data_dir"/index.tmp$$;logExit aborted 13' INT TERM
-
-# is there a snapshot
-if [[ "${name}" == "" ]]
-then
- logMessage no shapshot available
- logExit ended 0
-fi
-
-name=${data_dir}/${name}
-
-# has snapshot already been installed
-if [[ ${name} == `cat ${solr_root}/logs/snapshot.current 2>/dev/null` ]]
-then
- logMessage latest snapshot ${name} already installed
- logExit ended 0
-fi
-
-# make sure master has directory for hold slaves stats/state
-if
- ! ssh -o StrictHostKeyChecking=no ${master_host} mkdir -p ${master_status_dir}
-then
- logMessage failed to ssh to master ${master_host}, snapshot status not updated on master
-fi
-
-# install using hard links into temporary directory
-# remove original index and then atomically copy new one into place
-logMessage installing snapshot ${name}
-cp -lr ${name}/ ${data_dir}/index.tmp$$
-/bin/rm -rf ${data_dir}/index
-mv -f ${data_dir}/index.tmp$$ ${data_dir}/index
-
-# update distribution stats
-echo ${name} > ${solr_root}/logs/snapshot.current
-
-# push stats/state to master
-if
- ! scp -q -o StrictHostKeyChecking=no ${solr_root}/logs/snapshot.current ${master_host}:${master_status_dir}/snapshot.current.`uname -n`
-then
- logMessage failed to ssh to master ${master_host}, snapshot status not updated on master
-fi
-
-# notify Solr to open a new Searcher
-logMessage notifing Solr to open a new Searcher
-${solr_root}/bin/commit
-if [[ $? != 0 ]]
-then
- logMessage failed to connect to Solr server
- logMessage snapshot installed but Solr server has not open a new Searcher
- logExit failed 1
-fi
-
-logExit ended 0
diff --git a/vendor/plugins/acts_as_solr/solr/solr/bin/snappuller b/vendor/plugins/acts_as_solr/solr/solr/bin/snappuller
deleted file mode 100755
index 7bab54dc6..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/bin/snappuller
+++ /dev/null
@@ -1,248 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Shell script to copy snapshots of a Solr Lucene collection from the master
-
-orig_dir=$(pwd)
-cd ${0%/*}/..
-solr_root=$(pwd)
-cd ${orig_dir}
-
-unset master_host rsyncd_port master_data_dir master_status_dir snap_name
-unset sizeonly stats data_dir user verbose debug compress startStatus
-. ${solr_root}/bin/scripts-util
-
-# set up variables
-prog=${0##*/}
-log=${solr_root}/logs/${prog}.log
-
-# define usage string
-USAGE="\
-usage: $prog [-M master] [-P portnum] [-D mdir] [-S sdir] [-n snapshot] [-d dir] [-u username] [-svz]
- -M master specify hostname of master server from where to pull index
- snapshot
- -P port specify rsyncd port number of master server from where to
- pull index snapshot
- -D specify directory holding index data on master server
- -S specify directory holding snapshot status on master server
- -n snapshot pull a specific snapshot by name
- -d specify directory holding index data on local machine
- -u specify user to sudo to before running script
- -s use the --size-only option with rsync
- -v increase verbosity (-vv show file transfer stats also)
- -V output debugging info
- -z enable compression of data
-"
-
-# parse args
-while getopts M:P:D:S:n:d:u:svVz OPTION
-do
- case $OPTION in
- M)
- master_host="$OPTARG"
- ;;
- P)
- rsyncd_port="$OPTARG"
- ;;
- D)
- master_data_dir="$OPTARG"
- ;;
- S)
- master_status_dir="$OPTARG"
- ;;
- n)
- snap_name="$OPTARG"
- ;;
- d)
- data_dir="$OPTARG"
- ;;
- u)
- user="$OPTARG"
- ;;
- s)
- sizeonly="--size-only"
- ;;
- v)
- [[ -n $verbose ]] && stats="--stats" || verbose=v
- ;;
- V)
- debug="V"
- ;;
- z)
- compress="z"
- ;;
- *)
- echo "$USAGE"
- exit 1
- esac
-done
-
-[[ -n $debug ]] && set -x
-
-if [[ -z ${master_host} ]]
-then
- echo "name of master server missing in $confFile or command line."
- echo "$USAGE"
- exit 1
-fi
-
-# try to determine rsyncd port number from $confFile if not specified on
-# command line, default to solr_port+10000
-if [[ -z ${rsyncd_port} ]]
-then
- if [[ "${solr_port}" ]]
- then
- rsyncd_port=`expr 10000 + ${solr_port}`
- else
- echo "rsyncd port number of master server missing in $confFile or command line."
- echo "$USAGE"
- exit 1
- fi
-fi
-
-if [[ -z ${master_data_dir} ]]
-then
- echo "directory holding index data on master server missing in $confFile or command line."
- echo "$USAGE"
- exit 1
-fi
-
-if [[ -z ${master_status_dir} ]]
-then
- echo "directory holding snapshot status on master server missing in $confFile or command line."
- echo "$USAGE"
- exit 1
-fi
-
-fixUser "$@"
-
-# use default value for data_dir if not specified
-# relative path starts at ${solr_root}
-if [[ -z ${data_dir} ]]
-then
- data_dir=${solr_root}/data
-elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]
-then
- data_dir=${solr_root}/${data_dir}
-fi
-
-# assume relative path to start at ${solr_root}
-if [[ "`echo ${master_data_dir}|cut -c1`" != "/" ]]
-then
- master_data_dir=${solr_root}/${master_data_dir}
-fi
-if [[ "`echo ${master_status_dir}|cut -c1`" != "/" ]]
-then
- master_status_dir=${solr_root}/${master_status_dir}
-fi
-
-# push stats/state to master if necessary
-function pushStatus
-{
- scp -q -o StrictHostKeyChecking=no ${solr_root}/logs/snappuller.status ${master_host}:${master_status_dir}/snapshot.status.`uname -n`
-}
-
-start=`date +"%s"`
-
-logMessage started by $oldwhoami
-logMessage command: $0 $@
-
-if [[ ! -f ${solr_root}/logs/snappuller-enabled ]]
-then
- logMessage snappuller disabled
- exit 1
-fi
-
-# make sure we can ssh to master
-if
- ! ssh -o StrictHostKeyChecking=no ${master_host} id 1>/dev/null 2>&1
-then
- logMessage failed to ssh to master ${master_host}
- exit 1
-fi
-
-# get directory name of latest snapshot if not specified on command line
-if [[ -z ${snap_name} ]]
-then
- snap_name=`ssh -o StrictHostKeyChecking=no ${master_host} "ls ${master_data_dir}|grep 'snapshot\.'|grep -v wip|sort -r|head -1"`
-fi
-if [[ "${snap_name}" == "" ]]
-then
- logMessage no snapshot available on ${master_host} in ${master_data_dir}
- logExit ended 0
-else
- name=`basename ${snap_name}`
-fi
-
-# clean up after INT/TERM
-trap 'echo cleaning up, please wait ...;/bin/rm -rf ${data_dir}/${name} ${data_dir}/${name}-wip;echo ${startStatus} aborted:$(timeStamp)>${solr_root}/logs/snappuller.status;pushStatus;logExit aborted 13' INT TERM
-
-if [[ -d ${data_dir}/${name} || -d ${data_dir}/${name}-wip ]]
-then
- logMessage no new snapshot available on ${master_host} in ${master_data_dir}
- logExit ended 0
-fi
-
-# take a snapshot of current index so that only modified files will be rsync-ed
-# put the snapshot in the 'work-in-progress" directory to prevent it from
-# being installed while the copying is still in progress
-cp -lr ${data_dir}/index ${data_dir}/${name}-wip
-# force rsync of segments and .del files since we are doing size-only
-if [[ -n ${sizeonly} ]]
-then
- rm -f ${data_dir}/${name}-wip/segments
- rm -f ${data_dir}/${name}-wip/*.del
-fi
-
-logMessage pulling snapshot ${name}
-
-# make sure master has directory for hold slaves stats/state
-ssh -o StrictHostKeyChecking=no ${master_host} mkdir -p ${master_status_dir}
-
-# start new distribution stats
-rsyncStart=`date`
-startTimestamp=`date -d "$rsyncStart" +'%Y%m%d-%H%M%S'`
-rsyncStartSec=`date -d "$rsyncStart" +'%s'`
-startStatus="rsync of `basename ${name}` started:$startTimestamp"
-echo ${startStatus} > ${solr_root}/logs/snappuller.status
-pushStatus
-
-# rsync over files that have changed
-rsync -Wa${verbose}${compress} --delete ${sizeonly} \
-${stats} rsync://${master_host}:${rsyncd_port}/solr/${name}/ ${data_dir}/${name}-wip
-
-rc=$?
-rsyncEnd=`date`
-endTimestamp=`date -d "$rsyncEnd" +'%Y%m%d-%H%M%S'`
-rsyncEndSec=`date -d "$rsyncEnd" +'%s'`
-elapsed=`expr $rsyncEndSec - $rsyncStartSec`
-if [[ $rc != 0 ]]
-then
- logMessage rsync failed
- /bin/rm -rf ${data_dir}/${name}-wip
- echo ${startStatus} failed:$endTimestamp > ${solr_root}/logs/snappuller.status
- pushStatus
- logExit failed 1
-fi
-
-# move into place atomically
-mv ${data_dir}/${name}-wip ${data_dir}/${name}
-
-# finish new distribution stats`
-echo ${startStatus} ended:$endTimestamp rsync-elapsed:${elapsed} > ${solr_root}/logs/snappuller.status
-pushStatus
-logExit ended 0
diff --git a/vendor/plugins/acts_as_solr/solr/solr/bin/snappuller-disable b/vendor/plugins/acts_as_solr/solr/solr/bin/snappuller-disable
deleted file mode 100755
index 9bf3f836e..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/bin/snappuller-disable
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Shell script to disable snappuller
-
-orig_dir=$(pwd)
-cd ${0%/*}/..
-solr_root=$(pwd)
-cd ${orig_dir}
-
-unset user verbose debug
-. ${solr_root}/bin/scripts-util
-
-# set up variables
-prog=${0##*/}
-log=${solr_root}/logs/snappuller.log
-
-# define usage string
-USAGE="\
-usage: $prog [-u username] [-v]
- -u specify user to sudo to before running script
- -v increase verbosity
- -V output debugging info
-"
-
-# parse args
-while getopts u:vV OPTION
-do
- case $OPTION in
- u)
- user="$OPTARG"
- ;;
- v)
- verbose="v"
- ;;
- V)
- debug="V"
- ;;
- *)
- echo "$USAGE"
- exit 1
- esac
-done
-
-[[ -n $debug ]] && set -x
-
-fixUser "$@"
-
-start=`date +"%s"`
-
-logMessage disabled by $oldwhoami
-logMessage command: $0 $@
-name=${solr_root}/logs/snappuller-enabled
-
-if [[ -f ${name} ]]
-then
- rm -f ${name}
-else
- logMessage snappuller not currently enabled
- logExit exited 1
-fi
-
-logExit ended 0
diff --git a/vendor/plugins/acts_as_solr/solr/solr/bin/snappuller-enable b/vendor/plugins/acts_as_solr/solr/solr/bin/snappuller-enable
deleted file mode 100755
index b379ba13a..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/bin/snappuller-enable
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Shell script to enable snappuller
-
-orig_dir=$(pwd)
-cd ${0%/*}/..
-solr_root=$(pwd)
-cd ${orig_dir}
-
-unset user verbose debug
-. ${solr_root}/bin/scripts-util
-
-# set up variables
-prog=${0##*/}
-log=${solr_root}/logs/snappuller.log
-
-# define usage string
-USAGE="\
-usage: $prog [-u username] [-v]
- -u specify user to sudo to before running script
- -v increase verbosity
- -V output debugging info
-"
-
-# parse args
-while getopts u:vV OPTION
-do
- case $OPTION in
- u)
- user="$OPTARG"
- ;;
- v)
- verbose="v"
- ;;
- V)
- debug="V"
- ;;
- *)
- echo "$USAGE"
- exit 1
- esac
-done
-
-[[ -n $debug ]] && set -x
-
-fixUser "$@"
-
-start=`date +"%s"`
-
-logMessage enabled by $oldwhoami
-logMessage command: $0 $@
-name=${solr_root}/logs/snappuller-enabled
-
-if [[ -f ${name} ]]
-then
- logMessage snappuller already currently enabled
- logExit exited 1
-else
- touch ${name}
-fi
-
-logExit ended 0
diff --git a/vendor/plugins/acts_as_solr/solr/solr/bin/snapshooter b/vendor/plugins/acts_as_solr/solr/solr/bin/snapshooter
deleted file mode 100755
index f172f7c2b..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/bin/snapshooter
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Shell script to take a snapshot of a Solr Lucene collection.
-
-orig_dir=$(pwd)
-cd ${0%/*}/..
-solr_root=$(pwd)
-cd ${orig_dir}
-
-unset data_dir user verbose debug
-. ${solr_root}/bin/scripts-util
-
-# set up variables
-prog=${0##*/}
-log=${solr_root}/logs/${prog}.log
-
-# define usage string
-USAGE="\
-usage: $prog [-d dir] [-u username] [-v]
- -d specify directory holding index data
- -u specify user to sudo to before running script
- -v increase verbosity
- -V output debugging info
-"
-
-# parse args
-while getopts d:u:vV OPTION
-do
- case $OPTION in
- d)
- data_dir="$OPTARG"
- ;;
- u)
- user="$OPTARG"
- ;;
- v)
- verbose="v"
- ;;
- V)
- debug="V"
- ;;
- *)
- echo "$USAGE"
- exit 1
- esac
-done
-
-[[ -n $debug ]] && set -x
-
-fixUser "$@"
-
-# use default value for data_dir if not specified
-# relative path starts at ${solr_root}
-if [[ -z ${data_dir} ]]
-then
- data_dir=${solr_root}/data
-elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]
-then
- data_dir=${solr_root}/${data_dir}
-fi
-
-start=`date +"%s"`
-
-logMessage started by $oldwhoami
-logMessage command: $0 $@
-
-snap_name=snapshot.`date +"%Y%m%d%H%M%S"`
-name=${data_dir}/${snap_name}
-temp=${data_dir}/temp-${snap_name}
-
-if [[ -d ${name} ]]
-then
- logMessage snapshot directory ${name} already exists
- logExit aborted 1
-fi
-
-if [[ -d ${temp} ]]
-then
- logMessage snapshoting of ${name} in progress
- logExit aborted 1
-fi
-
-# clean up after INT/TERM
-trap 'echo cleaning up, please wait ...;/bin/rm -rf ${name} ${temp};logExit aborted 13' INT TERM
-
-logMessage taking snapshot ${name}
-
-# take a snapshot using hard links into temporary location
-# then move it into place atomically
-cp -lr ${data_dir}/index ${temp}
-mv ${temp} ${name}
-
-logExit ended 0
-
diff --git a/vendor/plugins/acts_as_solr/solr/solr/conf/admin-extra.html b/vendor/plugins/acts_as_solr/solr/solr/conf/admin-extra.html
deleted file mode 100644
index aa739da86..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/conf/admin-extra.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- The content of this page will be statically included into the top
-of the admin page. Uncomment this as an example to see there the content
-will show up.
-
-<hr>
-<i>This line will appear before the first table</i>
-<tr>
-<td colspan="2">
-This row will be appended to the end of the first table
-</td>
-</tr>
-<hr>
-
--->
diff --git a/vendor/plugins/acts_as_solr/solr/solr/conf/protwords.txt b/vendor/plugins/acts_as_solr/solr/solr/conf/protwords.txt
deleted file mode 100644
index 1dfc0abec..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/conf/protwords.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#-----------------------------------------------------------------------
-# Use a protected word file to protect against the stemmer reducing two
-# unrelated words to the same base word.
-
-# Some non-words that normally won't be encountered,
-# just to test that they won't be stemmed.
-dontstems
-zwhacky
-
diff --git a/vendor/plugins/acts_as_solr/solr/solr/conf/schema.xml b/vendor/plugins/acts_as_solr/solr/solr/conf/schema.xml
deleted file mode 100644
index 753de7315..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/conf/schema.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!--
- This is the Solr schema file. This file should be named "schema.xml" and
- should be in the conf directory under the solr home
- (i.e. ./solr/conf/schema.xml by default)
- or located where the classloader for the Solr webapp can find it.
-
- This example schema is the recommended starting point for users.
- It should be kept correct and concise, usable out-of-the-box.
-
- For more information, on how to customize this file, please see
- http://wiki.apache.org/solr/SchemaXml
--->
-
-<schema name="acts_as_solr" version="0.9">
- <types>
- <fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="false"/>
- <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="false"/>
- <fieldType name="integer" class="solr.IntField" omitNorms="false"/>
- <fieldType name="long" class="solr.LongField" omitNorms="false"/>
- <fieldType name="float" class="solr.FloatField" omitNorms="false"/>
- <fieldType name="double" class="solr.DoubleField" omitNorms="false"/>
- <fieldType name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="false"/>
- <fieldType name="slong" class="solr.SortableLongField" sortMissingLast="true" omitNorms="false"/>
- <fieldType name="sfloat" class="solr.SortableFloatField" sortMissingLast="true" omitNorms="false"/>
- <fieldType name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true" omitNorms="false"/>
- <fieldType name="date" class="solr.DateField" sortMissingLast="true" omitNorms="false"/>
- <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
- <analyzer>
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
- </analyzer>
- </fieldType>
-
- <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
- <analyzer type="index">
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
- <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
- <filter class="solr.LowerCaseFilterFactory"/>
- <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
- <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
- </analyzer>
- <analyzer type="query">
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
- <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0"/>
- <filter class="solr.LowerCaseFilterFactory"/>
- <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
- <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
- </analyzer>
- </fieldType>
-
- <fieldType name="textTight" class="solr.TextField" positionIncrementGap="100" >
- <analyzer>
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
- <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
- <filter class="solr.LowerCaseFilterFactory"/>
- <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
- <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
- </analyzer>
- </fieldType>
-
- <fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="false">
- <analyzer>
- <tokenizer class="solr.KeywordTokenizerFactory"/>
- <filter class="solr.LowerCaseFilterFactory" />
- <filter class="solr.TrimFilterFactory" />
- <filter class="solr.PatternReplaceFilterFactory" pattern="([^a-z])" replacement="" replace="all"/>
- </analyzer>
- </fieldType>
-
- <fieldtype name="text_zh" class="solr.TextField">
- <analyzer class="org.apache.lucene.analysis.cn.ChineseAnalyzer"/>
- </fieldtype>
-
- </types>
-
-
- <fields>
- <field name="id" type="string" indexed="true" stored="true" required="true" />
- <field name="pk_i" type="integer" indexed="true" stored="true"/>
- <field name="pk_s" type="string" indexed="true" stored="true"/>
- <field name="text" type="text" indexed="true" stored="false" multiValued="true"/>
-
- <dynamicField name="*_i" type="integer" indexed="true" stored="false"/>
- <dynamicField name="*_t" type="text" indexed="true" stored="true"/>
- <dynamicField name="*_f" type="float" indexed="true" stored="false"/>
- <dynamicField name="*_b" type="boolean" indexed="true" stored="false"/>
- <dynamicField name="*_d" type="date" indexed="true" stored="false"/>
- <dynamicField name="*_s" type="string" indexed="true" stored="false"/>
- <dynamicField name="*_ri" type="sint" indexed="true" stored="false"/>
- <dynamicField name="*_rf" type="sfloat" indexed="true" stored="false"/>
- <dynamicField name="*_facet" type="string" indexed="true" stored="false"/>
- <dynamicField name="*_s_mv" type="string" indexed="true" stored="false" multiValued="true"/>
- <dynamicField name="*_zh_text" type="text_zh" indexed="true" stored="false" multiValued="true"/>
- <dynamicField name="*_display" type="text" indexed="false" stored="true" multiValued="true"/>
- </fields>
-
- <uniqueKey>id</uniqueKey>
- <defaultSearchField>text</defaultSearchField>
-
- <copyField source="*_t" dest="text"/>
- <copyField source="*_facet" dest="text"/>
- <solrQueryParser defaultOperator="AND"/>
-
-</schema>
diff --git a/vendor/plugins/acts_as_solr/solr/solr/conf/scripts.conf b/vendor/plugins/acts_as_solr/solr/solr/conf/scripts.conf
deleted file mode 100644
index f58b262ae..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/conf/scripts.conf
+++ /dev/null
@@ -1,24 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-user=
-solr_hostname=localhost
-solr_port=8983
-rsyncd_port=18983
-data_dir=
-webapp_name=solr
-master_host=
-master_data_dir=
-master_status_dir=
diff --git a/vendor/plugins/acts_as_solr/solr/solr/conf/solrconfig.xml b/vendor/plugins/acts_as_solr/solr/solr/conf/solrconfig.xml
deleted file mode 100644
index 527310e7c..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/conf/solrconfig.xml
+++ /dev/null
@@ -1,488 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<config>
- <!-- Set this to 'false' if you want solr to continue working after it has
- encountered an severe configuration error. In a production environment,
- you may want solr to keep working even if one handler is mis-configured.
-
- You may also set this to false using by setting the system property:
- -Dsolr.abortOnConfigurationError=false
- -->
- <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
-
- <!-- Used to specify an alternate directory to hold all index data
- other than the default ./data under the Solr home.
- If replication is in use, this should match the replication configuration. -->
-
- <dataDir>${solr.data.dir:./solr/data}</dataDir>
-
- <indexDefaults>
- <!-- Values here affect all index writers and act as a default unless overridden. -->
- <useCompoundFile>false</useCompoundFile>
- <mergeFactor>10</mergeFactor>
- <maxBufferedDocs>1000</maxBufferedDocs>
- <maxMergeDocs>2147483647</maxMergeDocs>
- <maxFieldLength>10000</maxFieldLength>
- <writeLockTimeout>1000</writeLockTimeout>
- <commitLockTimeout>10000</commitLockTimeout>
- </indexDefaults>
-
- <mainIndex>
- <!-- options specific to the main on-disk lucene index -->
- <useCompoundFile>false</useCompoundFile>
- <mergeFactor>10</mergeFactor>
- <maxBufferedDocs>1000</maxBufferedDocs>
- <maxMergeDocs>2147483647</maxMergeDocs>
- <maxFieldLength>10000</maxFieldLength>
-
- <!-- If true, unlock any held write or commit locks on startup.
- This defeats the locking mechanism that allows multiple
- processes to safely access a lucene index, and should be
- used with care. -->
- <unlockOnStartup>false</unlockOnStartup>
- </mainIndex>
-
- <!-- the default high-performance update handler -->
- <updateHandler class="solr.DirectUpdateHandler2">
-
- <!-- A prefix of "solr." for class names is an alias that
- causes solr to search appropriate packages, including
- org.apache.solr.(search|update|request|core|analysis)
- -->
-
- <!-- autocommit pending docs if certain criteria are met
- <autoCommit>
- <maxDocs>10000</maxDocs>
- <maxTime>1000</maxTime>
- </autoCommit>
- -->
-
- <!-- The RunExecutableListener executes an external command.
- exe - the name of the executable to run
- dir - dir to use as the current working directory. default="."
- wait - the calling thread waits until the executable returns. default="true"
- args - the arguments to pass to the program. default=nothing
- env - environment variables to set. default=nothing
- -->
- <!-- A postCommit event is fired after every commit or optimize command
- <listener event="postCommit" class="solr.RunExecutableListener">
- <str name="exe">snapshooter</str>
- <str name="dir">solr/bin</str>
- <bool name="wait">true</bool>
- <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
- <arr name="env"> <str>MYVAR=val1</str> </arr>
- </listener>
- -->
- <!-- A postOptimize event is fired only after every optimize command, useful
- in conjunction with index distribution to only distribute optimized indicies
- <listener event="postOptimize" class="solr.RunExecutableListener">
- <str name="exe">snapshooter</str>
- <str name="dir">solr/bin</str>
- <bool name="wait">true</bool>
- </listener>
- -->
-
- </updateHandler>
-
-
- <query>
- <!-- Maximum number of clauses in a boolean query... can affect
- range or prefix queries that expand to big boolean
- queries. An exception is thrown if exceeded. -->
- <maxBooleanClauses>1024</maxBooleanClauses>
-
-
- <!-- Cache used by SolrIndexSearcher for filters (DocSets),
- unordered sets of *all* documents that match a query.
- When a new searcher is opened, its caches may be prepopulated
- or "autowarmed" using data from caches in the old searcher.
- autowarmCount is the number of items to prepopulate. For LRUCache,
- the autowarmed items will be the most recently accessed items.
- Parameters:
- class - the SolrCache implementation (currently only LRUCache)
- size - the maximum number of entries in the cache
- initialSize - the initial capacity (number of entries) of
- the cache. (seel java.util.HashMap)
- autowarmCount - the number of entries to prepopulate from
- and old cache.
- -->
- <filterCache
- class="solr.LRUCache"
- size="512"
- initialSize="512"
- autowarmCount="256"/>
-
- <!-- queryResultCache caches results of searches - ordered lists of
- document ids (DocList) based on a query, a sort, and the range
- of documents requested. -->
- <queryResultCache
- class="solr.LRUCache"
- size="512"
- initialSize="512"
- autowarmCount="256"/>
-
- <!-- documentCache caches Lucene Document objects (the stored fields for each document).
- Since Lucene internal document ids are transient, this cache will not be autowarmed. -->
- <documentCache
- class="solr.LRUCache"
- size="512"
- initialSize="512"
- autowarmCount="0"/>
-
- <!-- If true, stored fields that are not requested will be loaded lazily.
-
- This can result in a significant speed improvement if the usual case is to
- not load all stored fields, especially if the skipped fields are large compressed
- text fields.
- -->
- <enableLazyFieldLoading>true</enableLazyFieldLoading>
-
- <!-- Example of a generic cache. These caches may be accessed by name
- through SolrIndexSearcher.getCache(),cacheLookup(), and cacheInsert().
- The purpose is to enable easy caching of user/application level data.
- The regenerator argument should be specified as an implementation
- of solr.search.CacheRegenerator if autowarming is desired. -->
- <!--
- <cache name="myUserCache"
- class="solr.LRUCache"
- size="4096"
- initialSize="1024"
- autowarmCount="1024"
- regenerator="org.mycompany.mypackage.MyRegenerator"
- />
- -->
-
- <!-- An optimization that attempts to use a filter to satisfy a search.
- If the requested sort does not include score, then the filterCache
- will be checked for a filter matching the query. If found, the filter
- will be used as the source of document ids, and then the sort will be
- applied to that.
- <useFilterForSortedQuery>true</useFilterForSortedQuery>
- -->
-
- <!-- An optimization for use with the queryResultCache. When a search
- is requested, a superset of the requested number of document ids
- are collected. For example, if a search for a particular query
- requests matching documents 10 through 19, and queryWindowSize is 50,
- then documents 0 through 50 will be collected and cached. Any further
- requests in that range can be satisfied via the cache. -->
- <queryResultWindowSize>10</queryResultWindowSize>
-
- <!-- This entry enables an int hash representation for filters (DocSets)
- when the number of items in the set is less than maxSize. For smaller
- sets, this representation is more memory efficient, more efficient to
- iterate over, and faster to take intersections. -->
- <HashDocSet maxSize="3000" loadFactor="0.75"/>
-
-
- <!-- boolToFilterOptimizer converts boolean clauses with zero boost
- into cached filters if the number of docs selected by the clause exceeds
- the threshold (represented as a fraction of the total index) -->
- <boolTofilterOptimizer enabled="true" cacheSize="32" threshold=".05"/>
-
-
- <!-- a newSearcher event is fired whenever a new searcher is being prepared
- and there is a current searcher handling requests (aka registered). -->
- <!-- QuerySenderListener takes an array of NamedList and executes a
- local query request for each NamedList in sequence. -->
- <!--
- <listener event="newSearcher" class="solr.QuerySenderListener">
- <arr name="queries">
- <lst> <str name="q">solr</str> <str name="start">0</str> <str name="rows">10</str> </lst>
- <lst> <str name="q">rocks</str> <str name="start">0</str> <str name="rows">10</str> </lst>
- </arr>
- </listener>
- -->
-
- <!-- a firstSearcher event is fired whenever a new searcher is being
- prepared but there is no current registered searcher to handle
- requests or to gain autowarming data from. -->
- <!--
- <listener event="firstSearcher" class="solr.QuerySenderListener">
- <arr name="queries">
- <lst> <str name="q">fast_warm</str> <str name="start">0</str> <str name="rows">10</str> </lst>
- </arr>
- </listener>
- -->
-
- <!-- If a search request comes in and there is no current registered searcher,
- then immediately register the still warming searcher and use it. If
- "false" then all requests will block until the first searcher is done
- warming. -->
- <useColdSearcher>false</useColdSearcher>
-
- <!-- Maximum number of searchers that may be warming in the background
- concurrently. An error is returned if this limit is exceeded. Recommend
- 1-2 for read-only slaves, higher for masters w/o cache warming. -->
- <maxWarmingSearchers>4</maxWarmingSearchers>
-
- </query>
-
- <!--
- Let the dispatch filter handler /select?qt=XXX
- handleSelect=true will use consistent error handling for /select and /update
- handleSelect=false will use solr1.1 style error formatting
- -->
- <requestDispatcher handleSelect="true" >
- <!--Make sure your system has some authentication before enabling remote streaming! -->
- <requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048" />
- </requestDispatcher>
-
-
- <!-- requestHandler plugins... incoming queries will be dispatched to the
- correct handler based on the qt (query type) param matching the
- name of registered handlers.
- The "standard" request handler is the default and will be used if qt
- is not specified in the request.
- -->
- <requestHandler name="standard" class="solr.StandardRequestHandler">
- <!-- default values for query parameters -->
- <lst name="defaults">
- <str name="echoParams">explicit</str>
- <str name="json.nl">map</str>
- <!--
- <int name="rows">10</int>
- <str name="fl">*</str>
- <str name="version">2.1</str>
- -->
- </lst>
- </requestHandler>
-
- <!-- DisMaxRequestHandler allows easy searching across multiple fields
- for simple user-entered phrases.
- see http://wiki.apache.org/solr/DisMaxRequestHandler
- -->
- <requestHandler name="dismax" class="solr.DisMaxRequestHandler" >
- <lst name="defaults">
- <str name="echoParams">explicit</str>
- <float name="tie">0.01</float>
- <str name="qf">
- text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
- </str>
- <str name="pf">
- text^0.2 features^1.1 name^1.5 manu^1.4 manu_exact^1.9
- </str>
- <str name="bf">
- ord(poplarity)^0.5 recip(rord(price),1,1000,1000)^0.3
- </str>
- <str name="fl">
- id,name,price,score
- </str>
- <str name="mm">
- 2&lt;-1 5&lt;-2 6&lt;90%
- </str>
- <int name="ps">100</int>
- <str name="q.alt">*:*</str>
- </lst>
- </requestHandler>
-
- <!-- Note how you can register the same handler multiple times with
- different names (and different init parameters)
- -->
- <requestHandler name="partitioned" class="solr.DisMaxRequestHandler" >
- <lst name="defaults">
- <str name="echoParams">explicit</str>
- <str name="qf">text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0</str>
- <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
- <!-- This is an example of using Date Math to specify a constantly
- moving date range in a config...
- -->
- <str name="bq">incubationdate_dt:[* TO NOW/DAY-1MONTH]^2.2</str>
- </lst>
- <!-- In addition to defaults, "appends" params can be specified
- to identify values which should be appended to the list of
- multi-val params from the query (or the existing "defaults").
-
- In this example, the param "fq=instock:true" will be appended to
- any query time fq params the user may specify, as a mechanism for
- partitioning the index, independent of any user selected filtering
- that may also be desired (perhaps as a result of faceted searching).
-
- NOTE: there is *absolutely* nothing a client can do to prevent these
- "appends" values from being used, so don't use this mechanism
- unless you are sure you always want it.
- -->
- <lst name="appends">
- <str name="fq">inStock:true</str>
- </lst>
- <!-- "invariants" are a way of letting the Solr maintainer lock down
- the options available to Solr clients. Any params values
- specified here are used regardless of what values may be specified
- in either the query, the "defaults", or the "appends" params.
-
- In this example, the facet.field and facet.query params are fixed,
- limiting the facets clients can use. Faceting is not turned on by
- default - but if the client does specify facet=true in the request,
- these are the only facets they will be able to see counts for;
- regardless of what other facet.field or facet.query params they
- may specify.
-
- NOTE: there is *absolutely* nothing a client can do to prevent these
- "invariants" values from being used, so don't use this mechanism
- unless you are sure you always want it.
- -->
- <lst name="invariants">
- <str name="facet.field">cat</str>
- <str name="facet.field">manu_exact</str>
- <str name="facet.query">price:[* TO 500]</str>
- <str name="facet.query">price:[500 TO *]</str>
- </lst>
- </requestHandler>
-
- <requestHandler name="instock" class="solr.DisMaxRequestHandler" >
- <!-- for legacy reasons, DisMaxRequestHandler will assume all init
- params are "defaults" if you don't explicitly specify any defaults.
- -->
- <str name="fq">
- inStock:true
- </str>
- <str name="qf">
- text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
- </str>
- <str name="mm">
- 2&lt;-1 5&lt;-2 6&lt;90%
- </str>
- </requestHandler>
-
-
- <!-- SpellCheckerRequestHandler takes in a word (or several words) as the
- value of the "q" parameter and returns a list of alternative spelling
- suggestions. If invoked with a ...&cmd=rebuild, it will rebuild the
- spellchecker index.
- -->
- <requestHandler name="spellchecker" class="solr.SpellCheckerRequestHandler" startup="lazy">
- <!-- default values for query parameters -->
- <lst name="defaults">
- <int name="suggestionCount">1</int>
- <float name="accuracy">0.5</float>
- </lst>
-
- <!-- Main init params for handler -->
-
- <!-- The directory where your SpellChecker Index should live. -->
- <!-- May be absolute, or relative to the Solr "dataDir" directory. -->
- <!-- If this option is not specified, a RAM directory will be used -->
- <str name="spellcheckerIndexDir">spell</str>
-
- <!-- the field in your schema that you want to be able to build -->
- <!-- your spell index on. This should be a field that uses a very -->
- <!-- simple FieldType without a lot of Analysis (ie: string) -->
- <str name="termSourceField">word</str>
-
- </requestHandler>
-
-
- <!-- Update request handler.
-
- Note: Since solr1.1 requestHandlers requires a valid content type header if posted in
- the body. For example, curl now requires: -H 'Content-type:text/xml; charset=utf-8'
- The response format differs from solr1.1 formatting and returns a standard error code.
-
- To enable solr1.1 behavior, remove the /update handler or change its path
- -->
- <requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
-
- <!-- CSV update handler, loaded on demand -->
- <requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
-
-
- <!-- Admin Handlers. TODO? There could be a single handler that loads them all... -->
- <requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler" />
- <requestHandler name="/admin/system" class="org.apache.solr.handler.admin.SystemInfoHandler" />
- <requestHandler name="/admin/plugins" class="org.apache.solr.handler.admin.PluginInfoHandler" />
- <requestHandler name="/admin/threads" class="org.apache.solr.handler.admin.ThreadDumpHandler" />
- <requestHandler name="/admin/properties" class="org.apache.solr.handler.admin.PropertiesRequestHandler" />
-
- <!-- Echo the request contents back to the client -->
- <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
- <lst name="defaults">
- <str name="echoParams">explicit</str> <!-- for all params (including the default etc) use: 'all' -->
- <str name="echoHandler">true</str>
- </lst>
- </requestHandler>
-
- <highlighting>
- <!-- Configure the standard fragmenter -->
- <!-- This could most likely be commented out in the "default" case -->
- <fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
- <lst name="defaults">
- <int name="hl.fragsize">100</int>
- </lst>
- </fragmenter>
-
- <!-- A regular-expression-based fragmenter (f.i., for sentence extraction) -->
- <fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter">
- <lst name="defaults">
- <!-- slightly smaller fragsizes work better because of slop -->
- <int name="hl.fragsize">70</int>
- <!-- allow 50% slop on fragment sizes -->
- <float name="hl.regex.slop">0.5</float>
- <!-- a basic sentence pattern -->
- <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
- </lst>
- </fragmenter>
-
- <!-- Configure the standard formatter -->
- <formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
- <lst name="defaults">
- <str name="hl.simple.pre"><![CDATA[<em>]]></str>
- <str name="hl.simple.post"><![CDATA[</em>]]></str>
- </lst>
- </formatter>
- </highlighting>
-
- <!-- queryResponseWriter plugins... query responses will be written using the
- writer specified by the 'wt' request parameter matching the name of a registered
- writer.
- The "standard" writer is the default and will be used if 'wt' is not specified
- in the request. XMLResponseWriter will be used if nothing is specified here.
- The json, python, and ruby writers are also available by default.
-
- <queryResponseWriter name="standard" class="org.apache.solr.request.XMLResponseWriter"/>
- <queryResponseWriter name="json" class="org.apache.solr.request.JSONResponseWriter"/>
- <queryResponseWriter name="python" class="org.apache.solr.request.PythonResponseWriter"/>
- <queryResponseWriter name="ruby" class="org.apache.solr.request.RubyResponseWriter"/>
-
- <queryResponseWriter name="custom" class="com.example.MyResponseWriter"/>
- -->
-
- <!-- XSLT response writer transforms the XML output by any xslt file found
- in Solr's conf/xslt directory. Changes to xslt files are checked for
- every xsltCacheLifetimeSeconds.
- -->
- <queryResponseWriter name="xslt" class="org.apache.solr.request.XSLTResponseWriter">
- <int name="xsltCacheLifetimeSeconds">5</int>
- </queryResponseWriter>
-
- <!-- config for the admin interface -->
- <admin>
- <defaultQuery>solr</defaultQuery>
- <gettableFiles>solrconfig.xml schema.xml admin-extra.html</gettableFiles>
- <!-- pingQuery should be "URLish" ...
- &amp; separated key=val pairs ... but there shouldn't be any
- URL escaping of the values -->
- <pingQuery>
- qt=standard&amp;q=solrpingquery
- </pingQuery>
- <!-- configure a healthcheck file for servers behind a loadbalancer
- <healthcheck type="file">server-enabled</healthcheck>
- -->
- </admin>
-
-</config>
diff --git a/vendor/plugins/acts_as_solr/solr/solr/conf/stopwords.txt b/vendor/plugins/acts_as_solr/solr/solr/conf/stopwords.txt
deleted file mode 100644
index 8433c832d..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/conf/stopwords.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#-----------------------------------------------------------------------
-# a couple of test stopwords to test that the words are really being
-# configured from this file:
-stopworda
-stopwordb
-
-#Standard english stop words taken from Lucene's StopAnalyzer
-an
-and
-are
-as
-at
-be
-but
-by
-for
-if
-in
-into
-is
-it
-no
-not
-of
-on
-or
-s
-such
-t
-that
-the
-their
-then
-there
-these
-they
-this
-to
-was
-will
-with
-
diff --git a/vendor/plugins/acts_as_solr/solr/solr/conf/synonyms.txt b/vendor/plugins/acts_as_solr/solr/solr/conf/synonyms.txt
deleted file mode 100644
index b0e31cb7e..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/conf/synonyms.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#-----------------------------------------------------------------------
-#some test synonym mappings unlikely to appear in real input text
-aaa => aaaa
-bbb => bbbb1 bbbb2
-ccc => cccc1,cccc2
-a\=>a => b\=>b
-a\,a => b\,b
-fooaaa,baraaa,bazaaa
-
-# Some synonym groups specific to this example
-GB,gib,gigabyte,gigabytes
-MB,mib,megabyte,megabytes
-Television, Televisions, TV, TVs
-#notice we use "gib" instead of "GiB" so any WordDelimiterFilter coming
-#after us won't split it into two words.
-
-# Synonym mappings can be used for spelling correction too
-pixima => pixma
-
diff --git a/vendor/plugins/acts_as_solr/solr/solr/conf/xslt/example.xsl b/vendor/plugins/acts_as_solr/solr/solr/conf/xslt/example.xsl
deleted file mode 100644
index 6832a1d4c..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/conf/xslt/example.xsl
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- -->
-
-<!--
- Simple transform of Solr query results to HTML
- -->
-<xsl:stylesheet version='1.0'
- xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
->
-
- <xsl:output media-type="text/html; charset=UTF-8" encoding="UTF-8"/>
-
- <xsl:variable name="title" select="concat('Solr search results (',response/result/@numFound,' documents)')"/>
-
- <xsl:template match='/'>
- <html>
- <head>
- <title><xsl:value-of select="$title"/></title>
- <xsl:call-template name="css"/>
- </head>
- <body>
- <h1><xsl:value-of select="$title"/></h1>
- <div class="note">
- This has been formatted by the sample "example.xsl" transform -
- use your own XSLT to get a nicer page
- </div>
- <xsl:apply-templates select="response/result/doc"/>
- </body>
- </html>
- </xsl:template>
-
- <xsl:template match="doc">
- <xsl:variable name="pos" select="position()"/>
- <div class="doc">
- <table width="100%">
- <xsl:apply-templates>
- <xsl:with-param name="pos"><xsl:value-of select="$pos"/></xsl:with-param>
- </xsl:apply-templates>
- </table>
- </div>
- </xsl:template>
-
- <xsl:template match="doc/*[@name='score']" priority="100">
- <xsl:param name="pos"></xsl:param>
- <tr>
- <td class="name">
- <xsl:value-of select="@name"/>
- </td>
- <td class="value">
- <xsl:value-of select="."/>
-
- <xsl:if test="boolean(//lst[@name='explain'])">
- <xsl:element name="a">
- <!-- can't allow whitespace here -->
- <xsl:attribute name="href">javascript:toggle("<xsl:value-of select="concat('exp-',$pos)" />");</xsl:attribute>?</xsl:element>
- <br/>
- <xsl:element name="div">
- <xsl:attribute name="class">exp</xsl:attribute>
- <xsl:attribute name="id">
- <xsl:value-of select="concat('exp-',$pos)" />
- </xsl:attribute>
- <xsl:value-of select="//lst[@name='explain']/str[position()=$pos]"/>
- </xsl:element>
- </xsl:if>
- </td>
- </tr>
- </xsl:template>
-
- <xsl:template match="doc/arr" priority="100">
- <tr>
- <td class="name">
- <xsl:value-of select="@name"/>
- </td>
- <td class="value">
- <ul>
- <xsl:for-each select="*">
- <li><xsl:value-of select="."/></li>
- </xsl:for-each>
- </ul>
- </td>
- </tr>
- </xsl:template>
-
-
- <xsl:template match="doc/*">
- <tr>
- <td class="name">
- <xsl:value-of select="@name"/>
- </td>
- <td class="value">
- <xsl:value-of select="."/>
- </td>
- </tr>
- </xsl:template>
-
- <xsl:template match="*"/>
-
- <xsl:template name="css">
- <script>
- function toggle(id) {
- var obj = document.getElementById(id);
- obj.style.display = (obj.style.display != 'block') ? 'block' : 'none';
- }
- </script>
- <style type="text/css">
- body { font-family: "Lucida Grande", sans-serif }
- td.name { font-style: italic; font-size:80%; }
- td { vertical-align: top; }
- ul { margin: 0px; margin-left: 1em; padding: 0px; }
- .note { font-size:80%; }
- .doc { margin-top: 1em; border-top: solid grey 1px; }
- .exp { display: none; font-family: monospace; white-space: pre; }
- </style>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/vendor/plugins/acts_as_solr/solr/solr/conf/xslt/example_atom.xsl b/vendor/plugins/acts_as_solr/solr/solr/conf/xslt/example_atom.xsl
deleted file mode 100644
index e71797219..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/conf/xslt/example_atom.xsl
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- -->
-
-<!--
- Simple transform of Solr query results to Atom
- -->
-
-<xsl:stylesheet version='1.0'
- xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
-
- <xsl:output method="xml" encoding="utf-8" />
-
- <xsl:template match='/'>
- <xsl:variable name="query" select="response/lst[@name='responseHeader']/lst[@name='params']/str[@name='q']"/>
- <feed xmlns="http://www.w3.org/2005/Atom">
- <title>Example Solr Atom 1.0 Feed</title>
- <subtitle>
- This has been formatted by the sample "example_atom.xsl" transform -
- use your own XSLT to get a nicer Atom feed.
- </subtitle>
- <author>
- <name>Apache Solr</name>
- <email>solr-user@lucene.apache.org</email>
- </author>
- <link rel="self" type="application/atom+xml"
- href="http://localhost:8983/solr/q={$query}&amp;wt=xslt&amp;tr=atom.xsl"/>
- <updated>
- <xsl:value-of select="response/result/doc[position()=1]/date[@name='timestamp']"/>
- </updated>
- <id>tag:localhost,2007:example</id>
- <xsl:apply-templates select="response/result/doc"/>
- </feed>
- </xsl:template>
-
- <!-- search results xslt -->
- <xsl:template match="doc">
- <xsl:variable name="id" select="str[@name='id']"/>
- <entry>
- <title><xsl:value-of select="str[@name='name']"/></title>
- <link href="http://localhost:8983/solr/select?q={$id}"/>
- <id>tag:localhost,2007:<xsl:value-of select="$id"/></id>
- <summary><xsl:value-of select="arr[@name='features']"/></summary>
- <updated><xsl:value-of select="date[@name='timestamp']"/></updated>
- </entry>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/vendor/plugins/acts_as_solr/solr/solr/conf/xslt/example_rss.xsl b/vendor/plugins/acts_as_solr/solr/solr/conf/xslt/example_rss.xsl
deleted file mode 100644
index 57bb2799b..000000000
--- a/vendor/plugins/acts_as_solr/solr/solr/conf/xslt/example_rss.xsl
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- -->
-
-<!--
- Simple transform of Solr query results to RSS
- -->
-
-<xsl:stylesheet version='1.0'
- xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
-
- <xsl:output method="xml" encoding="utf-8" />
- <xsl:template match='/'>
- <rss version="2.0">
- <channel>
- <title>Example Solr RSS 2.0 Feed</title>
- <link>http://localhost:8983/solr</link>
- <description>
- This has been formatted by the sample "example_rss.xsl" transform -
- use your own XSLT to get a nicer RSS feed.
- </description>
- <language>en-us</language>
- <docs>http://localhost:8983/solr</docs>
- <xsl:apply-templates select="response/result/doc"/>
- </channel>
- </rss>
- </xsl:template>
-
- <!-- search results xslt -->
- <xsl:template match="doc">
- <xsl:variable name="id" select="str[@name='id']"/>
- <xsl:variable name="timestamp" select="date[@name='timestamp']"/>
- <item>
- <title><xsl:value-of select="str[@name='name']"/></title>
- <link>
- http://localhost:8983/solr/select?q=id:<xsl:value-of select="$id"/>
- </link>
- <description>
- <xsl:value-of select="arr[@name='features']"/>
- </description>
- <pubDate><xsl:value-of select="$timestamp"/></pubDate>
- <guid>
- http://localhost:8983/solr/select?q=id:<xsl:value-of select="$id"/>
- </guid>
- </item>
- </xsl:template>
-</xsl:stylesheet>
diff --git a/vendor/plugins/acts_as_solr/solr/start.jar b/vendor/plugins/acts_as_solr/solr/start.jar
deleted file mode 100644
index 8a986c800..000000000
--- a/vendor/plugins/acts_as_solr/solr/start.jar
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/solr/webapps/solr.war b/vendor/plugins/acts_as_solr/solr/webapps/solr.war
deleted file mode 100644
index 29a086cd2..000000000
--- a/vendor/plugins/acts_as_solr/solr/webapps/solr.war
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/test/config/solr.yml b/vendor/plugins/acts_as_solr/test/config/solr.yml
deleted file mode 100644
index 89f6f3f70..000000000
--- a/vendor/plugins/acts_as_solr/test/config/solr.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-test:
- url: http://localhost:8981/solr \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/test/db/connections/mysql/connection.rb b/vendor/plugins/acts_as_solr/test/db/connections/mysql/connection.rb
deleted file mode 100644
index f870e3513..000000000
--- a/vendor/plugins/acts_as_solr/test/db/connections/mysql/connection.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require 'logger'
-ActiveRecord::Base.logger = Logger.new("debug.log")
-
-ActiveRecord::Base.establish_connection(
- :adapter => "mysql",
- :username => MYSQL_USER,
- :encoding => "utf8",
- :database => "actsassolr_tests"
-)
-
diff --git a/vendor/plugins/acts_as_solr/test/db/connections/sqlite/connection.rb b/vendor/plugins/acts_as_solr/test/db/connections/sqlite/connection.rb
deleted file mode 100644
index b8e6348e1..000000000
--- a/vendor/plugins/acts_as_solr/test/db/connections/sqlite/connection.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-require 'logger'
-ActiveRecord::Base.logger = Logger.new("debug.log")
-
-ActiveRecord::Base.establish_connection(
- :adapter => "sqlite3",
- :encoding => "utf8",
- :database => File.join(File.dirname(File.expand_path(__FILE__)), '..', '..', 'test.db')
-)
diff --git a/vendor/plugins/acts_as_solr/test/db/migrate/001_create_books.rb b/vendor/plugins/acts_as_solr/test/db/migrate/001_create_books.rb
deleted file mode 100644
index ad98325e8..000000000
--- a/vendor/plugins/acts_as_solr/test/db/migrate/001_create_books.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-class CreateBooks < ActiveRecord::Migration
- def self.up
- create_table :books, :force => true do |t|
- t.column :category_id, :integer
- t.column :name, :string
- t.column :author, :string
- end
- end
-
- def self.down
- drop_table :books
- end
-end
diff --git a/vendor/plugins/acts_as_solr/test/db/migrate/002_create_movies.rb b/vendor/plugins/acts_as_solr/test/db/migrate/002_create_movies.rb
deleted file mode 100644
index ebd75410b..000000000
--- a/vendor/plugins/acts_as_solr/test/db/migrate/002_create_movies.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-class CreateMovies < ActiveRecord::Migration
- def self.up
- create_table :movies, :force => true do |t|
- t.column :name, :string
- t.column :description, :string
- end
- end
-
- def self.down
- drop_table :movies
- end
-end
diff --git a/vendor/plugins/acts_as_solr/test/db/migrate/003_create_categories.rb b/vendor/plugins/acts_as_solr/test/db/migrate/003_create_categories.rb
deleted file mode 100644
index 742e3e741..000000000
--- a/vendor/plugins/acts_as_solr/test/db/migrate/003_create_categories.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-class CreateCategories < ActiveRecord::Migration
- def self.up
- create_table :categories, :force => true do |t|
- t.column :name, :string
- end
- end
-
- def self.down
- drop_table :categories
- end
-end
diff --git a/vendor/plugins/acts_as_solr/test/db/migrate/004_create_electronics.rb b/vendor/plugins/acts_as_solr/test/db/migrate/004_create_electronics.rb
deleted file mode 100644
index 2f8de79d0..000000000
--- a/vendor/plugins/acts_as_solr/test/db/migrate/004_create_electronics.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-class CreateElectronics < ActiveRecord::Migration
- def self.up
- create_table :electronics, :force => true do |t|
- t.column :name, :string
- t.column :manufacturer, :string
- t.column :features, :string
- t.column :category, :string
- t.column :price, :string
- end
- end
-
- def self.down
- drop_table :electronics
- end
-end
diff --git a/vendor/plugins/acts_as_solr/test/db/migrate/005_create_authors.rb b/vendor/plugins/acts_as_solr/test/db/migrate/005_create_authors.rb
deleted file mode 100644
index 0edb4d536..000000000
--- a/vendor/plugins/acts_as_solr/test/db/migrate/005_create_authors.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-class CreateAuthors < ActiveRecord::Migration
- def self.up
- create_table :authors, :force => true do |t|
- t.column :name, :string
- t.column :biography, :text
- end
- end
-
- def self.down
- drop_table :authors
- end
-end
diff --git a/vendor/plugins/acts_as_solr/test/db/migrate/006_create_postings.rb b/vendor/plugins/acts_as_solr/test/db/migrate/006_create_postings.rb
deleted file mode 100644
index 4fc786383..000000000
--- a/vendor/plugins/acts_as_solr/test/db/migrate/006_create_postings.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class CreatePostings < ActiveRecord::Migration
- def self.up
- execute "CREATE TABLE postings(`guid` varchar(20) NOT NULL PRIMARY KEY, `name` varchar(200), `description` text)"
- end
-
- def self.down
- drop_table :postings
- end
-end
diff --git a/vendor/plugins/acts_as_solr/test/db/test.db b/vendor/plugins/acts_as_solr/test/db/test.db
deleted file mode 100644
index 2105aa23d..000000000
--- a/vendor/plugins/acts_as_solr/test/db/test.db
+++ /dev/null
Binary files differ
diff --git a/vendor/plugins/acts_as_solr/test/fixtures/authors.yml b/vendor/plugins/acts_as_solr/test/fixtures/authors.yml
deleted file mode 100644
index c3c3571b3..000000000
--- a/vendor/plugins/acts_as_solr/test/fixtures/authors.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-tom_clancy:
- id: 1
- name: Tom Clancy
- biography: Tom Clancy (born 1947) writes novels of adventure and espionage in the international military-industrial complex that have earned him enormous popularity in the 1980s as a creator of the "techno-thriller" genre.
-
-stephen_king:
- id: 2
- name: Stephen King
- biography: Stephen King (born 1947) is a prolific and immensely popular author of horror fiction. In his works, King blends elements of the traditional gothic tale with those of the modern psychological thriller, detective, and science fiction genres.
diff --git a/vendor/plugins/acts_as_solr/test/fixtures/books.yml b/vendor/plugins/acts_as_solr/test/fixtures/books.yml
deleted file mode 100644
index fc7f83732..000000000
--- a/vendor/plugins/acts_as_solr/test/fixtures/books.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-splinter_cell:
- id: 1
- category_id: 1
- name: Splinter Cell
- author: Tom Clancy
-
-ruby:
- id: 2
- category_id: 2
- name: Ruby for Dummies
- author: Peter McPeterson
diff --git a/vendor/plugins/acts_as_solr/test/fixtures/categories.yml b/vendor/plugins/acts_as_solr/test/fixtures/categories.yml
deleted file mode 100644
index 0d17418fd..000000000
--- a/vendor/plugins/acts_as_solr/test/fixtures/categories.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-thriller:
- id: 1
- name: Thriller/Novels
-
-technical:
- id: 2
- name: Technical Books \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/test/fixtures/db_definitions/mysql.sql b/vendor/plugins/acts_as_solr/test/fixtures/db_definitions/mysql.sql
deleted file mode 100644
index aac03cb27..000000000
--- a/vendor/plugins/acts_as_solr/test/fixtures/db_definitions/mysql.sql
+++ /dev/null
@@ -1,41 +0,0 @@
-DROP DATABASE IF EXISTS `actsassolr_tests`;
-CREATE DATABASE IF NOT EXISTS `actsassolr_tests`;
-USE `actsassolr_tests`
-
-CREATE TABLE `books` (
- `id` int(11) NOT NULL auto_increment,
- `category_id` int(11),
- `name` varchar(200) default NULL,
- `author` varchar(200) default NULL,
- PRIMARY KEY (`id`)
-);
-
-CREATE TABLE `movies` (
- `id` int(11) NOT NULL auto_increment,
- `name` varchar(200) default NULL,
- `description` varchar(255) default NULL,
- PRIMARY KEY (`id`)
-);
-
-CREATE TABLE `categories` (
- `id` int(11) NOT NULL auto_increment,
- `name` varchar(200) default NULL,
- PRIMARY KEY (`id`)
-);
-
-CREATE TABLE `electronics` (
- `id` int(11) NOT NULL auto_increment,
- `name` varchar(200) default NULL,
- `manufacturer` varchar(255) default NULL,
- `features` varchar(255) default NULL,
- `category` varchar(255) default NULL,
- `price` varchar(20) default NULL,
- PRIMARY KEY (`id`)
-);
-
-CREATE TABLE `authors` (
- `id` int(11) NOT NULL auto_increment,
- `name` varchar(200) default NULL,
- `biography` text default NULL,
- PRIMARY KEY (`id`)
-);
diff --git a/vendor/plugins/acts_as_solr/test/fixtures/electronics.yml b/vendor/plugins/acts_as_solr/test/fixtures/electronics.yml
deleted file mode 100644
index b4be6178c..000000000
--- a/vendor/plugins/acts_as_solr/test/fixtures/electronics.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-ipod_video:
- id: 1
- name: Apple 60 GB Memory iPod with Video Playback Black
- manufacturer: Apple Computer Inc.
- features: iTunes, Podcasts, Audiobooks
- category: Electronics
- price: 599.00
-
-dell_monitor:
- id: 2
- name: Dell Widescreen UltraSharp 3007WFP
- manufacturer: Dell, Inc
- features: 30" TFT active matrix LCD, 2560 x 1600, .25mm dot pitch, 700:1 contrast
- category: Electronics
- price: 750.00
-
-samsung_hd:
- id: 3
- name: Samsung SpinPoint P120 SP2514N - hard drive - 250 GB of Memory Storage - ATA-133
- manufacturer: Samsung Electronics Co. Ltd.
- features: 7200RPM, 8MB cache, IDE Ultra ATA-133
- category: Hard Drive
- price: 319.00
-
-corsair_ram:
- id: 4
- name: CORSAIR XMS 2GB (2 x 1GB) 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200) Dual Channel Kit System Memory - Retail
- manufacturer: Corsair Microsystems Inc.
- features: CAS latency 2, 2-3-3-6 timing, 2.75v, unbuffered, heat-spreader
- category: Memory
- price: 155.00
-
-a_data_ram:
- id: 5
- name: A-DATA V-Series 1GB 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200) System Memory - OEM
- manufacturer: A-DATA Technology Inc.
- features: CAS latency 3, 2.7v
- category: Memory
- price: 65.79
diff --git a/vendor/plugins/acts_as_solr/test/fixtures/movies.yml b/vendor/plugins/acts_as_solr/test/fixtures/movies.yml
deleted file mode 100644
index 33cc4df91..000000000
--- a/vendor/plugins/acts_as_solr/test/fixtures/movies.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-napoleon_dynamite:
- id: 1
- name: Napoleon Dynamite
- description: Cool movie about a goofy guy
-
-office_space:
- id: 2
- name: Office Space
- description: Hypnotized dude loves fishing but not working \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/test/fixtures/postings.yml b/vendor/plugins/acts_as_solr/test/fixtures/postings.yml
deleted file mode 100644
index 834b1f2fb..000000000
--- a/vendor/plugins/acts_as_solr/test/fixtures/postings.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-first:
- guid: ABC-123
- name: Posting ABC
- description: First posting testing primary key as string
-
-second:
- guid: DEF-456
- name: Posting DEF
- description: Second posting testing primary key as string
-
diff --git a/vendor/plugins/acts_as_solr/test/models/author.rb b/vendor/plugins/acts_as_solr/test/models/author.rb
deleted file mode 100644
index 6ce9180b0..000000000
--- a/vendor/plugins/acts_as_solr/test/models/author.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# Table fields for 'movies'
-# - id
-# - name
-# - biography
-
-class Author < ActiveRecord::Base
-
- acts_as_solr :auto_commit => false
-
-end \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/test/models/book.rb b/vendor/plugins/acts_as_solr/test/models/book.rb
deleted file mode 100644
index 18c416dce..000000000
--- a/vendor/plugins/acts_as_solr/test/models/book.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# Table fields for 'books'
-# - id
-# - category_id
-# - name
-# - author
-
-class Book < ActiveRecord::Base
- belongs_to :category
- acts_as_solr :include => [:category]
-end \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/test/models/category.rb b/vendor/plugins/acts_as_solr/test/models/category.rb
deleted file mode 100644
index 09e2fa4ca..000000000
--- a/vendor/plugins/acts_as_solr/test/models/category.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# Table fields for 'categories'
-# - id
-# - name
-
-class Category < ActiveRecord::Base
- has_many :books
- acts_as_solr :include => [:books]
-end \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/test/models/electronic.rb b/vendor/plugins/acts_as_solr/test/models/electronic.rb
deleted file mode 100644
index 8035f3ba9..000000000
--- a/vendor/plugins/acts_as_solr/test/models/electronic.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# Table fields for 'electronics'
-# - id
-# - name
-# - manufacturer
-# - features
-# - category
-# - price
-
-class Electronic < ActiveRecord::Base
- acts_as_solr :facets => [:category, :manufacturer],
- :fields => [:name, :manufacturer, :features, :category, {:price => {:type => :range_float, :boost => 10.0}}],
- :boost => 5.0,
- :exclude_fields => [:features]
-
- # The following example would also convert the :price field type to :range_float
- #
- # acts_as_solr :facets => [:category, :manufacturer],
- # :fields => [:name, :manufacturer, :features, :category, {:price => :range_float}],
- # :boost => 5.0
-end
diff --git a/vendor/plugins/acts_as_solr/test/models/movie.rb b/vendor/plugins/acts_as_solr/test/models/movie.rb
deleted file mode 100644
index e1d4dabcb..000000000
--- a/vendor/plugins/acts_as_solr/test/models/movie.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# Table fields for 'movies'
-# - id
-# - name
-# - description
-
-class Movie < ActiveRecord::Base
- acts_as_solr :additional_fields => [:current_time, {:time_on_xml => :date}]
-
- def current_time
- Time.now.to_s
- end
-
- def time_on_xml
- Time.now
- end
-
-end \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/test/models/posting.rb b/vendor/plugins/acts_as_solr/test/models/posting.rb
deleted file mode 100644
index f71070a19..000000000
--- a/vendor/plugins/acts_as_solr/test/models/posting.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# Table fields for 'movies'
-# - guid
-# - name
-# - description
-
-class Posting < ActiveRecord::Base
-
- set_primary_key 'guid'
- acts_as_solr({},{:primary_key_field => 'pk_s'})
-
-end \ No newline at end of file
diff --git a/vendor/plugins/acts_as_solr/test/test_helper.rb b/vendor/plugins/acts_as_solr/test/test_helper.rb
deleted file mode 100644
index 158d79359..000000000
--- a/vendor/plugins/acts_as_solr/test/test_helper.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-require 'rubygems'
-require 'test/unit'
-require 'active_record'
-require 'active_record/fixtures'
-
-RAILS_ROOT = File.dirname(__FILE__) unless defined? RAILS_ROOT
-RAILS_ENV = 'test' unless defined? RAILS_ENV
-
-require File.dirname(__FILE__) + '/../lib/acts_as_solr'
-require File.dirname(__FILE__) + '/../config/environment.rb'
-
-# Load Models
-models_dir = File.join(File.dirname( __FILE__ ), 'models')
-Dir[ models_dir + '/*.rb'].each { |m| require m }
-
-Test::Unit::TestCase.fixture_path = File.dirname(__FILE__) + "/fixtures/"
-
-class Test::Unit::TestCase
- def self.fixtures(*table_names)
- if block_given?
- Fixtures.create_fixtures(Test::Unit::TestCase.fixture_path, table_names) { yield }
- else
- Fixtures.create_fixtures(Test::Unit::TestCase.fixture_path, table_names)
- end
- table_names.each do |table_name|
- clear_from_solr(table_name)
- klass = instance_eval table_name.to_s.capitalize.singularize
- klass.find(:all).each{|content| content.solr_save}
- end
- end
-
- private
- def self.clear_from_solr(table_name)
- ActsAsSolr::Post.execute(Solr::Request::Delete.new(:query => "type_s:#{table_name.to_s.capitalize.singularize}"))
- end
-end
diff --git a/vendor/plugins/acts_as_solr/test/unit/acts_as_solr_test.rb b/vendor/plugins/acts_as_solr/test/unit/acts_as_solr_test.rb
deleted file mode 100644
index 109b72ef1..000000000
--- a/vendor/plugins/acts_as_solr/test/unit/acts_as_solr_test.rb
+++ /dev/null
@@ -1,375 +0,0 @@
-require "#{File.dirname(File.expand_path(__FILE__))}/../test_helper"
-
-class ActsAsSolrTest < Test::Unit::TestCase
-
- fixtures :books, :movies, :electronics, :postings
-
- # Inserting new data into Solr and making sure it's getting indexed
- def test_insert_new_data
- assert_equal 2, Book.count_by_solr('ruby OR splinter OR bob')
- b = Book.create(:name => "Fuze in action", :author => "Bob Bobber", :category_id => 1)
- assert b.valid?
- assert_equal 3, Book.count_by_solr('ruby OR splinter OR bob')
- end
-
- # Testing basic solr search:
- # Model.find_by_solr 'term'
- # Note that you're able to mix free-search with fields and boolean operators
- def test_find_by_solr_ruby
- ['ruby', 'dummy', 'name:ruby', 'name:dummy', 'name:ruby AND author:peter',
- 'author:peter AND ruby', 'peter dummy'].each do |term|
- records = Book.find_by_solr term
- assert_equal 1, records.total
- assert_equal "Peter McPeterson", records.docs.first.author
- assert_equal "Ruby for Dummies", records.docs.first.name
- assert_equal ({"id" => 2,
- "category_id" => 2,
- "name" => "Ruby for Dummies",
- "author" => "Peter McPeterson"}), records.docs.first.attributes
- end
- end
-
- # Testing basic solr search:
- # Model.find_by_solr 'term'
- # Note that you're able to mix free-search with fields and boolean operators
- def test_find_by_solr_splinter
- ['splinter', 'name:splinter', 'name:splinter AND author:clancy',
- 'author:clancy AND splinter', 'cell tom'].each do |term|
- records = Book.find_by_solr term
- assert_equal 1, records.total
- assert_equal "Splinter Cell", records.docs.first.name
- assert_equal "Tom Clancy", records.docs.first.author
- assert_equal ({"id" => 1, "category_id" => 1, "name" => "Splinter Cell",
- "author" => "Tom Clancy"}), records.docs.first.attributes
- end
- end
-
- # Testing basic solr search:
- # Model.find_by_solr 'term'
- # Note that you're able to mix free-search with fields and boolean operators
- def test_find_by_solr_ruby_or_splinter
- ['ruby OR splinter', 'ruby OR author:tom', 'name:cell OR author:peter', 'dummy OR cell'].each do |term|
- records = Book.find_by_solr term
- assert_equal 2, records.total
- end
- end
-
- # Testing search in indexed field methods:
- #
- # class Movie < ActiveRecord::Base
- # acts_as_solr :fields => [:name, :description, :current_time]
- #
- # def current_time
- # Time.now.to_s
- # end
- #
- # end
- #
- # The method current_time above gets indexed as being part of the
- # Movie model and it's available for search as well
- def test_find_with_dynamic_fields
- date = Time.now.strftime('%b %d %Y')
- ["dynamite AND #{date}", "description:goofy AND #{date}", "goofy napoleon #{date}",
- "goofiness #{date}"].each do |term|
- records = Movie.find_by_solr term
- assert_equal 1, records.total
- assert_equal ({"id" => 1, "name" => "Napoleon Dynamite",
- "description" => "Cool movie about a goofy guy"}), records.docs.first.attributes
- end
- end
-
- # Testing basic solr search that returns just the ids instead of the objects:
- # Model.find_id_by_solr 'term'
- # Note that you're able to mix free-search with fields and boolean operators
- def test_find_id_by_solr_ruby
- ['ruby', 'dummy', 'name:ruby', 'name:dummy', 'name:ruby AND author:peter',
- 'author:peter AND ruby'].each do |term|
- records = Book.find_id_by_solr term
- assert_equal 1, records.docs.size
- assert_equal [2], records.docs
- end
- end
-
- # Testing basic solr search that returns just the ids instead of the objects:
- # Model.find_id_by_solr 'term'
- # Note that you're able to mix free-search with fields and boolean operators
- def test_find_id_by_solr_splinter
- ['splinter', 'name:splinter', 'name:splinter AND author:clancy',
- 'author:clancy AND splinter'].each do |term|
- records = Book.find_id_by_solr term
- assert_equal 1, records.docs.size
- assert_equal [1], records.docs
- end
- end
-
- # Testing basic solr search that returns just the ids instead of the objects:
- # Model.find_id_by_solr 'term'
- # Note that you're able to mix free-search with fields and boolean operators
- def test_find_id_by_solr_ruby_or_splinter
- ['ruby OR splinter', 'ruby OR author:tom', 'name:cell OR author:peter',
- 'dummy OR cell'].each do |term|
- records = Book.find_id_by_solr term
- assert_equal 2, records.docs.size
- assert_equal [1,2], records.docs
- end
- end
-
- # Testing basic solr search that returns the total number of records found:
- # Model.find_count_by_solr 'term'
- # Note that you're able to mix free-search with fields and boolean operators
- def test_count_by_solr
- ['ruby', 'dummy', 'name:ruby', 'name:dummy', 'name:ruby AND author:peter',
- 'author:peter AND ruby'].each do |term|
- assert_equal 1, Book.count_by_solr(term), "there should only be 1 result for search: #{term}"
- end
- end
-
- # Testing basic solr search that returns the total number of records found:
- # Model.find_count_by_solr 'term'
- # Note that you're able to mix free-search with fields and boolean operators
- def test_count_by_solr_splinter
- ['splinter', 'name:splinter', 'name:splinter AND author:clancy',
- 'author:clancy AND splinter', 'author:clancy cell'].each do |term|
- assert_equal 1, Book.count_by_solr(term)
- end
- end
-
- # Testing basic solr search that returns the total number of records found:
- # Model.find_count_by_solr 'term'
- # Note that you're able to mix free-search with fields and boolean operators
- def test_count_by_solr_ruby_or_splinter
- ['ruby OR splinter', 'ruby OR author:tom', 'name:cell OR author:peter', 'dummy OR cell'].each do |term|
- assert_equal 2, Book.count_by_solr(term)
- end
- end
-
- # Testing basic solr search with additional options:
- # Model.find_count_by_solr 'term', :limit => 10, :offset => 0
- def test_find_with_options
- [1,2].each do |count|
- records = Book.find_by_solr 'ruby OR splinter', :limit => count
- assert_equal count, records.docs.size
- end
- end
-
- # Testing self.rebuild_solr_index
- # - It makes sure the index is rebuilt after a data has been lost
- def test_rebuild_solr_index
- assert_equal 1, Book.count_by_solr('splinter')
-
- Book.find(:first).solr_destroy
- assert_equal 0, Book.count_by_solr('splinter')
-
- Book.rebuild_solr_index
- assert_equal 1, Book.count_by_solr('splinter')
- end
-
- # Testing instance methods:
- # - solr_save
- # - solr_destroy
- def test_solr_save_and_solr_destroy
- assert_equal 1, Book.count_by_solr('splinter')
-
- Book.find(:first).solr_destroy
- assert_equal 0, Book.count_by_solr('splinter')
-
- Book.find(:first).solr_save
- assert_equal 1, Book.count_by_solr('splinter')
- end
-
- # Testing the order of results
- def test_find_returns_records_in_order
- records = Book.find_by_solr 'ruby^5 OR splinter'
- # we boosted ruby so ruby should come first
-
- assert_equal 2, records.total
- assert_equal 'Ruby for Dummies', records.docs.first.name
- assert_equal 'Splinter Cell', records.docs.last.name
- end
-
- # Testing solr search with optional :order argument
- def _test_with_order_option
- records = Movie.find_by_solr 'office^5 OR goofiness'
- assert_equal 'Hypnotized dude loves fishing but not working', records.docs.first.description
- assert_equal 'Cool movie about a goofy guy', records.docs.last.description
-
- records = Movie.find_by_solr 'office^5 OR goofiness', :order => 'description asc'
- assert_equal 'Cool movie about a goofy guy', records.docs.first.description
- assert_equal 'Hypnotized dude loves fishing but not working', records.docs.last.description
- end
-
- # Testing search with omitted :field_types should
- # return the same result set as if when we use it
- def test_omit_field_types_in_search
- records = Electronic.find_by_solr "price:[200 TO 599.99]"
- assert_match(/599/, records.docs.first.price)
- assert_match(/319/, records.docs.last.price)
-
- records = Electronic.find_by_solr "price:[200 TO 599.99]", :order => 'price asc'
- assert_match(/319/, records.docs.first.price)
- assert_match(/599/, records.docs.last.price)
-
- end
-
- # Test to make sure the result returned when no matches
- # are found has the same structure when there are results
- def test_returns_no_matches
- records = Book.find_by_solr 'rubyist'
- assert_equal [], records.docs
- assert_equal 0, records.total
-
- records = Book.find_id_by_solr 'rubyist'
- assert_equal [], records.docs
- assert_equal 0, records.total
-
- records = Book.find_by_solr 'rubyist', :facets => {}
- assert_equal [], records.docs
- assert_equal 0, records.total
- assert_equal({"facet_fields"=>[]}, records.facets)
- end
-
-
- # Testing the :exclude_fields option when set in the
- # model to make sure it doesn't get indexed
- def test_exclude_fields_option
- records = Electronic.find_by_solr 'audiobooks OR latency'
- assert records.docs.empty?
- assert_equal 0, records.total
-
- assert_nothing_raised{
- records = Electronic.find_by_solr 'features:audiobooks'
- assert records.docs.empty?
- assert_equal 0, records.total
- }
- end
-
- # Testing the :auto_commit option set to false in the model
- # should not send the commit command to Solr
- def test_auto_commit_turned_off
- assert_equal 0, Author.count
- Author.create(:name => 'Tom Clancy', :biography => 'Writes novels of adventure and espionage')
- assert_equal 1, Author.count
- records = Author.find_by_solr 'tom clancy'
- assert_equal 0, records.total
- end
-
- # Testing models that use a different key as the primary key
- def test_search_on_model_with_string_id_field
- records = Posting.find_by_solr 'first^5 OR second'
- assert_equal 2, records.total
- assert_equal 'ABC-123', records.docs.first.guid
- assert_equal 'DEF-456', records.docs.last.guid
- end
-
- # Making sure the result set is ordered correctly even on
- # models that use a different key as the primary key
- def test_records_in_order_on_model_with_string_id_field
- records = Posting.find_by_solr 'first OR second^5'
- assert_equal 2, records.total
- assert_equal 'DEF-456', records.docs.first.guid
- assert_equal 'ABC-123', records.docs.last.guid
- end
-
- # Making sure the records are added when passing a batch size
- # to rebuild_solr_index
- def test_using_rebuild_solr_index_with_batch
- assert_equal 2, Movie.count_by_solr('office OR napoleon')
- Movie.find(:all).each(&:solr_destroy)
- assert_equal 0, Movie.count_by_solr('office OR napoleon')
-
- Movie.rebuild_solr_index 100
- assert_equal 2, Movie.count_by_solr('office OR napoleon')
- end
-
- # Making sure find_by_solr with scores actually return the scores
- # for each individual record
- def test_find_by_solr_with_score
- books = Book.find_by_solr 'ruby^10 OR splinter', :scores => true
- assert_equal 2, books.total
- assert_equal 0.50338805, books.max_score
-
- books.records.each { |book| assert_not_nil book.solr_score }
- assert_equal 0.50338805, books.docs.first.solr_score
- assert_equal 0.23058894, books.docs.last.solr_score
- end
-
- # Making sure nothing breaks when html entities are inside
- # the content to be indexed; and on the search as well.
- def test_index_and_search_with_html_entities
- description = "
- inverted exclamation mark &iexcl; &#161;
- ¤ currency &curren; &#164;
- ¢ cent &cent; &#162;
- £ pound &pound; &#163;
- ¥ yen &yen; &#165;
- ¦ broken vertical bar &brvbar; &#166;
- § section &sect; &#167;
- ¨ spacing diaeresis &uml; &#168;
- © copyright &copy; &#169;
- ª feminine ordinal indicator &ordf; &#170;
- « angle quotation mark (left) &laquo; &#171;
- ¬ negation &not; &#172;
- ­ soft hyphen &shy; &#173;
- ® registered trademark &reg; &#174;
- â„¢ trademark &trade; &#8482;
- ¯ spacing macron &macr; &#175;
- ° degree &deg; &#176;
- ± plus-or-minus &plusmn; &#177;
- ² superscript 2 &sup2; &#178;
- ³ superscript 3 &sup3; &#179;
- ´ spacing acute &acute; &#180;
- µ micro &micro; &#181;
- ¶ paragraph &para; &#182;
- · middle dot &middot; &#183;
- ¸ spacing cedilla &cedil; &#184;
- ¹ superscript 1 &sup1; &#185;
- º masculine ordinal indicator &ordm; &#186;
- » angle quotation mark (right) &raquo; &#187;
- ¼ fraction 1/4 &frac14; &#188;
- ½ fraction 1/2 &frac12; &#189;
- ¾ fraction 3/4 &frac34; &#190;
- ¿ inverted question mark &iquest; &#191;
- × multiplication &times; &#215;
- ÷ division &divide; &#247
- &hearts; &diams; &clubs; &spades;"
-
- author = Author.create(:name => "Test in Action&trade; - Copyright &copy; Bob", :biography => description)
- assert author.valid?
- author.solr_commit
-
- author = Author.find_by_solr 'trademark &copy &#190 &iexcl &#163'
- assert_equal 1, author.total
- end
-
- def test_operator_search_option
- assert_nothing_raised {
- books = Movie.find_by_solr "office napoleon", :operator => :or
- assert_equal 2, books.total
-
- books = Movie.find_by_solr "office napoleon", :operator => :and
- assert_equal 0, books.total
- }
-
- assert_raise RuntimeError do
- Movie.find_by_solr "office napoleon", :operator => :bad
- end
- end
-
- # Making sure find_by_solr with scores actually return the scores
- # for each individual record and orders them accordingly
- def test_find_by_solr_order_by_score
- books = Book.find_by_solr 'ruby^10 OR splinter', {:scores => true, :order => 'score asc' }
- assert_equal 0.23058894, books.docs.first.solr_score
- assert_equal 0.50338805, books.docs.last.solr_score
-
- books = Book.find_by_solr 'ruby^10 OR splinter', {:scores => true, :order => 'score desc' }
- assert_equal 0.50338805, books.docs.first.solr_score
- assert_equal 0.23058894, books.docs.last.solr_score
- end
-
- # Search based on fields with the :date format
- def test_indexed_date_field_format
- movies = Movie.find_by_solr 'time_on_xml:[NOW-1DAY TO NOW]'
- assert_equal 2, movies.total
- end
-end
diff --git a/vendor/plugins/acts_as_solr/test/unit/association_indexing_test.rb b/vendor/plugins/acts_as_solr/test/unit/association_indexing_test.rb
deleted file mode 100644
index c0acacf26..000000000
--- a/vendor/plugins/acts_as_solr/test/unit/association_indexing_test.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-require File.join(File.dirname(__FILE__), '../test_helper')
-
-class AssociationIndexingTest < Test::Unit::TestCase
-
- fixtures :categories, :books
-
- # Testing the association indexing with has_many:
- #
- # class Category < ActiveRecord::Base
- # has_many :books
- # acts_as_solr :include => [:books]
- # end
- #
- # Note that some of the search terms below are from the 'books'
- # table, but get indexed as being a part of Category
- def test_search_on_fields_in_has_many_association
- ['thriller', 'novel', 'splinter', 'clancy', 'tom clancy thriller'].each do |term|
- assert_equal 1, Category.count_by_solr(term), "expected one result: #{term}"
- end
- end
-
- # Testing the association indexing with belongs_to:
- #
- # class Book < ActiveRecord::Base
- # belongs_to :category
- # acts_as_solr :include => [:category]
- # end
- #
- # Note that some of the search terms below are from the 'categories'
- # table, but get indexed as being a part of Book
- def test_search_on_fields_in_belongs_to_association
- ['splinter', 'clancy', 'tom clancy thriller', 'splinter novel'].each do |term|
- assert_equal 1, Book.count_by_solr(term), "expected one result: #{term}"
- end
- end
-
-end
diff --git a/vendor/plugins/acts_as_solr/test/unit/faceted_search_test.rb b/vendor/plugins/acts_as_solr/test/unit/faceted_search_test.rb
deleted file mode 100644
index a421477e5..000000000
--- a/vendor/plugins/acts_as_solr/test/unit/faceted_search_test.rb
+++ /dev/null
@@ -1,122 +0,0 @@
-require File.join(File.dirname(__FILE__), '../test_helper')
-
-class FacetedSearchTest < Test::Unit::TestCase
-
- fixtures :electronics
-
- # The tests below are for faceted search, but make sure you setup
- # the fields on your model you'd like to index as a facet field:
- #
- # class Electronic < ActiveRecord::Base
- # acts_as_solr :facets => [:category, :manufacturer]
- # end
- #
- # A basic faceted search using just one facet field
- def test_faceted_search_basic
- records = Electronic.find_by_solr "memory", :facets => {:fields =>[:category]}
- assert_equal 4, records.docs.size
- assert_match /Apple 60 GB Memory iPod/, records.docs.first.name
- assert_equal({"category_facet" => {"Electronics" => 1,
- "Memory" => 2,
- "Hard Drive" => 1}},
- records.facets['facet_fields'])
- end
-
- # Making sure the empty result returned what we expected
- def test_faceted_search_no_matches
- records = Electronic.find_by_solr "not found", :facets => { :fields => [:category]}
- assert_equal [], records.docs
- assert_equal [], records.facets['facet_fields']
- end
-
- # A basic faceted search using multiple facet fields
- def test_faceted_search_multiple_fields
- records = Electronic.find_by_solr "memory", :facets => {:fields =>[:category, :manufacturer]}
- assert_equal 4, records.docs.size
- assert_equal({"category_facet" => {"Electronics" => 1,
- "Memory" => 2,
- "Hard Drive" => 1},
- "manufacturer_facet" => {"Dell, Inc" => 0,
- "Samsung Electronics Co. Ltd." => 1,
- "Corsair Microsystems Inc." => 1,
- "A-DATA Technology Inc." => 1,
- "Apple Computer Inc." => 1}}, records.facets['facet_fields'])
- end
-
- # A basic faceted search using facet queries to get counts.
- # Here are the facets search query meaning:
- # "price:[* TO 200]" - Price up to 200
- # "price:[200 TO 500]" - Price from 200 to 500
- # "price:[500 TO *]" - Price higher than 500
- def test_facet_search_with_query
- records = Electronic.find_by_solr "memory", :facets => {:query => ["price:[* TO 200.00]",
- "price:[200.00 TO 500.00]",
- "price:[500.00 TO *]"]}
- assert_equal 4, records.docs.size
- assert_equal({"facet_queries" => {"price_rf:[* TO 200.00]"=>2,
- "price_rf:[500.00 TO *]"=>1,
- "price_rf:[200.00 TO 500.00]"=>1},
- "facet_fields" => {}}, records.facets)
- end
-
- # Faceted search specifying the query and fields
- def test_facet_search_with_query_and_field
- records = Electronic.find_by_solr "memory", :facets => {:query => ["price:[* TO 200.00]",
- "price:[200.00 TO 500.00]",
- "price:[500.00 TO *]"],
- :fields => [:category, :manufacturer]}
-
- q = records.facets["facet_queries"]
- assert_equal 2, q["price_rf:[* TO 200.00]"]
- assert_equal 1, q["price_rf:[500.00 TO *]"]
- assert_equal 1, q["price_rf:[200.00 TO 500.00]"]
-
- f = records.facets["facet_fields"]
- assert_equal 1, f["category_facet"]["Electronics"]
- assert_equal 2, f["category_facet"]["Memory"]
- assert_equal 1, f["category_facet"]["Hard Drive"]
- assert_equal 1, f["manufacturer_facet"]["Samsung Electronics Co. Ltd."]
- assert_equal 1, f["manufacturer_facet"]["Corsair Microsystems Inc."]
- assert_equal 1, f["manufacturer_facet"]["A-DATA Technology Inc."]
- assert_equal 1, f["manufacturer_facet"]["Apple Computer Inc."]
- end
-
- # Faceted searches with :sort and :zeros options turned on/off
- def test_faceted_search_using_zero_and_sort
- records = Electronic.find_by_solr "memory", :facets => {:fields =>[:category]}
- assert_equal({"category_facet"=>{"Electronics"=>1, "Memory"=>2, "Hard Drive"=>1}}, records.facets['facet_fields'])
-
- records = Electronic.find_by_solr "memory", :facets => {:sort => true, :fields =>[:category]}
- assert_equal({"category_facet"=>{"Memory"=>2, "Electronics"=>1, "Hard Drive"=>1}}, records.facets['facet_fields'])
-
- records = Electronic.find_by_solr "memory", :facets => {:fields =>[:manufacturer]}
- assert_equal({"manufacturer_facet" => {"Dell, Inc" => 0,
- "Samsung Electronics Co. Ltd." => 1,
- "Corsair Microsystems Inc." => 1,
- "A-DATA Technology Inc." => 1,
- "Apple Computer Inc." => 1}}, records.facets['facet_fields'])
-
- records = Electronic.find_by_solr "memory", :facets => {:zeros => false, :fields =>[:manufacturer]}
- assert_equal({"manufacturer_facet" => {"Samsung Electronics Co. Ltd." => 1,
- "Corsair Microsystems Inc." => 1,
- "A-DATA Technology Inc." => 1,
- "Apple Computer Inc." => 1}}, records.facets['facet_fields'])
- end
-
- # Faceted search with 'drill-down' option being passed.
- # The :browse option receives the argument in the format:
- # "facet_field:term". You can drill-down to as many
- # facet fields as you like
- def test_faceted_search_with_drill_down
- records = Electronic.find_by_solr "memory", :facets => {:fields =>[:category]}
- assert_equal 4, records.docs.size
- assert_equal({"category_facet"=>{"Electronics"=>1, "Memory"=>2, "Hard Drive"=>1}}, records.facets['facet_fields'])
-
- records = Electronic.find_by_solr "memory", :facets => {:fields =>[:category],
- :browse => "category:Memory",
- :zeros => false}
- assert_equal 2, records.docs.size
- assert_equal({"category_facet"=>{"Memory"=>2}}, records.facets['facet_fields'])
- end
-
-end
diff --git a/vendor/plugins/acts_as_solr/test/unit/multi_solr_search_test.rb b/vendor/plugins/acts_as_solr/test/unit/multi_solr_search_test.rb
deleted file mode 100644
index ad411d90f..000000000
--- a/vendor/plugins/acts_as_solr/test/unit/multi_solr_search_test.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-require File.join(File.dirname(__FILE__), '../test_helper')
-
-class ActsAsSolrTest < Test::Unit::TestCase
-
- fixtures :books, :movies
-
- # Testing the multi_solr_search with the returning results being objects
- def test_multi_solr_search_return_objects
- records = Book.multi_solr_search "Napoleon OR Tom", :models => [Movie], :results_format => :objects
- assert_equal 2, records.total
- assert_equal Movie, records.docs.first.class
- assert_equal Book, records.docs.last.class
- end
-
- # Testing the multi_solr_search with the returning results being ids
- def test_multi_solr_search_return_ids
- records = Book.multi_solr_search "Napoleon OR Tom", :models => [Movie], :results_format => :ids
- assert_equal 2, records.total
- assert records.docs.include?({"id" => "Movie:1"})
- assert records.docs.include?({"id" => "Book:1"})
- end
-
- # Testing the multi_solr_search with multiple models
- def test_multi_solr_search_multiple_models
- records = Book.multi_solr_search "Napoleon OR Tom OR Thriller", :models => [Movie, Category], :results_format => :ids
- assert_equal 4, records.total
- [{"id" => "Category:1"}, {"id" =>"Book:1"}, {"id" => "Movie:1"}, {"id" =>"Book:3"}].each do |result|
- assert records.docs.include?(result)
- end
- end
-
- # Testing empty result set format
- def test_returns_no_matches
- records = Book.multi_solr_search "not found", :models => [Movie, Category]
- assert_equal [], records.docs
- assert_equal 0, records.total
- end
-
-end