构建全文搜索引擎与数据建模实践
1. 全文搜索引擎搭建基础
在进行全文搜索引擎的搭建时,首先要做的是添加一个迷你控制台,用于接收用户的操作指令。以下是具体的实现代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Microsoft.WindowsAzure.StorageClient;
using Microsoft.WindowsAzure;
namespace FTS
{
class Program
{
static void Main(string[] args)
{
CreateTables();
Console.WriteLine("Enter command - 'index <directory-path>' or 'search <query>' or 'quit'");
while (true)
{
Console.Write(">");
var command = Console.ReadLine();
if (command.StartsWith("index"))
{
var path = command.S