Example #1
0
        public List <string> Filter(List <string> inputList)
        {
            if (inputList == null || inputList.Count == 0)
            {
                return(new List <string>());
            }
            var tokenDocumentIDs = new List <string>();

            InvertedIndex.TryGetTokenDocumentIDs(Token, out tokenDocumentIDs);
            inputList.RemoveAll(item => tokenDocumentIDs.Contains(item));
            return(inputList);
        }
        public List <string> Filter(List <string> inputList)
        {
            if (inputList == null || inputList.Count == 0)
            {
                return(new List <string>());
            }
            List <string> tokenDocumentIDs;

            if (InvertedIndex.TryGetTokenDocumentIDs(Token, out tokenDocumentIDs))
            {
                return(inputList.Intersect(tokenDocumentIDs).ToList());
            }
            return(new List <string>());
        }
Example #3
0
        public List <string> Filter(List <string> inputList)
        {
            if (inputList == null)
            {
                inputList = new List <string>();
            }
            List <string> tokenDocuments;

            if (InvertedIndex.TryGetTokenDocumentIDs(Token, out tokenDocuments))
            {
                inputList = inputList.Union(tokenDocuments).ToList();
            }
            return(inputList);
        }