1. Modify
/home/abbas/sphinx/makeindex.php
file and make the changes as highlighted next:<?php // Database connection credentials $dsn ='mysql:dbname=myblog;host=localhost'; $user = 'root'; $pass = ''; // Instantiate the PDO (PHP 5 specific) class try { $dbh = new PDO($dsn, $user, $pass); } catch (PDOException $e){ echo'Connection failed: '.$e->getMessage(); } // We will use PHP's inbuilt XMLWriter to create the xml structure $xmlwriter = new XMLWriter(); $xmlwriter->openMemory(); $xmlwriter->setIndent(true); $xmlwriter->startDocument('1.0', 'UTF-8'); // Start the parent docset element $xmlwriter->startElement('sphinx:docset'); // Start the element for schema definition $xmlwriter->startElement('sphinx:schema'); // Start the element for title field $xmlwriter->startElement('sphinx:field'); $xmlwriter->writeAttribute("name", "title"); $xmlwriter->endElement(); //end field // Start the element for content field $xmlwriter...
Sphinx Search Beginner's Guide
By :
Sphinx Search Beginner's Guide
By:
Overview of this book
Table of Contents (15 chapters)
Sphinx Search
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Setting Up Sphinx
Getting Started
Indexing
Searching
Feed Search
Property Search
Sphinx Configuration
Customer Reviews