terminating index process for search engine
i am working on a small search-engine app with asp.net 4.0. the开发者_Go百科 indexing process can index each URL founded in each document and this recursively performed for each other. now how i can terminate this process when i want or when user clicked on stop browser button?
I dont think the browser stop button is a good solution to your problem. If I understand correctly you have a recursive url indexing algorithm that does not have a base case. Meaning the algorithm does not know when to stop. I have a couple suggestions that might help you out.
1) Instead of using the stop button in the browser put an actual button on the page. Think of having a "start" and "stop" button.
or
2) Implement a base case for your recursive algorithm so that it knows when to stop automatically. The base case could be the algorithm could stop after going a predefined or user defined number of levels deep into the url structure.
精彩评论