Ejemplo n.º 1
0
        public StoredInfo GetStoredInfo(Uri uri)
        {
            StoredInfo info = new StoredInfo();

            LNS.Query          query     = UriQuery("Uri", uri);
            SingletonCollector collector = new SingletonCollector();

            LNS.IndexSearcher searcher = LuceneCommon.GetSearcher(PrimaryStore);
            searcher.Search(query, null, collector);

            if (collector.MatchId != -1)
            {
                Document doc = searcher.Doc(collector.MatchId);
                info = DocumentToStoredInfo(doc);
            }

            LuceneCommon.ReleaseSearcher(searcher);

            return(info);
        }
Ejemplo n.º 2
0
		public StoredInfo GetStoredInfo (Uri uri)
		{
			StoredInfo info = new StoredInfo ();

			LNS.Query query = UriQuery ("Uri", uri);
			SingletonCollector collector = new SingletonCollector ();
			
			LNS.IndexSearcher searcher = LuceneCommon.GetSearcher (PrimaryStore);
			searcher.Search (query, null, collector);
			
			if (collector.MatchId != -1) { 
				Document doc = searcher.Doc (collector.MatchId);
				info = DocumentToStoredInfo (doc);
			}
			
			LuceneCommon.ReleaseSearcher (searcher);
			
			return info;
		}