Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge back Release 2.4.0 #337

Merged
merged 29 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
55e5408
[WIP] refactor to use multiple connectors
jvillafanez Mar 9, 2023
a05eba1
[WIP] Write in multiple indexes, add an additional test connector
jvillafanez Mar 10, 2023
f68f2e4
Check error handling and provide resumable "fillSecondary" command
jvillafanez Mar 15, 2023
a9a83dc
Fix variable name
jvillafanez Mar 16, 2023
a1e6dd3
Fix issue with the pagination
jvillafanez Mar 16, 2023
b9f467e
Add new ConnectorRelevanceV2 connector.
jvillafanez Mar 20, 2023
fecb4b3
Allow configuration of the connectors through web UI
jvillafanez Mar 21, 2023
0422993
Fix to prevent indexing the root of the user's folder
jvillafanez Mar 21, 2023
0d1b569
Remove test connector
jvillafanez Mar 21, 2023
dc424d3
Include new properties for size and mtime for easier search and more
jvillafanez Mar 22, 2023
af18fb4
Cleanup CI
jvillafanez Mar 22, 2023
899c460
Refactor to use getUserGroups, and rise min OC version to 10.5
jvillafanez Mar 23, 2023
5ba4c2e
Include mime.key to allow exact match on the whole mimetype
jvillafanez Mar 23, 2023
0ec1c46
Better handling of dates
jvillafanez Mar 23, 2023
6697a73
Fix CI issue with the closeCursor
jvillafanez Mar 23, 2023
f87fb26
Fix issue with groups, add factory for testing and add tests
jvillafanez Mar 27, 2023
6216d2c
Add unit tests
jvillafanez Mar 31, 2023
f51823e
Add unit test and adjust code
jvillafanez Apr 4, 2023
6dc7d39
Adjust for CI
jvillafanez Jun 21, 2023
c7407e8
prepare release-2.4.0
jnweiger Jul 13, 2023
b1f6854
Improve search and adjust stored data
jvillafanez Jul 27, 2023
e567cc9
Adjust unit tests
jvillafanez Jul 28, 2023
a671d7b
Remove minimum_should_match from query_string
jvillafanez Jul 28, 2023
4c472a4
Merge pull request #319 from owncloud/refactor_connector
jnweiger Oct 5, 2023
0779b51
fix the boolean, commit https://github.com/owncloud/search_elastic/pu…
jnweiger Oct 5, 2023
c49959c
bump changelog tstamp
jnweiger Nov 2, 2023
b043652
prepae merge back
jnweiger Nov 2, 2023
5f6ad10
Adjust CHANGELOG version compare URL
phil-davis Nov 2, 2023
11c1c9f
Merge branch 'master' into release-2.4.0
phil-davis Feb 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,20 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

### [Unreleased] - xxxx-xx-xx
### [Unreleased]


### [2.4.0] - 2023-11-02

### Changed

* [#322](https://github.com/owncloud/search_elastic/pull/322) - Always return an int from Symfony Command execute method
* [#319](https://github.com/owncloud/search_elastic/pull/319) - Refactor connector
* [#5643](https://github.com/owncloud/enterprise/issues/5643) - [00019894] - Feature Request - Elasticsearch - More Search Results and Latest Files

### Fixed

* [#5556](https://github.com/owncloud/enterprise/issues/5556) - [Fix] Remove trailing wildcard in searches of search_elastic enterprise

## [2.3.0] - 2022-03-02

Expand Down Expand Up @@ -105,7 +118,9 @@ This release requires Elastic Search 5.6.x and the `ingest-attachment` processor
### Removed
- Dropped support for Elastic Search 2.x

[Unreleased]: https://github.com/owncloud/search_elastic/compare/v2.2.0...master
[Unreleased]: https://github.com/owncloud/search_elastic/compare/v2.4.0...master
[2.4.0]: https://github.com/owncloud/search_elastic/compare/v2.3.0...v2.4.0
[2.3.0]: https://github.com/owncloud/search_elastic/compare/v2.2.0...v2.3.0
[2.2.0]: https://github.com/owncloud/search_elastic/compare/v2.1.0...v2.2.0
[2.1.0]: https://github.com/owncloud/search_elastic/compare/v2.0.0...v2.1.0
[2.0.0]: https://github.com/owncloud/search_elastic/compare/v1.0.0...v2.0.0
Expand Down
5 changes: 3 additions & 2 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<info>
<id>search_elastic</id>
<name>Full Text Search</name>
<version>2.3.0</version>
<version>2.4.0</version>
<licence>GPLv2</licence>
<author>ownCloud GmbH</author>
<dependencies>
<owncloud min-version="10.3" max-version="10" />
<owncloud min-version="10.5" max-version="10" />
<php min-version="7.3" max-version="7.4"/>
</dependencies>
<use-migrations>true</use-migrations>
Expand All @@ -29,5 +29,6 @@
<command>OCA\Search_Elastic\Command\Reset</command>
<command>OCA\Search_Elastic\Command\Update</command>
<command>OCA\Search_Elastic\Command\Rebuild</command>
<command>OCA\Search_Elastic\Command\FillSecondary</command>
</commands>
</info>
1 change: 1 addition & 0 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
['name' => 'admin_settings#checkStatus', 'url' => '/settings/status', 'verb' => 'GET'],
['name' => 'admin_settings#setup', 'url' => '/setup', 'verb' => 'POST'],
['name' => 'admin_settings#rescan', 'url' => '/rescan', 'verb' => 'POST'],
['name' => 'admin_settings#saveConnectors', 'url' => '/settings/connectors/save', 'verb' => 'POST'],
['name' => 'api#index', 'url' => '/indexer/index', 'verb' => 'GET'],
['name' => 'api#optimize', 'url' => '/indexer/optimize', 'verb' => 'POST'],
]];
14 changes: 13 additions & 1 deletion css/settings/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
width: 215px;
}

/*
* core/css/share.css uses text-transform:lowercase which looks
* bad here. Revert it for our elements
*/
#searchElasticSettings .select2-search-choice {
text-transform: none;
}

