Wednesday, April 23, 2008

Building Index Table

In my previous post we discussed about Search Engines in general. We also discussed that there are few basic functionalities of a Search Engine. They are:
  1. Building Index Table
  2. Performing the Search
  3. Building the Result for us
Building Index Table
In this post we will predominantly focus on how the Index Table is being built. The index tables are the heart and brain of a search engine. The process of building index table begins much before the search engine is live. This is an ongoing process which begins much before the search engine is made available and continues till the search engine exists. In a way we can say that the process of indexing determines the quality of result from the search engine.

The indexing is done by a piece of software called Crawler aka Spider. The crawler as the name suggest crawls on the web page and collects virtually all the information it can from the web page. The input to the crawler is the main URL of the web page. Once the crawler receives the URL it performs the following:
  1. Build an Index Table for each and every word on the Page. Since the word may appear more than once in the document it stores the word, the URL and the number of occurences of the word in the document. This is being done for almost all the words found on the page.

  2. Once the crawler is done with building table for each and every word on the page it then navigates to the first link which happens to be a URL again and crawls the new page. ie it performs the similar activity what it did before ie building an index table for each and every word on the page. At this point in time there are two situations possible.

    • It encounters the word that is not part of the current (or previous) document in the index table. So it just adds the new word to the index table along with URL and number of times the word is found in the document.

    • b) The word already existed in the table and in that case it locates the word in the index table and adds the reference to second URL where the word is found to it. Also the number of times the word occurs in the document.

  3. Once the crawler is finished with the current page then it moves on as described in Step 2.

  4. If there are no unvisited link found on the current page then it will go back to the previous page and will start from next link found on the page and will repeat step 2 and 3.
The flaw of this method is that the web is infinite and practically the step 2 - 4 will never finish. The best possible outcome of this procedure is a fraction of web pages are indexed today. Google which is assumed to be the most powerful search engine can index only 1-2% (approx) web pages on the World Wide Web.

This is not the efficient mechanism to build the index table. There has to be a limit where the crawler has to stop going further down the hierarchy and crawl to other pages in the list (in the original page. In the future post of the series I will bring out the discussion on different approaches to crawl the pages. The choice has to be made whether to go for Dephth-First or Breadth-First. For now we assume that the index table is being built and the search engine is ready to perform the search operation.

Performing Search Operation
The index table is used when we type in the keyword to perform search operation. In simplistic term it goes through the index table and searches for the keyword and the document (URL) where it appears and then builds the list of documents to retrieve. But as I said earlier this is the simplest case. The actual result building mechanism has much more to it than just retrieving the documents and presenting it to the user.

In the next post in this series I will bring the perspective of how the result is being built and shown to the user. What affects the page rank and few more details about the same.

Until Next Time... :)

Tuesday, March 25, 2008

Search Engines

After a long gap I am posting something to my blog. Well there has be numerous activities and the most important among all those was getting married last month. The whole February month was filled with travel, meeting family and friends etc. Finally the day when I realized, the holiday was already over and it was time for me to come back to real world. Well I am back now in real world and will be posting something interesting as I discover something on the way of my research on the semantic web.

The most common use of internet today is for searching. The idea is to locate and access information or resources on the web. For example finding out more about the Formula 1 cars etc.

Today the search engines are based on Keywords. They can retrieve documents which contain the given keywords. As long as they given document contains the keyword it will be included in the search result and later shown to the user. The current web then passes on the pain to read and interpret whether the page makes any sense to the user or not. To understand this let us see how search engines are constructed. In this and few more upcoming posts I will be discussing in detail about the search engine and why they function how they function. In this post I will focus primarily on the problem (as described earlier) and some more detail about the search engines.

Today the contains hundreds of millions of web pages. To locate few handful of paged we might be interested in among those hundreds of millions of paged we use search engines like google, yahoo etc. They are the most popular search engines besides others like Altavista, Live Search etc. Inspite of the differences claimed by them a large part of it still remains the same. The fundamental of a search engine building remains the almost the same.

In the future posts will discuss about how the search engines are constructed and why they can do only the keyword search. The next post will be based on creating Index table which is being used by the search engines.

Until Next Time....

Monday, January 28, 2008

Work on Annotation Found Elsewhere

Recently during my regular research work on annotation I came across some work done by W3C on Annotation. I was surprised to see that the work on annotation was quite active back in late 1990s.

Annotation project using RDF at W3C:
some interesting work elsewhere:
I hope you enjoy reading these links as much as I did.

Sunday, January 06, 2008

Uniqueness of Entities

I was having a discussion with a friend of mine about what makes an object (entity) identifiable. The conversation started with different attributes of the object and then we got into a situation where we had to distinguish two objects who had similar attributes.

More often than not in an Enterprise System we are faced with a situation where two objects come across having similar attributes, which primarily (on a higher level) identify them. When we are faced with such situations then the only way out is to identify another attribute attached to the object which is bound to be unique. In a database application we have the primary keys generated by a sequence generator which guarantees its uniqueness. One the commonly used real-world example is Social Security Number in USA. The social security number is bound to be unique. Another unique attribute is the Credit Card number which is supposed to be unique as well.

In light to the above example the question we have is what is the unique identifier of the object. Is that something attached as as attribute to the object or it is the one which defines the object (rather the object itself). The more we think and discuss about it the more we come to a conclusion that there is no fixed rule as such. Both object being its own unique identifier or the object having an attribute which could uniquely identify it have their own pros and cons. COM uses GUID as a unique identifier for the objects created. A GUID is likely to be unique even though it is generated at many computers simultaneously and is done for years without any interruption.

I personally kind of find myself torn between the two approaches. Object being its own unique identifier has the benefits like the two objects can be identified unique even though they have no attributes to identify them. Whereas having an attribute which makes an object unique is that we can always work out a better combination (of attributes) if the current one is no longer able to gurantee the uniqueness.

I would like to hear from our readers what approach they would prefer in such scenarios and your experience as well. Hope this year brings lots of Joy, Happiness and good times to all of us.

Until Next Time... :)

Sunday, December 23, 2007

The Issue of Annotation

A while ago I was doing searches on Google Scholar, ACM and IEEE databases to find some good references on Web Service Annotation. To my surprise I could find only few papers which had some emphasis on annotation. It made me think whether the issue of annotation is really an issue or not. I could find lots and lots of work on WS Composition, Automated Discovery, Workflow etc but annotation was something left behind by many researchers around the world. To me annotation is a research problem because:
  1. With the growing popularity of Web services, there arise issues of finding relevant services, especially with the possibility of the existence of thousands of Web services.
  2. Web Services are typically used as part of larger Web processes that result from Web services composition. Current Web Service standards have focused on operational and syntactic details for implementation and execution of Web services. This limits the search mechanism for Web services to keyword-based searches.
  3. With the growing number of Web Services the current search mechanism (keyword-search) is not going to be feasible way to find Web Services. As the keyword search will return virtually every service which has the keyword mentioned as part of the description. The user will then have large number of services to filter from (most of them will be irrelevant though).
  4. Semantically described services will enable better service discovery and allow easier inter-operation and composition of Web Services.
Considering the role annotation is going to play in the problem space it is a need of the hour to find a suitable annotation mechanism that will be solve or eliminate the problem to an extent. I would love to know what you think about the annotation and its role in Semantic Web Services. In future posts I will discuss about different annotation models.

To every visitor of my blog. Wish you Merry Christmas and a Happy New Year.

Until Next Time....:)