xapian-core 1.2.7.1 → 1.2.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of xapian-core might be problematic. Click here for more details.

@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 06aee73e59cfc457cce52f664eae0e552c01dbc8
4
+ data.tar.gz: 05a5d329321bd87db2e16fac27ad7d4919f9655a
5
+ SHA512:
6
+ metadata.gz: 1436961ebd12485f715f4006f9de46b76a0bbdc8a78190864fa6e9f187219078d07eabba533c6b234ee4552c7de780b364ebfc83593924a16d096d9538c8ded3
7
+ data.tar.gz: 313ae704a20c34200ddb5cda8c6710d2657debeb299639324ff25c0065a89d89c17e0b02a0fbaa75d1ffa56f487f7665657a9a0cdeeb5030be0ccbbe4eaf90a2
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in xapian-core.gemspec
4
+ gemspec
@@ -0,0 +1,30 @@
1
+ # Xapian::Core
2
+
3
+ Provides Xapian and it's Ruby bindings.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'xapian-core'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install xapian-core
18
+
19
+ ## Usage
20
+
21
+ Browse the [Xapian](http://xapian.org/docs/overview.html) documentation online.
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
30
+
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -6,20 +6,20 @@ def system!(cmd)
6
6
  system(cmd) or raise
7
7
  end
8
8
 
9
- ver = '1.2.7'
9
+ ver = '1.2.19'
10
10
  core = "xapian-core-#{ver}"
11
11
  bindings = "xapian-bindings-#{ver}"
12
12
  xapian_config = "#{Dir.pwd}/#{core}/xapian-config"
13
13
 
14
14
  task :default do
15
15
  [core,bindings].each do |x|
16
- system! "tar -xzvf #{x}.tar.gz"
16
+ system! "tar -xzvf #{x}.tar.xz"
17
17
  end
18
18
 
19
19
  prefix = File.dirname(Dir.pwd)
20
20
  puts "prefix = #{prefix}"
21
21
 
22
- ENV['LDFLAGS'] = "-R#{prefix}/lib"
22
+ #ENV['LDFLAGS'] = "-R#{prefix}/lib"
23
23
 
24
24
  Dir.chdir core do
25
25
  system! "./configure --prefix=#{prefix} --exec-prefix=#{prefix}"
@@ -0,0 +1,5 @@
1
+ module Xapian
2
+ module Core
3
+ VERSION = "1.2.19.1"
4
+ end
5
+ end
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # Index each paragraph of a text file as a Xapian document.
4
+ #
5
+ # Originally by Paul Legato (plegato@nks.net), 4/22/06
6
+ # Based on Python's simplesearch.py
7
+ # Copyright (C) 2006 Networked Knowledge Systems, Inc.
8
+ # Copyright (C) 2007 Olly Betts
9
+ #
10
+ # This program is free software; you can redistribute it and/or
11
+ # modify it under the terms of the GNU General Public License as
12
+ # published by the Free Software Foundation; either version 2 of the
13
+ # License, or (at your option) any later version.
14
+ #
15
+ # This program is distributed in the hope that it will be useful,
16
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ # GNU General Public License for more details.
19
+ #
20
+ # You should have received a copy of the GNU General Public License
21
+ # along with this program; if not, write to the Free Software
22
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23
+ # USA
24
+
25
+ require 'rubygems'
26
+ require 'xapian'
27
+
28
+ if ARGV.size != 1
29
+ $stderr.puts "Usage: #{$0} PATH_TO_DATABASE"
30
+ exit 99
31
+ end
32
+
33
+ # Open the database for update, creating a new database if necessary.
34
+ database = Xapian::WritableDatabase.new(ARGV[0], Xapian::DB_CREATE_OR_OPEN)
35
+
36
+ indexer = Xapian::TermGenerator.new()
37
+ stemmer = Xapian::Stem.new("english")
38
+ indexer.stemmer = stemmer
39
+
40
+ para = ''
41
+ while line = $stdin.gets()
42
+ line.strip!()
43
+ if line.empty?
44
+ if not para.empty?
45
+ # We've reached the end of a paragraph, so index it.
46
+ doc = Xapian::Document.new()
47
+ doc.data = para
48
+
49
+ indexer.document = doc
50
+ indexer.index_text(para)
51
+
52
+ # Add the document to the database
53
+ database.add_document(doc)
54
+ para = ''
55
+ end # if not para.empty?
56
+ else # line not empty
57
+ para += ' ' if para != ''
58
+ para += line
59
+ end # if line empty
60
+ end
61
+
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # Simple command-line search script.
4
+ #
5
+ # Originally by Paul Legato (plegato@nks.net), 4/22/06.
6
+ #
7
+ # Copyright (C) 2006 Networked Knowledge Systems, Inc.
8
+ # Copyright (C) 2006,2007 Olly Betts
9
+ #
10
+ # This program is free software; you can redistribute it and/or
11
+ # modify it under the terms of the GNU General Public License as
12
+ # published by the Free Software Foundation; either version 2 of the
13
+ # License, or (at your option) any later version.
14
+ #
15
+ # This program is distributed in the hope that it will be useful,
16
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ # GNU General Public License for more details.
19
+ #
20
+ # You should have received a copy of the GNU General Public License
21
+ # along with this program; if not, write to the Free Software
22
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23
+ # USA
24
+
25
+ require 'rubygems'
26
+ require 'xapian'
27
+
28
+ if ARGV.size < 2
29
+ $stderr.puts "Usage: #{$0} PATH_TO_DATABASE QUERY"
30
+ exit 99
31
+ end
32
+
33
+ # Open the database for searching.
34
+ database = Xapian::Database.new(ARGV[0])
35
+
36
+ # Start an enquire session.
37
+ enquire = Xapian::Enquire.new(database)
38
+
39
+ # Combine the rest of the command line arguments with spaces between
40
+ # them, so that simple queries don't have to be quoted at the shell
41
+ # level.
42
+ queryString = ARGV[1..-1].join(' ')
43
+
44
+ # Parse the query string to produce a Xapian::Query object.
45
+ qp = Xapian::QueryParser.new()
46
+ stemmer = Xapian::Stem.new("english")
47
+ qp.stemmer = stemmer
48
+ qp.database = database
49
+ qp.stemming_strategy = Xapian::QueryParser::STEM_SOME
50
+ query = qp.parse_query(queryString)
51
+
52
+ puts "Parsed query is: #{query.description()}"
53
+
54
+ # Find the top 10 results for the query.
55
+ enquire.query = query
56
+ matchset = enquire.mset(0, 10)
57
+
58
+ # Display the results.
59
+ puts "#{matchset.matches_estimated()} results found."
60
+ puts "Matches 1-#{matchset.size}:\n"
61
+
62
+ matchset.matches.each {|m|
63
+ puts "#{m.rank + 1}: #{m.percent}% docid=#{m.docid} [#{m.document.data}]\n"
64
+ }
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'xapian/core/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "xapian-core"
8
+ spec.version = Xapian::Core::VERSION
9
+ spec.authors = ["Samuel Williams"]
10
+ spec.email = ["samuel.williams@oriontransfer.co.nz"]
11
+ spec.summary = %q{Provides Xapian libraries and Ruby bindings.}
12
+ spec.homepage = ""
13
+ spec.license = "GPLv3"
14
+
15
+ spec.files = `git ls-files -z`.split("\x0")
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.extensions << "ext/Rakefile"
21
+
22
+ spec.add_development_dependency "bundler", "~> 1.6"
23
+ spec.add_development_dependency "rake"
24
+ end
metadata CHANGED
@@ -1,69 +1,86 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: xapian-core
3
- version: !ruby/object:Gem::Version
4
- hash: 81
5
- prerelease:
6
- segments:
7
- - 1
8
- - 2
9
- - 7
10
- - 1
11
- version: 1.2.7.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.19.1
12
5
  platform: ruby
13
- authors:
6
+ authors:
14
7
  - Samuel Williams
15
8
  autorequire:
16
9
  bindir: bin
17
10
  cert_chain: []
18
-
19
- date: 2011-09-07 00:00:00 Z
20
- dependencies: []
21
-
11
+ date: 2015-01-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
22
41
  description:
23
- email: samuel.williams@oriontransfer.co.nz
42
+ email:
43
+ - samuel.williams@oriontransfer.co.nz
24
44
  executables: []
25
-
26
- extensions:
45
+ extensions:
27
46
  - ext/Rakefile
28
47
  extra_rdoc_files: []
29
-
30
- files:
48
+ files:
49
+ - ".gitignore"
50
+ - Gemfile
51
+ - README.md
52
+ - Rakefile
31
53
  - ext/Rakefile
32
- - ext/xapian-bindings-1.2.7.tar.gz
33
- - ext/xapian-core-1.2.7.tar.gz
34
- - lib/xapian/version.rb
35
- homepage: http://www.oriontransfer.co.nz/software/xapian
36
- licenses: []
37
-
54
+ - ext/xapian-bindings-1.2.19.tar.xz
55
+ - ext/xapian-core-1.2.19.tar.xz
56
+ - lib/xapian/core/version.rb
57
+ - test/simpleindex.rb
58
+ - test/simplesearch.rb
59
+ - xapian-core.gemspec
60
+ homepage: ''
61
+ licenses:
62
+ - GPLv3
63
+ metadata: {}
38
64
  post_install_message:
39
65
  rdoc_options: []
40
-
41
- require_paths:
66
+ require_paths:
42
67
  - lib
43
- required_ruby_version: !ruby/object:Gem::Requirement
44
- none: false
45
- requirements:
68
+ required_ruby_version: !ruby/object:Gem::Requirement
69
+ requirements:
46
70
  - - ">="
47
- - !ruby/object:Gem::Version
48
- hash: 3
49
- segments:
50
- - 0
51
- version: "0"
52
- required_rubygems_version: !ruby/object:Gem::Requirement
53
- none: false
54
- requirements:
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
+ requirements:
55
75
  - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
61
78
  requirements: []
62
-
63
79
  rubyforge_project:
64
- rubygems_version: 1.8.7
80
+ rubygems_version: 2.2.2
65
81
  signing_key:
66
- specification_version: 3
67
- summary: Xapian is a framework for fast full-text searching.
68
- test_files: []
69
-
82
+ specification_version: 4
83
+ summary: Provides Xapian libraries and Ruby bindings.
84
+ test_files:
85
+ - test/simpleindex.rb
86
+ - test/simplesearch.rb
Binary file
@@ -1,25 +0,0 @@
1
- # Copyright (c) 2007 Samuel Williams. Released under the GNU GPLv3.
2
- #
3
- # This program is free software: you can redistribute it and/or modify
4
- # it under the terms of the GNU General Public License as published by
5
- # the Free Software Foundation, either version 3 of the License, or
6
- # (at your option) any later version.
7
- #
8
- # This program is distributed in the hope that it will be useful,
9
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- # GNU General Public License for more details.
12
- #
13
- # You should have received a copy of the GNU General Public License
14
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
-
16
- module Xapian
17
- module VERSION #:nodoc:
18
- MAJOR = 1
19
- MINOR = 2
20
- TINY = 7
21
- REV = 1
22
-
23
- STRING = [MAJOR, MINOR, TINY, REV].join('.')
24
- end
25
- end