Changeset 887


Ignore:
Timestamp:
Nov 22, 2009, 11:03:34 PM (12 years ago)
Author:
enkler
Message:

Updated SearchProvider

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        66TestResults
        77_ReSharper.CrypTool 2.0
         8*.exe
         9*.dll
         10bin
         11obj
  • trunk/CrypCore/SearchProvider.cs

    r879 r887  
    5050            var indexWriter = new IndexWriter(dir, analyzer, true, new IndexWriter.MaxFieldLength(25000));
    5151
    52             foreach (var File in Directory.GetFiles(HelpFilePath))
     52            foreach (var File in Directory.GetFiles(HelpFilePath,"*.xaml"))
    5353            {
    5454                var text = GetTextFromXaml(File).Replace("\r\n"," ").Replace("\n"," ");
     
    5656
    5757                var fldContent = new Field(ContentField, text, Field.Store.YES, Field.Index.TOKENIZED,
    58                               Field.TermVector.WITH_POSITIONS_OFFSETS);
     58                              Field.TermVector.WITH_OFFSETS);
    5959                var fldName = new Field(PluginField, Path.GetFileNameWithoutExtension(Path.GetFileName(File)), Field.Store.YES, Field.Index.NO,
    6060                              Field.TermVector.NO);
  • trunk/CrypCoreSearchTest/Program.cs

    r876 r887  
    1717                                       Path.GetFullPath(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + "\\..\\..\\HelpIndex")
    1818                               };
    19             Provider.CreateIndexes();
     19            Console.WriteLine(string.Format("HelpFilePath: {0}\r\nIndexPath: {1}",Provider.HelpFilePath,Provider.IndexPath));
     20            Console.WriteLine("Indizes neu erstellen? (y/n)");
     21            if(Console.ReadLine().ToLower() == "y")
     22            {
     23                Console.WriteLine("Indizes werden neu erstellt...");
     24                Provider.CreateIndexes();
     25            }
    2026            Console.WriteLine("Bitte Suchwort eingeben");
    2127            int counter= 1;
    22             foreach(var Result in Provider.Search(Console.ReadLine()))
     28            var results = Provider.Search(Console.ReadLine());
     29            if(results.Count  > 0)
    2330            {
    24                 Console.WriteLine(string.Format("{0}. PlugIn: {1}",counter,Result.Plugin));
    25                 foreach (var context in Result.Contexts)
     31                foreach (var Result in results)
    2632                {
    27                     Console.WriteLine(string.Format("     Kontext: {0}", context));
     33                    Console.WriteLine(string.Format("\r\n{0}. PlugIn: {1}", counter, Result.Plugin));
     34                    foreach (var context in Result.Contexts)
     35                    {
     36                        Console.WriteLine(string.Format("     Kontext: {0}", context));
     37                    }
     38                    counter++;
    2839                }
    29                 counter++;
    3040            }
     41            else
     42            {
     43                Console.WriteLine("Nichts gefunden...");
     44            }
     45           
    3146            Console.ReadKey();
    3247        }
  • trunk/CrypCoreSearchTest/bin

    • Property svn:ignore set to
      Release
  • trunk/SearchDevelopment/SearchDevelopment.4.5.resharper.user

    r880 r887  
    44    <integer />
    55    <boolean>
     6      <setting name="livetemplates.csharp.usevar">True</setting>
    67      <setting name="SolutionAnalysisEnabled">False</setting>
    78    </boolean>
     
    1112  </NAntValidationSettings>
    1213  <RecentFiles>
    13     <RecentFiles />
    14     <RecentEdits />
     14    <RecentFiles>
     15      <File id="FF5D473C-0716-4D3E-9078-2EBD979F94C6/f:Enums.cs" caret="11629" fromTop="32" />
     16      <File id="FF5D473C-0716-4D3E-9078-2EBD979F94C6/f:PluginManager.cs" caret="0" fromTop="0" />
     17      <File id="90C71656-814E-48BF-A625-7B7E2B8F126C/f:Program.cs" caret="1265" fromTop="34" />
     18      <File id="FF5D473C-0716-4D3E-9078-2EBD979F94C6/f:SearchProvider.cs" caret="0" fromTop="0" />
     19    </RecentFiles>
     20    <RecentEdits>
     21      <File id="90C71656-814E-48BF-A625-7B7E2B8F126C/f:Program.cs" caret="1024" fromTop="24" />
     22      <File id="90C71656-814E-48BF-A625-7B7E2B8F126C/f:Program.cs" caret="1167" fromTop="27" />
     23      <File id="90C71656-814E-48BF-A625-7B7E2B8F126C/f:Program.cs" caret="79" fromTop="3" />
     24      <File id="90C71656-814E-48BF-A625-7B7E2B8F126C/f:Program.cs" caret="774" fromTop="19" />
     25    </RecentEdits>
    1526  </RecentFiles>
    1627  <UnitTestRunner>
    1728    <Providers />
    1829  </UnitTestRunner>
     30  <CompletionStatisticsManager>
     31    <ItemStatistics item="Default">
     32      <Item value="string" priority="1" />
     33      <Item value="text" priority="6" />
     34      <Item value="offsets" priority="4" />
     35      <Item value="t" priority="1" />
     36      <Item value="for" priority="0" />
     37      <Item value="Length" priority="0" />
     38      <Item value="int" priority="9" />
     39      <Item value="start" priority="2" />
     40      <Item value="end" priority="2" />
     41      <Item value="ContextLeftOffset" priority="0" />
     42      <Item value="contextStart" priority="8" />
     43      <Item value="ContextLength" priority="0" />
     44      <Item value="contextLength" priority="3" />
     45      <Item value="ContextRightOffset" priority="0" />
     46      <Item value="contextEnd" priority="6" />
     47      <Item value="counter" priority="0" />
     48      <Item value="Path" priority="0" />
     49      <Item value="public" priority="1" />
     50      <Item value="List" priority="0" />
     51      <Item value="SearchResult" priority="1" />
     52      <Item value="Contexts" priority="0" />
     53      <Item value="new" priority="1" />
     54      <Item value="List&lt;string&gt;" priority="0" />
     55      <Item value="var" priority="0" />
     56      <Item value="SearchResults" priority="0" />
     57      <Item value="result" priority="3" />
     58      <Item value="context" priority="0" />
     59      <Item value="foreach" priority="0" />
     60      <Item value="Result" priority="0" />
     61      <Item value="nextSpace" priority="1" />
     62      <Item value="nextStartSpace" priority="1" />
     63      <Item value="startSearchPosition" priority="0" />
     64      <Item value="if" priority="0" />
     65      <Item value="Console" priority="0" />
     66    </ItemStatistics>
     67    <ItemStatistics item="Qualified:System.String">
     68      <Item value="Substring" priority="0" />
     69      <Item value="Length" priority="4" />
     70      <Item value="Replace" priority="2" />
     71      <Item value="IndexOf" priority="0" />
     72      <Item value="LastIndexOf" priority="0" />
     73    </ItemStatistics>
     74    <ItemStatistics item="Qualified:Lucene.Net.Index.TermVectorOffsetInfo">
     75      <Item value="GetHashCode" priority="0" />
     76      <Item value="GetEndOffset" priority="1" />
     77      <Item value="GetStartOffset" priority="1" />
     78    </ItemStatistics>
     79    <ItemStatistics item="Qualified:@System.String">
     80      <Item value="Format" priority="0" />
     81    </ItemStatistics>
     82    <ItemStatistics item="Qualified:@System.IO.Path">
     83      <Item value="GetFullPath" priority="0" />
     84    </ItemStatistics>
     85    <ItemStatistics item="Qualified:System.Collections.Generic.List`1">
     86      <Item value="Add" priority="1" />
     87    </ItemStatistics>
     88    <ItemStatistics item="Qualified:Cryptool.Core.SearchResult">
     89      <Item value="Score" priority="0" />
     90      <Item value="Contexts" priority="1" />
     91    </ItemStatistics>
     92    <ItemStatistics item="Qualified:@System.Console">
     93      <Item value="WriteLine" priority="0" />
     94    </ItemStatistics>
     95  </CompletionStatisticsManager>
    1996</Configuration>
Note: See TracChangeset for help on using the changeset viewer.