{"action":"created","issue":{"url":"https://api.github.com/repos/juliocamarero/liferay-portal/issues/3326","labels_url":"https://api.github.com/repos/juliocamarero/liferay-portal/issues/3326/labels{/name}","comments_url":"https://api.github.com/repos/juliocamarero/liferay-portal/issues/3326/comments","events_url":"https://api.github.com/repos/juliocamarero/liferay-portal/issues/3326/events","html_url":"https://github.com/juliocamarero/liferay-portal/pull/3326","id":67309988,"number":3326,"title":"LPS-54784 Whether we only reindex latest indexable articles should depend on the value of journal.articles.index.all.versions.","user":{"login":"ealonso","id":922631,"avatar_url":"https://avatars.githubusercontent.com/u/922631?v=3","gravatar_id":"","url":"https://api.github.com/users/ealonso","html_url":"https://github.com/ealonso","followers_url":"https://api.github.com/users/ealonso/followers","following_url":"https://api.github.com/users/ealonso/following{/other_user}","gists_url":"https://api.github.com/users/ealonso/gists{/gist_id}","starred_url":"https://api.github.com/users/ealonso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ealonso/subscriptions","organizations_url":"https://api.github.com/users/ealonso/orgs","repos_url":"https://api.github.com/users/ealonso/repos","events_url":"https://api.github.com/users/ealonso/events{/privacy}","received_events_url":"https://api.github.com/users/ealonso/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-09T08:41:39Z","updated_at":"2015-04-10T01:04:29Z","closed_at":"2015-04-09T09:58:21Z","pull_request":{"url":"https://api.github.com/repos/juliocamarero/liferay-portal/pulls/3326","html_url":"https://github.com/juliocamarero/liferay-portal/pull/3326","diff_url":"https://github.com/juliocamarero/liferay-portal/pull/3326.diff","patch_url":"https://github.com/juliocamarero/liferay-portal/pull/3326.patch"},"body":null},"comment":{"url":"https://api.github.com/repos/juliocamarero/liferay-portal/issues/comments/91392399","html_url":"https://github.com/juliocamarero/liferay-portal/pull/3326#issuecomment-91392399","issue_url":"https://api.github.com/repos/juliocamarero/liferay-portal/issues/3326","id":91392399,"user":{"login":"zxdgoal","id":4162471,"avatar_url":"https://avatars.githubusercontent.com/u/4162471?v=3","gravatar_id":"","url":"https://api.github.com/users/zxdgoal","html_url":"https://github.com/zxdgoal","followers_url":"https://api.github.com/users/zxdgoal/followers","following_url":"https://api.github.com/users/zxdgoal/following{/other_user}","gists_url":"https://api.github.com/users/zxdgoal/gists{/gist_id}","starred_url":"https://api.github.com/users/zxdgoal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zxdgoal/subscriptions","organizations_url":"https://api.github.com/users/zxdgoal/orgs","repos_url":"https://api.github.com/users/zxdgoal/repos","events_url":"https://api.github.com/users/zxdgoal/events{/privacy}","received_events_url":"https://api.github.com/users/zxdgoal/received_events","type":"User","site_admin":false},"created_at":"2015-04-10T01:04:29Z","updated_at":"2015-04-10T01:04:29Z","body":"Another thing confused is that from this code\r\n\r\n```\r\n\t@Override\r\n\tprotected void doReindex(String className, long classPK) throws Exception {\r\n\t\tJournalArticle article =\r\n\t\t\tJournalArticleLocalServiceUtil.fetchJournalArticle(classPK);\r\n\r\n\t\tif (article == null) {\r\n\t\t\tarticle =\r\n\t\t\t\tJournalArticleLocalServiceUtil.fetchLatestIndexableArticle(\r\n\t\t\t\t\tclassPK);\r\n\t\t}\r\n\r\n\t\tif (article != null) {\r\n\t\t\tdoReindex(article);\r\n\t\t}\r\n\t}\r\n```\r\nThis first time we are trying to fetch journal article with ``fetchJournalArticle(classPK)`` we do not even consider its indexability and status.\r\n\r\nBut the second time, we are trying fetch journal article with resource primary key, we do consider its indexability and status.\r\n\r\nWhat in my mind is whenever using ``fetchLatestIndexableArticle``, we should consider the value of ``journal.articles.index.all.versions`` \r\n\r\n```\r\n    #\r\n    # Set this to true to index all article versions. Set this to false to index\r\n    # only the last indexable version.\r\n    #\r\n    journal.articles.index.all.versions=true\r\n```\r\n\r\nThanks\r\nJohn."}}