Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Item13280: Upgrade to Solr-5 and more
- removed field "collection" as this conflicts with solr terminology - fixed solr::defaultweb in SolrSearchBaseTemplate - improved look and feel of person search - disabled default values for $Foswiki::cfg{SolrPlugin}{SkipTopics} - removed $Foswiki::cfg{SolrPlugin}{DefaultCollection} config param - initial work on additional crawlers, e.g. a filesystem crawler - disabled commit messages to solr to let it auto-commit on its own for better throughput - fixed erroring out due to invalid TOPINCINFOs - added configset for foswiki to be copy-pasted into the solr server - adjusted and improved all of solrindex.xml and schema.xml - upgraded to WebService::Solr 0.23 - disabled utf8 encoding in WebService::Solr by default - fixed spelling suggestions in ajax-solr: the collations have been moving around in the response json - fixed viewtopbar.solr.tmpl for PatternSkin - fixed field mapping and facetting for +value formfields
- Loading branch information
1 parent
ad63ccd
commit ae97ee8
Showing
134 changed files
with
7,034 additions
and
6,755 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
%META:TOPICINFO{author="ProjectContributor" date="1411635852" format="1.1" version="1"}% | ||
%META:TOPICINFO{author="ProjectContributor" date="1424859947" format="1.1" version="1"}% | ||
%META:TOPICPARENT{name="WebHome"}% | ||
|
||
%META:PREFERENCE{name="VIEW_TEMPLATE" title="VIEW_TEMPLATE" type="Set" value="SolrSearchView"}% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# Plugin for Foswiki - The Free and Open Source Wiki, http://foswiki.org/ | ||
# | ||
# Copyright (C) 2012-2014 Michael Daum http://michaeldaumconsulting.com | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License | ||
# as published by the Free Software Foundation; either version 2 | ||
# of the License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
|
||
package Foswiki::Plugins::SolrPlugin::Crawler; | ||
use strict; | ||
use warnings; | ||
|
||
use Foswiki::Plugins::SolrPlugin::Base (); | ||
our @ISA = qw( Foswiki::Plugins::SolrPlugin::Base ); | ||
|
||
################################################################################ | ||
sub crawl { | ||
die "not implemented"; | ||
} | ||
|
||
################################################################################ | ||
sub getListOfUsers { | ||
die "not implemented"; | ||
} | ||
|
||
################################################################################ | ||
sub getGrantedUsers { | ||
die "not implemented"; | ||
} | ||
|
||
################################################################################ | ||
sub getAclFields { | ||
my $this = shift; | ||
|
||
my @aclFields = (); | ||
|
||
# permissions | ||
my @grantedUsers = $this->getGrantedUsers(@_); | ||
foreach my $wikiName (@grantedUsers) { | ||
push @aclFields, 'access_granted' => $wikiName; | ||
} | ||
|
||
return @aclFields; | ||
} | ||
|
||
################################################################################ | ||
sub isIndexableFile { | ||
my ($this, $fileName) = @_; | ||
|
||
my $extension = ''; | ||
if ($fileName =~ /^(.+)\.(\w+?)$/) { | ||
$extension = lc($2); | ||
} | ||
$extension = 'jpg' if $extension =~ /jpe?g/i; | ||
|
||
my $indexFileTypes = $this->indexFileTypes(); | ||
|
||
return $indexFileTypes->{$extension}; | ||
} | ||
|
||
################################################################################ | ||
sub indexFileTypes { | ||
my $this = shift; | ||
|
||
my $indexFileType = $this->{_indexFileType}; | ||
|
||
unless (defined $indexFileType) { | ||
$indexFileType = {}; | ||
my $fileTypes = | ||
$this->{fileTypes} || | ||
$Foswiki::cfg{SolrPlugin}{IndexExtensions} || # backwards compatibility | ||
"txt, html, xml, doc, docx, xls, xlsx, ppt, pptx, pdf, odt"; | ||
|
||
foreach my $tmpFileTypes (split(/\s*,\s*/, $fileTypes)) { | ||
$indexFileType->{$tmpFileTypes} = 1; | ||
} | ||
|
||
$this->{_indexFileType} = $indexFileType; | ||
} | ||
|
||
return $indexFileType; | ||
} | ||
|
||
################################################################################ | ||
sub getStringifiedVersion { | ||
my ($this, $fileName) = @_; | ||
|
||
# TODO: add caching similar to Foswiki::Plugins::SolrPlugin::Indexer | ||
my $body = ''; | ||
|
||
my $extension = ''; | ||
if ($fileName =~ /^(.+)\.(\w+?)$/) { | ||
$extension = lc($2); | ||
} | ||
$extension = 'jpg' if $extension =~ /jpe?g/i; | ||
|
||
my $indexFileTypes = $this->indexFileTypes(); | ||
|
||
if ($indexFileTypes->{$extension}) { | ||
$body = Foswiki::Contrib::Stringifier->stringFor($fileName) || ''; | ||
} | ||
|
||
return $body; | ||
} | ||
|
||
1; | ||
|
Oops, something went wrong.