-
Notifications
You must be signed in to change notification settings - Fork 451
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
ArticleSearchIndex::_updateTextIndex() clears prior indexed content #2327
Comments
Similarly here: https://github.com/pkp/ojs/blob/ojs-stable-2_4_8/classes/submission/form/SuppFileForm.inc.php#L255-L276 My first thought was to add a new constant ARTICLE_SEARCH_SUPPLEMENTARY_FILE_METADATA to ArticleSearch.inc.php, but this would potentially confuse the mapping of An alternate approach is to provide a parameterized flag to ensure calls can avoid clearing existing keyword relationships when adding additional keywords to an object. |
|
…ith supplemental file metadata
…exing pkp/pkp-lib#2327: Index supplemental file fulltext interdependently with supplemental file metadata
…ith supplemental file metadata
Thanks, @ctgraham -- merged and ported to |
@asmecher, it looks like forward porting this to 3.x is unnecessary because 3.x doesn't index the metadata for files, only metadata for articles? Am I reading that right in ArticleSearchIndex.inc.php and SubmissionSearchIndex.inc.php? |
OJS 3.x doesn't include a separate "supplementary files" set, so those are no longer indexed per the code that was problematic here. |
Calls to
ArticleSearchDAO::insertObject()
in OJS 2.4.8 and OJS 3.0.2 clear existing object keywords if they exist.The function
ArticleSearchIndex::_updateTextIndex()
callsArticleSearchDAO::insertObject()
in 2.4.8 and 3.0.2.The function
ArticleSearchIndex::_updateTextIndex()
is called sequentially with the same arguments in subroutineArticleSearchIndex::articleFilesChanged()
because bothArticleSearchIndex::articleFileChanged()
andArticleSearchIndex::suppFileMetadataChanged()
(via_updateTextIndex()
) callinsertObject()
on the same file id.The result is that the fulltext object keyword relationships for supplemental files are lost.
The text was updated successfully, but these errors were encountered: