Skip to content

Commit

Permalink
Merge branch 'release/2.0.0-beta1'
Browse files Browse the repository at this point in the history
  • Loading branch information
msqr committed Nov 29, 2016
2 parents 2432154 + fff9c5d commit e742f22
Show file tree
Hide file tree
Showing 2,469 changed files with 217,468 additions and 29,966 deletions.
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
[submodule "clucene"]
path = clucene
url = https://github.com/Blue-Rocket/clucene.git
branch = develop
72 changes: 9 additions & 63 deletions BRFullTextSearch.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "BRFullTextSearch"
s.version = "1.1.1"
s.version = "2.0.0-beta1"
s.summary = "Objective-C full text search engine."
s.description = <<-DESC
This project provides a way to integrate full-text search
Expand All @@ -16,25 +16,22 @@ Pod::Spec.new do |s|
s.license = "Apache License, Version 2.0"
s.author = { "Matt Magoffin" => "[email protected]" }

s.ios.deployment_target = '5.0'
s.ios.deployment_target = '5.1'
s.osx.deployment_target = '10.7'

s.source = { :git => "https://github.com/Blue-Rocket/BRFullTextSearch.git",
:tag => s.version.to_s, :submodules => true }
s.source = { :git => "https://github.com/Blue-Rocket/BRFullTextSearch.git", :tag => s.version.to_s }

s.libraries = 'stdc++', 'z'
s.compiler_flags = '-Wmost',
'-fvisibility=default', '-fPIC', '-D_UCS2', '-D_UNICODE', '-D_REENTRANT',
s.libraries = 'c++', 'z'
s.compiler_flags = '-fvisibility=default', '-fPIC', '-D_UCS2', '-D_UNICODE', '-D_REENTRANT',
'-DNDEBUG'

s.xcconfig = {
'CLANG_CXX_LANGUAGE_STANDARD' => 'gnu++98',
'CLANG_CXX_LIBRARY' => 'libstdc++',
'OTHER_LDFLAGS' => '-stdlib=libstdc++',
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++0x',
'CLANG_CXX_LIBRARY' => 'libc++',
}

s.requires_arc = true

s.default_subspec = 'Core'

s.subspec 'Core' do |as|
Expand All @@ -56,58 +53,7 @@ Pod::Spec.new do |s|
"BRFullTextSearch/*Analyzer*",
"BRFullTextSearch/*Filter*"
as.dependency 'BRFullTextSearch/API'
as.dependency 'BRFullTextSearch/CLucene'
end

s.subspec 'CLucene' do |as|
as.dependency 'BRFullTextSearch/CLucene-Shared'
as.dependency 'BRFullTextSearch/CLucene-Core'
as.dependency 'BRFullTextSearch/CLucene-Contribs-Lib'
end

s.subspec 'CLucene-Config' do |as|
as.requires_arc = false
as.source_files = "BRFullTextSearch/CLucene/*"
as.header_mappings_dir = 'BRFullTextSearch'
end

s.subspec 'CLucene-Core-API' do |as|
as.requires_arc = false
as.source_files = "clucene/src/core/CLucene.h",
"clucene/src/core/CLucene/**/*.h"
as.header_mappings_dir = 'clucene/src/core'
as.exclude_files = "clucene/src/core/CLucene/CLMonolithic.*",
"clucene/src/core/CLucene/search/FilterResultCache.*",
"clucene/src/core/CLucene/queryParser/legacy"
as.dependency 'BRFullTextSearch/CLucene-Config'
end

s.subspec 'CLucene-Shared' do |as|
as.requires_arc = false
as.source_files = "clucene/src/shared/CLucene/**/*.{h,c,cpp}"
as.header_mappings_dir = 'clucene/src/shared'
as.exclude_files = "clucene/src/shared/CLucene/CLSharedMonolithic.*",
"clucene/src/shared/CLucene/util/deflate.*"
as.dependency 'BRFullTextSearch/CLucene-Core-API'
end

s.subspec 'CLucene-Core' do |as|
as.requires_arc = false
as.source_files = "clucene/src/core/CLucene/**/*.{c,cpp}"
as.header_mappings_dir = 'clucene/src/core'
as.exclude_files = "clucene/src/core/CLucene/CLMonolithic.*",
"clucene/src/core/CLucene/search/FilterResultCache.*",
"clucene/src/core/CLucene/queryParser/legacy"
as.dependency 'BRFullTextSearch/CLucene-Core-API'
as.dependency 'BRFullTextSearch/CLucene-Shared'
end

