Exemple #1
0
 private void EnsureIndexPaths()
 {
     if (indexPaths.Count <= 0)
     {
         EnsureAnalyzer();
         var dirs = IndexPathBuilder.GetAllPath(Path.Combine(Directory, TypeName));
         dirs.ForEach(d =>
         {
             var p = new LuceneIndexPath(analyzer, d);
             indexPaths.Add(d.ToLower(), p);
         });
     }
 }
Exemple #2
0
        private LuceneIndexPath GetIndexPath(IDictionary <string, object> values)
        {
            string path = Path.Combine(Directory, TypeName, IndexPathBuilder.BuildIndexPath(values)).ToLower();

            if (indexPaths.ContainsKey(path))
            {
                return(indexPaths[path]);
            }
            EnsureAnalyzer();
            LuceneIndexPath p = new LuceneIndexPath(analyzer, path);

            lock (indexPaths)
            {
                indexPaths.Add(path, p);
            }
            return(p);
        }
Exemple #3
0
 private void EnsureIndexPaths()
 {
     if (indexPaths.Count <= 0)
     {
         EnsureAnalyzer();
         var dirs = IndexPathBuilder.GetAllPath(Path.Combine(Directory, TypeName));
         dirs.ForEach(d =>
             {
                 var p = new LuceneIndexPath(analyzer, d);
                 indexPaths.Add(d.ToLower(), p);
             });
     }
 }
Exemple #4
0
 private LuceneIndexPath GetIndexPath(IDictionary<string, object> values)
 {
     string path = Path.Combine(Directory, TypeName, IndexPathBuilder.BuildIndexPath(values)).ToLower();
     if (indexPaths.ContainsKey(path))
     {
         return indexPaths[path];
     }
     EnsureAnalyzer();
     LuceneIndexPath p = new LuceneIndexPath(analyzer, path);
     lock (indexPaths)
     {
         indexPaths.Add(path, p);
     }
     return p;
 }