Lucene.Net.Search.TestRemoteSearchable.StartServer C# (CSharp) Method

StartServer() private static method

private static StartServer ( ) : void
return void
		private static void  StartServer()
		{
			// construct an index
			RAMDirectory indexStore = new RAMDirectory();
			IndexWriter writer = new IndexWriter(indexStore, new SimpleAnalyzer(), true);
			Document doc = new Document();
			doc.Add(Field.Text("test", "test text"));
			writer.AddDocument(doc);
			writer.Optimize();
			writer.Close();
			
			// publish it
			//// LocateRegistry.CreateRegistry(1099); // {{Aroush}}
			Lucene.Net.Search.Searchable local = new IndexSearcher(indexStore);
			RemoteSearchable impl = new RemoteSearchable(local);
			System.Runtime.Remoting.RemotingServices.Marshal(impl, "http://localhost/Searchable");
		}