Hi there. I'm new to ES and would appreciate some advice on design concepts 
around large arrays.

I am writing a help tip feature that pops up a message each time a user 
logs in. The user can flag a checkbox if they do not want to see this 
particular tip again.

After playing with ElasticSearch the solution I came up with involved using 
a HelpTip document which contains an array of UserIds (identifying the 
users who have flagged that they do not want to see this tip again). 

Example1:
HelpTip
{
"title": "Need help getting started?",
"text": "Watch our overview video",
"userArray": ["id1", "id2"]
}

I know ES can cope with large arrays but I wonder if there would be 
performance issues if this array grew to 4000+ IDs. This record would be 
regularly re-indexed (each time a new user ID is added to the array). would 
there be performance issues when indexing a document containing a large 
array field?

Is this a sensible approach or would I be better using a relational model 
and holding the Help Tip info and the list of users in separate documents, 
then parsing them using two separate calls from my application?
Example 2:
HelpTip
{
"title": "Need help getting started?",
"text": "Watch our overview video"
}

HelpTipUserFlags
{
HelpTipId: "1",
UserId: "ID1"
}

Hope this makes sense. Thanks in advance for any help.

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/9cba2c32-6266-4b87-b708-83ee64499dbf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to