Dear Experts, For a matchmaking portal, we have one requirement where in, if a customer viewed complete details of a bride or groom then we have to exclude that profile id from further search results. Currently, along with other details we are storing the viewed profile ids in a field (multivalued field) against that bride or groom's details.
Eg., if A viewed B, then in B's document under the field saw_me we will add A's id while searching, lets say, the currently searching members id is 123456 then we will fire a query like fq=-saw_me:(123456) Problem #1: The saw_me field value is growing like anything. Problem #2: Removal of ids which are deleted from the base. Right now we are doing this job as follows Query #1: fq=saw_me:(123456)&fl=DocId //Get all document ids which has the deleted id as part of saw_me field. Query #2: {"DociId":"234567","saw_me":{"remove":"123456"} //loop through the results got through the 1st query and fire the update query one by one We feel that this method of handling is not that optimum, so we need expert advice. Please guide.