0

I am developing following documents in couchdb.

{ 
    postTitle : 'something',
    seenBy : ['John', 'Fowler', 'Linda']
}

By using a map function in view, how can I generate a query that returns the posts that are not seen by somebody, say 'Michael'?

Moim
  • 486
  • 1
  • 8
  • 23
  • This may be useful for you: http://stackoverflow.com/questions/28339910/how-can-i-translate-my-sql-queries-to-cloudant-couchdb/28339911#28339911 – Chris Snow Apr 13 '15 at 18:55
  • I came across your question before. But didn't really found a good pointers that teaches how to create "not in" compatible indexes (like my example above). Thanks anyway. – Moim Apr 14 '15 at 06:00
  • I the amount of users known and can be hard-coded into the view as an array of user names? – Ingo Radatz Apr 14 '15 at 08:37
  • Unfortunately no. But I think I found a good way to approach this problem. Trying to create index per users dynamically. Not sure how it will perform, need some performance test and analysis. At this moment working on that. I will update this post with my findings. – Moim Apr 14 '15 at 09:23
  • You ask nearly the same question, right? http://stackoverflow.com/questions/29678225/how-to-do-not-equals-in-couchdb/29682444#29682444 – Ingo Radatz Apr 18 '15 at 15:04
  • @llabball yes, true. I tried to simplify (generalized) the question little bit- thought that will be easier for folks to understand and suggest. – Moim Apr 20 '15 at 08:05
  • Ok, then i flag it as duplicated – Ingo Radatz Apr 20 '15 at 09:01

0 Answers0