s.subspec 'CLucene-Contribs-Lib' do |as|
as.requires_arc = false
as.source_files = "clucene/src/contribs-lib/CLucene/**/*.{h,c,cpp}"
as.header_mappings_dir = 'clucene/src/contribs-lib'
as.dependency 'BRFullTextSearch/CLucene-Core'
as.dependency 'BRFullTextSearch/CLucene-Shared'
as.dependency 'BRCLucene', '< 2.0'
end

end
1,932 changes: 172 additions & 1,760 deletions BRFullTextSearch.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions BRFullTextSearch.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BRFullTextSearch/BRNoLockFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "CLucene/_ApiHeader.h"
#include "BRNoLockFactory.h"
#include "_Lock.h"
#include "CLucene/store/_Lock.h"
#include "CLucene/util/Misc.h"

CL_NS_DEF(store)
Expand Down
3 changes: 1 addition & 2 deletions BRFullTextSearch/CLuceneSearchResults.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//

#import <memory>
#import <tr1/memory>
#import "BRSearchResults.h"

namespace lucene {
Expand All @@ -27,6 +26,6 @@ namespace lucene {
- (id)initWithHits:(std::auto_ptr<lucene::search::Hits>)theHits
sort:(std::auto_ptr<lucene::search::Sort>)theSort
query:(std::auto_ptr<lucene::search::Query>)theQuery
searcher:(std::tr1::shared_ptr<lucene::search::Searcher>)theSearcher;
searcher:(std::shared_ptr<lucene::search::Searcher>)theSearcher;

@end
4 changes: 2 additions & 2 deletions BRFullTextSearch/CLuceneSearchResults.mm
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ @implementation CLuceneSearchResults {
std::auto_ptr<Hits> hits;
std::auto_ptr<Sort> sort;
std::auto_ptr<Query> query;
std::tr1::shared_ptr<Searcher> searcher;
std::shared_ptr<Searcher> searcher;
}

- (id)initWithHits:(std::auto_ptr<lucene::search::Hits>)theHits
sort:(std::auto_ptr<lucene::search::Sort>)theSort
query:(std::auto_ptr<lucene::search::Query>)theQuery
searcher:(std::tr1::shared_ptr<lucene::search::Searcher>)theSearcher {
searcher:(std::shared_ptr<lucene::search::Searcher>)theSearcher {
if ( (self = [super init]) ) {
hits = theHits;
sort = theSort;
Expand Down
14 changes: 7 additions & 7 deletions BRFullTextSearch/CLuceneSearchService.mm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#import "CLucene.h"
#import "CLucene/_ApiHeader.h"
#import "ConstantScoreQuery.h"
#import "CLucene/search/ConstantScoreQuery.h"
#import "BRNoLockFactory.h"
#import "BRSimpleSortDescriptor.h"
#import "BRSnowballAnalyzer.h"
Expand Down Expand Up @@ -48,7 +48,7 @@ @implementation CLuceneSearchService {
NSInteger indexUpdateOptimizeThreshold;
Directory *dir;
std::auto_ptr<Analyzer> defaultAnalyzer;
std::tr1::shared_ptr<Searcher> searcher;
std::shared_ptr<Searcher> searcher;
NSBundle *bundle;
NSString *defaultAnalyzerLanguage;
}
Expand Down Expand Up @@ -140,8 +140,8 @@ + (BOOL)indexExistsAtPath:(NSString *)path {

#pragma mark - Accessors

- (std::tr1::shared_ptr<Searcher>)searcher {
std::tr1::shared_ptr<Searcher> s = searcher;
- (std::shared_ptr<Searcher>)searcher {
std::shared_ptr<Searcher> s = searcher;
if ( s.get() == NULL ) {
@synchronized(self) {
// create the index directory, if it doesn't already exist
Expand Down Expand Up @@ -677,7 +677,7 @@ - (int)removeObjectsFromIndexMatchingPredicateAndWait:(NSPredicate *)predicate e
Query *q = parser.parse([query asCLuceneString], [fieldName asCLuceneString], [self defaultAnalyzer]);
rootQuery.get()->add(q, true, BooleanClause::SHOULD);
}
std::tr1::shared_ptr<Searcher> s = [self searcher];
std::shared_ptr<Searcher> s = [self searcher];
std::auto_ptr<Hits> hits(s->search(rootQuery.get()));
std::auto_ptr<Sort> sort;
std::auto_ptr<Query> resultQuery(rootQuery);
Expand All @@ -691,7 +691,7 @@ - (int)removeObjectsFromIndexMatchingPredicateAndWait:(NSPredicate *)predicate e
NSString *idValue = [self idValueForType:type identifier:identifier];
try {
Term *idTerm = new Term([kBRSearchFieldNameIdentifier asCLuceneString], [idValue asCLuceneString]);
std::tr1::shared_ptr<Searcher> s = [self searcher];
std::shared_ptr<Searcher> s = [self searcher];
std::auto_ptr<TermQuery> idQuery(new TermQuery(idTerm));
std::auto_ptr<Hits> hits(s->search(idQuery.get()));
CLuceneSearchResult *result = nil;
Expand All @@ -707,7 +707,7 @@ - (int)removeObjectsFromIndexMatchingPredicateAndWait:(NSPredicate *)predicate e
}

- (id<BRSearchResults>)searchWithQuery:(std::auto_ptr<Query>)query sortDescriptors:(nullable NSArray<id<BRSortDescriptor>> *)sortDescriptors {
std::tr1::shared_ptr<Searcher> s = [self searcher];
std::shared_ptr<Searcher> s = [self searcher];
if ( sortDescriptors != nil ) {
std::vector<SortField *> sortFields;
for ( id<BRSortDescriptor> desc in sortDescriptors ) {
Expand Down
2 changes: 1 addition & 1 deletion BRFullTextSearch/SnowballPrefixFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define __BRFullTextSearch__SnowballPrefixFilter__

#include "CLucene/analysis/AnalysisHeader.h"
#include "SnowballFilter.h"
#include "CLucene/snowball/SnowballFilter.h"

using namespace lucene::analysis;
using namespace lucene::analysis::snowball;
Expand Down
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Change Log

## [1.1.1](https://github.com/Blue-Rocket/BRFullTextSearch/tree/1.1.1) (2016-05-18)
## [2.0.0-beta1](https://github.com/Blue-Rocket/BRFullTextSearch/tree/2.0.0-beta1) (2016-11-30)
[Full Changelog](https://github.com/Blue-Rocket/BRFullTextSearch/compare/1.1.1...2.0.0-beta1)

**Implemented enhancements:**

- Update to BRCLucene pod [\#22](https://github.com/Blue-Rocket/BRFullTextSearch/issues/22)

**Closed issues:**

- Index corruption [\#19](https://github.com/Blue-Rocket/BRFullTextSearch/issues/19)

## [1.1.1](https://github.com/Blue-Rocket/BRFullTextSearch/tree/1.1.1) (2016-05-17)
[Full Changelog](https://github.com/Blue-Rocket/BRFullTextSearch/compare/1.1.0...1.1.1)

**Implemented enhancements:**
Expand Down
21 changes: 21 additions & 0 deletions Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
source 'https://github.com/CocoaPods/Specs.git'

inhibit_all_warnings!

install! 'cocoapods', :deterministic_uuids => false

abstract_target 'BasePods' do
pod 'BRCLucene', '~> 1.0.0-beta1'

target 'BRFullTextSearch' do
platform :ios, '5.1'
end

target 'BRFullTextSearchTests' do
platform :ios, '5.1'
end

target 'BRFullTextSearchMacOS' do
platform :osx, '10.7'
end
end
28 changes: 28 additions & 0 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
PODS:
- BRCLucene (1.0.0-beta1):
- BRCLucene/CLucene (= 1.0.0-beta1)
- BRCLucene/CLucene (1.0.0-beta1):
- BRCLucene/CLucene-Contribs-Lib
- BRCLucene/CLucene-Core
- BRCLucene/CLucene-Shared
- BRCLucene/CLucene-Config (1.0.0-beta1)
- BRCLucene/CLucene-Contribs-Lib (1.0.0-beta1):
- BRCLucene/CLucene-Core
- BRCLucene/CLucene-Shared
- BRCLucene/CLucene-Core (1.0.0-beta1):
- BRCLucene/CLucene-Core-API
- BRCLucene/CLucene-Shared
- BRCLucene/CLucene-Core-API (1.0.0-beta1):
- BRCLucene/CLucene-Config
- BRCLucene/CLucene-Shared (1.0.0-beta1):
- BRCLucene/CLucene-Core-API

DEPENDENCIES:
- BRCLucene (~> 1.0.0-beta1)

SPEC CHECKSUMS:
BRCLucene: e3ff71c464c0a37d5093f2e1e9ee4e46bf578454

PODFILE CHECKSUM: ee15b1e6dd161fbe90172ae3362b2df9b74822dc

COCOAPODS: 1.1.1
Loading

0 comments on commit e742f22

Please sign in to comment.