-
Notifications
You must be signed in to change notification settings - Fork 17
Shared files #121
base: master
Are you sure you want to change the base?
Shared files #121
Conversation
Currently lucene only searches files I own. I add searches across shared files as well, one approach is to build one master index and then use user-specific sub-searches to limit the results. This commit is a first step down that path.
…ink to version 9.0 format (not compatible with version 8, I believe)
By analyzing the blame information on this pull request, we identified @butonic, @DeepDiver1975 and @nickvergessen to be potential reviewers |
} | ||
|
||
public function logit($text) { | ||
$FH = fopen('/var/www/html/data/borealis.log', 'a'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @NacreData
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will just use logger instead
// FIXME: this next four lines seem a bit awkward. The goal is to get the "path" as | ||
// getUsersSharingFile() method expects it, which is relative to the user's dir | ||
// of files, without assuming the data directory is the same as the user name. | ||
$full_home_dir = \OC::$server->getUserManager()->get(\OC_User::getUser())->getHome(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getHome
called on potential null
30b785b
to
72a0243
Compare
} | ||
|
||
public static function postShareHook(array $param) { | ||
if ('file' == $param['itemType']) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
===
|
cc @NacreData |
c75e607
to
403cdf7
Compare
I've read through all your diffs. Thanks so much for reading through and correcting all my code so carefully! I have learned several things. I am truly sorry about leaving the debugging code in and the style violations, I will make a point of being more careful in the future. Everything you've done makes sense to me and seems correct, presuming that \OC::$server->getUserSession()->getUser()->getUID() always returns the same value as that stored in the "share_with" column of the oc_share table. What more can I do to help at this point? |
I think this only needs some good testing at this point. |
… and corrections from owncloud-archive#121
I did a fresh install and patch with the patch-set from this pull request and found a couple of things. patch0 bumps the apps' version number up and uses this in the internal checking to see if the index needs to be rebuilt. This seemed to be necessary to get the app to use the new index location in the upgrade I did. patch1 catches an error which cropped up when we changed the meaning of the variable $user in one file. |
Here's small patch which simplifies some of the code I was unhappy with. |
My most up-to-date version is at https://github.com/NacreData/search_lucene/tree/shared-files-2 In an unrelated (I think) issue, we were having problems with the cron-driven indexing. I have gotten cron indexing to work again by including one additional patch, NacreData@65615c6 The version we are using in production (which works) including all of the above is at https://github.com/NacreData/search_lucene Bump? @PVince81 @georgehrke |
@NacreData thx for your work. I see three problems:
|
moving to backlog for now @butonic please evaluate how / when to move forward with this |
replaces #120