Scoring and sort by entering one array into another

Hi guys.

  1. I have the following task. Example. I have objects
    obj1 [
    'id':123,
    'arrayField':[
    1,
    2,
    3
    ]
    ],
    obj2 [
    'id':321,
    'arrayField':[
    10,
    25,
    3
    ]
    ]

So, i have array for search searchArray = [7,9,12,3,2].
I need all object which contain in "arrayField" any value from "searchArray" , but need sorting and scoring by how many values in "arrayField".

It simple OR in search, and scoring will work perfectly by default, or need something else ?

  1. Second question, can i get else in result % how much elements contains ?

Many Thanks !

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.