Search: ezcSearchXmlManager
[ ]
[ Solr schema ]
[ ]
[ ]
[ ]
[ ]
Class: ezcSearchXmlManager
|
Handles document type definitions in XML format. [
source]
Implemented Interfaces
Each definition must be in a separate file in the directory specified to the constructor. The filename must be the same as the lowercase name of the document type with .xml appended. Each file should return the definition of one document type.
Example exampleclass.xml:
1. <?xml version="1.0" charset="utf-8"?>
2. <document>
3. <field type="id">id</field>
4. <field type="string" boost="2">title</field>
5. <field type="text">description</field>
6. </document>
Method Summary
|
public ezcSearchXmlManager |
__construct(
$dir )
Constructs a new XML manager that will look for search document definitions in the directory $dir. |
|
public ezcSearchDocumentDefinition |
fetchDefinition(
$type )
Returns the definition of the search document with the type $type. |
Methods
__construct
ezcSearchXmlManager __construct(
string
$dir )
Constructs a new XML manager that will look for search document definitions in the directory $dir.
Parameters
| Name |
Type |
Description |
$dir |
string |
|
fetchDefinition
Returns the definition of the search document with the type $type.
Parameters
| Name |
Type |
Description |
$type |
string |
|
Throws
| Class | Description |
ezcSearchDefinitionNotFoundException |
if no such definition can be found. |
ezcSearchDefinitionInvalidException |
if the definition does not have an "idProperty" attribute. |
Last updated: Tue, 02 Dec 2008