Closed (fixed)
Project:
Apache Solr Search
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 May 2011 at 17:22 UTC
Updated:
22 May 2013 at 22:58 UTC
Jump to comment: Most recent file
Comments
Comment #1
scor commentedComment #2
scor commentedand note that with this format_username value stored in solr, it might become possible to save a call to theme('username') while rendering search results.
Comment #3
pwolanin commentedHmm, so $user->name is a unique string, possibly suitable for multi-site faceting, etc.
I'd almost rather add an additional field for the formatted username. I'm also not sure exactly how this would be implemented for a 6.x-3.x backport.
Comment #4
jpmckinney commentedI prefer having an additional field. Calling theme('username') means the themed username will never be stale. (If a user does something to cause their themed name to change, or the themer changes the theme, all format_username's will be stale).
Comment #6
scor commentedadded an additional field for the formatted username.
Comment #7
jpmckinney commentedWhy is there:
We already have that in $document->is_uid.
Comment #8
scor commentedto align with the usual variables contained in a user account object (some modules altering the username might expect to find the 'uid' in the object). Would cloning $document into an $account object and adding the ->uid value in it make more sense?
Comment #9
jpmckinney commentedAha. I think creating a fake $account object from scratch is best, like:
Comment #10
pwolanin commentedI agree with James - we don't support a 'uid' field in the schema, use the 'is_uid' that's already indexed.
We already have fixed code to copy fields if needed, like:
Comment #11
scor commentednow with fake $account object.
Comment #12
nick_vhLooking good, tested and appears to be working well.
Comment #13
scor commentedI'm still carrying this functionality in my custom solr helper module.
Let's get #966796: Separate indexer for multiple entity types committed first since it's rather a beast compared to this issue. I will reroll once the multiple entity indexing has been committed.
Comment #14
nick_vhNew one, bit more readable
Comment #15
nick_vhCommitted
Comment #16
nick_vhComment #17
nick_vhComment #18
dwightaspinwall commentedI'm not seeing the patch in #17 in 6.x-3.x-dev. Could it have been inadvertently dropped in a D7 backport?
Comment #19
scor commentedThat's normal, @Nick_vh didn't claim to have committed this to 6.x-3.x, he only upload a patch at #17. Now that you've reopened the issue he will hopefully get to it.
Comment #21
dwightaspinwall commented@scor, understood, but CHANGELOG.txt in 6.x-3.x-dev shows the feature as added FWIW.
Comment #22
nick_vhIn 6.x-3.x it is added as such :
Format_username does not exist in 6.x afaik so closing again