A search engine is a complex application that requires many different parts to function properly. One layer is built on top of the other, and each layer adds additional functionality to the next. There are four components to the search engine, as shown in Figure.
The search engine is composed of an index, segments, documents, and fields. The index is the main file that contains a collection of documents. It contains the data the user can search through and is represented as a physical file stored in the local file system. Indexes contain segments that are created each time a document is added into the index.
Segments are sub-indexes that can be searched independently. The more segments in an index, the slower the performance of the index and ultimately your searches.
Documents contain the actual data the user can search through. Documents contain content such as HTML content from a page, the title of a book, or any other value that is deemed important for the user.
Each document is further broken down into fields. Each field in the document contains itemized content. For example, the document containing book information could contain three fields: title field, date field, and description field. Each field is open for the user to search through.
In the world of Zend Framework, each layer shown in Figure is represented as objects, except for the segment, which is handled behind the scenes. The index is represented as a Zend_ Search_ Lucene object and is stored in a directory of your choosing. Documents that are stored in the index are represented as Zend_ Search_ Lucene_ Document objects and contain Zend_ Search_ Lucene_ Field objects.
Letfs start creating each of the pieces that the search engine needs .
Zend Related Interview Questions
|CSS3 Interview Questions||HTML Interview Questions|
|PHP Interview Questions||MySQL Interview Questions|
|Linux Interview Questions||Drupal Interview Questions|
|Magento Interview Questions||MVC Framework Interview Questions|
|CSS Interview Questions||WordPress Interview Questions|
|CakePHP Interview Questions||CodeIgniter Interview Questions|
Getting Started With Zend Framework
Writing Controllers Using Zend_controller
Views, Forms, Filters, And Validators
Database Communication, Manipulation, And Display
Sending And Receiving E-mail
Web Services And Feeds
Creating A Search Engine Using Zend_search_lucene
Caching With Zend Framework
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.