nextcloud / nextcloud/fulltextsearch
NC29:Fulltextsearch live crash
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 234
- Forks
- 64
- Avg merge
- 6h 18m
- Merged PRs (30d)
- 10
Description
Running Nextcloud 29.0.3.4
Several times I have had this error (which caused my fulltextsearch:live service to crash) :
Error: Typed property OC\FullTextSearch\Model\IndexDocument::$access must not be accessed before initialization in /nextcloud/lib/private/FullTextSearch/Model/IndexDocument.php:775
Several times I managed to fix the problem with a simple fulltextsearch:index
but on the last crash it didn't work.
It looks a lot like https://github.com/nextcloud/fulltextsearch_elasticsearch/issues/375
To correct the problem I commented this (line 775 of the file /nextcloud/lib/private/FullTextSearch/Model/IndexDocument.php)
public function jsonSerialize(): array {
return [
'id' => $this->getId(),
'providerId' => $this->getProviderId(),
#'access' => $this->access,
'modifiedTime' => $this->getModifiedTime(),
'title' => $this->getTitle(),
'link' => $this->getLink(),
'index' => $this->index,
'source' => $this->getSource(),
'info' => $this->getInfoAll(),
'hash' => $this->getHash(),
'contentSize' => $this->getContentSize(),
'tags' => $this->getTags(),
'metatags' => $this->getMetaTags(),
'subtags' => $this->getSubTags(),
'more' => $this->getMore(),
'excerpts' => $this->getExcerpts(),
'score' => $this->getScore()
];
}
After correction, everything seems OK.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lib/private/FullTextSearch/Model/IndexDocument.php and inspect jsonSerialize() around line 775, then reproduce the failure through the fulltextsearch:live service and compare the related fulltextsearch_elasticsearch issue. Done means the live service no longer crashes when an IndexDocument is serialized and indexing continues without requiring the reported workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100