When you enable node access on an index, currently the published field is forced to be index, but the uid/author is required as well.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Here is the patch. In general i'm not sure whether it's required to index both author and uid.

drunken monkey’s picture

Title: Index uid/author beside published when you enable node access » Index author when node access is enabled
Component: Documentation » Plugins
FileSize
2.55 KB

Thanks for catching that, you're right of course! But now I really checked, nothing else should be required.

We only need either uid or author, depending on what we use for the query. I now opted for "author", as it is considerably more useful for other purposes, and thus more likely to be indexed in any case. Thanks for that suggestion, too!
In theory, we could dynamically check if either of the fields is indexed and use that one, but in practice I think there's really no benefit in indexing "uid" anyways.

Patch attached, using "author".

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Thanks! This patch works perfect at least for the version i use here.

drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Great, committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.