First of all... Great module... Great work!!

I have got the following issue.
If you create an index for nodes you can add related fields like author, ...

I want to search on USERS and:
- want to get them as a result in a view (database search server)
- but create one exposed filter on an user textfield or the body of the user generated content (concreet: showing exhibitors(user role) - searching based on the content of the exhibitor(user) and the news(content) and innovation(content) articles that they've created)

Therefor i need related fields for a user that link to the created content of that user (f.e. field: node_body)

------

I also use the module User Points...
As I want to sort the users on there 'activity' on our site, the user points field would be ideal. Any Idea how i can access that?

Thanks a lot for your feedback!

Glenn

Comments

glenn_jones’s picture

Title: Index related content of users » Index related content fields of user based indexing
glenn_jones’s picture

Issue summary: View changes

update

lennart.maschmeyer’s picture

have you found a solution? also trying to sort results based on user points, am guessing there is some kind of plugin needed, but I am not a coder so I wouldnt know how. Appreciate any input :)

nick_vh’s picture

Category: Feature request » Support request
Issue summary: View changes

I cannot really see the feature request here, looks more like a support request. Unfortunately I'd have no idea how to do that but it might need some custom coding.

If this is a feature request,please bump it up to D8 and write clearly what you would want, what you expect and perhaps some screenshot with a mock-up how it should work.

drunken monkey’s picture

Sorry for not answering in this issue initially!

For indexing user points, the User Points module would have to integrate their field with the Entity API. Then, it should show up correctly in the index's Fields form.

Indexing all content authored by the user would need some custom code. Easiest would be to use hook_entity_property_info_alter() to add a new field of type list<node> to the user and returning an array of all the user's node NIDs in the getter callback. You could then just index any fields from the node and/or use the "Aggregated fields" data alteration to combine them into a single one.

feldmarv’s picture

What is the current status here? Did someone implement such an use-case with custom coding?

drunken monkey’s picture

Category: Support request » Feature request
Status: Active » Needs review
Issue tags: +needs port to Drupal 8
StatusFileSize
new3.14 KB

This patch would add a data alteration providing this functionality.
I'm not completely sure whether it's generally useful enough to add it to the module, though. Even though I included a warning in the plugin description, this might lead to performance problems, or even out-of-memory errors, when used on larger sites. Seems to me this would be the biggest problem here.
But if someone has a user index on their site (which isn't that common anyways, I think), it seems reasonable that they would expect to be able to index the users' authored content, too.

Anyways, please test/review!

  • drunken monkey committed a24146a on 7.x-1.x
    Issue #1710212 by drunken monkey: Added a data alteration for indexing a...
drunken monkey’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Component: Views integration » Plugins
Status: Needs review » Patch (to be ported)
Issue tags: -needs port to Drupal 8

Seems to work well enough. Committed.

feldmarv’s picture

A great thanks to @drunken-monkey. The implementation is working really nice!