我的要求是建立一个搜索引擎 [英] my requirement is to build a search engine

查看:122
本文介绍了我的要求是建立一个搜索引擎的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个搜索引擎,用于在根目录中搜索字符串/短语,并且在找到结果后需要在所有子目录文件夹和文件中进行搜索,需要像google搜索引擎一样显示结果:

1)像在文件中找到的确切短语一样,作为在该特定文件中打开该页面的链接.
2)一些文字作为句子,在字符串中找到该短语.
3)该文件的文件完整路径.

搜索必须使用停用词,同义词,符号...

任何人都请引导我执行此操作

A search engine for searching the string/phrase in a root directory and need to search in all sub directory folder and files after finding the result need to display the result like google search engine :

1) Like exact phrase found in the file as a link to open that page in that particular file.
2) Some text as sentence where that phrase is found in the string.
3) File Complete path of that file.

Searching must be done using the stopwords,synonyms,symbols...

Anyone please guide me in doing this

推荐答案

对于这样的论坛,这是一个过于广泛的问题.您需要对项目的各个部分进行一些自己的研究,例如

  • 列出目录树中的所有文件
  • 在单个文件中搜索文本
  • 打开并读取文件内容
  • 显示文件的特定部分
  • etc ... etc
This is far too broad a question for a forum like this. You need to do some research of your own on the individual parts of the project, such as

  • listing all files in the directory tree
  • searching individual files for text
  • opening and reading file content
  • displaying specific parts of the file
  • etc ... etc


这篇关于我的要求是建立一个搜索引擎的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