#searchElasticSettings div.field-margin-left-16 > div {
margin: 5px 5px 5px 0px;
}

.hide {
display: none;
}
Expand All @@ -23,4 +35,4 @@

.field-margin-left-16 {
margin-left: 16px;
}
}
22 changes: 22 additions & 0 deletions js/settings/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,28 @@
});
}

$('.select2').select2({
minimumResultsForSearch: -1
});
$('#saveConnectors').on('click', function(e) {
var sCon = $('#searchConnector').val();
var wCon = $('#writeConnectorList').val();
if (wCon.indexOf(sCon) !== -1) {
// search connector must be present in the write connectors
$.post(
OC.generateUrl('apps/search_elastic/settings/connectors/save'),
{
searchConnector: sCon,
writeConnectors: wCon
}
).always(function(result) {
OC.msg.finishedSaving('#saveMessage', result);
});
} else {
OC.msg.finishedError('#saveMessage', t('search_elastic', 'Error: the search connector must be present in the write connectors'));
}
});

$('#saveConfiguration').on('click', function(e) {
var host = $('#host').val();
var auth = $('#authType').val();
Expand Down
16 changes: 15 additions & 1 deletion lib/AdminPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,24 @@
namespace OCA\Search_Elastic;

use OCP\Settings\ISettings;
use OCA\Search_Elastic\SearchElasticService;

class AdminPanel implements ISettings {
/** @var SearchElasticService */
private $service;

public function __construct(SearchElasticService $service) {
$this->service = $service;
}

public function getPanel() {
return new \OCP\Template('search_elastic', 'settings/admin');
$conInfo = $this->service->getConnectorInfo();

$tmpl = new \OCP\Template('search_elastic', 'settings/admin');
$tmpl->assign('connectorList', $conInfo['registered']);
$tmpl->assign('writeConnectors', $conInfo['write']);
$tmpl->assign('searchConnector', $conInfo['search']);
return $tmpl;
}

public function getSectionID() {
Expand Down
11 changes: 11 additions & 0 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
use OCA\Search_Elastic\Db\StatusMapper;
use OCA\Search_Elastic\Hooks\Files;
use OCA\Search_Elastic\Jobs\DeleteJob;
use OCA\Search_Elastic\Connectors\Hub;
use OCA\Search_Elastic\Connectors\ConnectorLegacy;
use OCA\Search_Elastic\Connectors\ConnectorRelevanceV2;
use OCA\Search_Elastic\SearchElasticConfigService;
use OCA\Search_Elastic\SearchElasticService;
use OCP\AppFramework\App;
Expand Down Expand Up @@ -92,6 +95,14 @@ function (IAppContainer $appContainer) {
return false;
});

$container->registerService(Hub::class, function (IAppContainer $c) {
$server = $c->getServer();
$hub = new Hub($c->query(SearchElasticConfigService::class), $server->getLogger());
$hub->registerConnector($c->query(ConnectorLegacy::class));
$hub->registerConnector($c->query(ConnectorRelevanceV2::class));
return $hub;
});

$container->registerService(AuthManager::class, function (IAppContainer $c) {
$server = $c->getServer();

Expand Down
7 changes: 6 additions & 1 deletion lib/Command/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@ public function __construct(
protected function configure() {
$this
->setName('search:index:create')
->setDescription('Create initial Search Index for one or all users. This command could not update the search index correctly after the initial indexing.')
->setDescription(
'Create initial indexes for one or all users.'.
' The indexes will be created based on the configured connectors.'.
' New indexes will be setup if needed, but old ones won\'t be reset.'.
' This command could not update the indexes correctly after the initial indexing.'
)
->addArgument(
'user_id',
InputArgument::OPTIONAL | InputArgument::IS_ARRAY,
Expand Down
Loading