[Xapian-discuss] "WritableDatabase_add_document" error

Paul Dixon lordelph at gmail.com
Wed Mar 29 15:35:45 BST 2006


>  i implemented a simplesearch n simpleindex fr files in devanagari script
> using xapian-core(C++). now when i tried doin indexin using php on the same
> files i m gettin following error.
>
>  Fatal error: Type error in argument 1 of WritableDatabase_add_document.
> Expected SWIGTYPE_p_Xapian__WritableDatabase in
> /home/jana/public_html/temp/file_search/indexer.php on line
> 50
>
>  $database = new_Database($dbp);
>
> (....snip!....)
>
>  WritableDatabase_add_document($database, $doc);

Your $database object is an instance of Database, not WritableDatabase
- instantiate as follows

$database = new_WritableDatabase($dbp);

Paul



More information about the Xapian-discuss mailing list