-
Notifications
You must be signed in to change notification settings - Fork 16
/
php_solr.h
executable file
·671 lines (577 loc) · 28.9 KB
/
php_solr.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2009 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| [email protected] so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Israel Ekpo <[email protected]> |
+----------------------------------------------------------------------+
*/
/* $Id: php_solr.h 320130 2011-11-28 20:44:55Z pierrick $ */
#ifndef SOLRCLIENT_H
#define SOLRCLIENT_H
#include <main/php.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef HAVE_SOLR
#include <time.h>
#include <main/php_ini.h>
#include <main/SAPI.h>
#include <main/snprintf.h>
#include <ext/standard/info.h>
#include <ext/standard/url.h>
#include <ext/standard/php_var.h>
#include <Zend/zend_extensions.h>
#include <Zend/zend_exceptions.h>
#include <Zend/zend_interfaces.h>
#include <Zend/zend_modules.h>
#include <Zend/zend_API.h>
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
#include <libxml/tree.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
#include <libxml/xmlstring.h>
extern zend_module_entry solr_module_entry;
#define phpext_solr_ptr &solr_module_entry
/* {{{ Startup, Shutdown, Activation, Deactivation and Info functions */
PHP_MINIT_FUNCTION(solr); /* Module Startup Function */
PHP_MSHUTDOWN_FUNCTION(solr); /* Module Shutdown Function */
PHP_RINIT_FUNCTION(solr); /* Request Activation Function */
PHP_RSHUTDOWN_FUNCTION(solr); /* Request Deactivation Function */
PHP_MINFO_FUNCTION(solr); /* Module Information Display Function */
/* }}} */
#ifdef ZTS
#include <TSRM/TSRM.h>
#endif
#if ((PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION == 2))
#define SOLR_ZEND_ENGINE_2_2 1
#endif
/* List of constants */
#include "solr_constants.h"
/* List of types */
#include "solr_types.h"
#ifdef ZTS
# define SOLR_GLOBAL(v) TSRMG(solr_globals_id, zend_solr_globals *, v)
#else
# define SOLR_GLOBAL(v) (solr_globals.v)
#endif
#include <ext/json/php_json.h>
#include "php_solr_api.h"
#include "php_solr_bc_macros.h"
/* {{{ Variables declared elsewhere */
ZEND_EXTERN_MODULE_GLOBALS(solr)
extern zend_class_entry *solr_ce_SolrObject;
extern zend_class_entry *solr_ce_SolrInputDocument;
extern zend_class_entry *solr_ce_SolrDocument;
extern zend_class_entry *solr_ce_SolrDocumentField;
extern zend_class_entry *solr_ce_SolrClient;
extern zend_class_entry *solr_ce_SolrParams;
extern zend_class_entry *solr_ce_SolrModifiableParams;
extern zend_class_entry *solr_ce_SolrQuery;
extern zend_class_entry *solr_ce_SolrResponse;
extern zend_class_entry *solr_ce_SolrQueryResponse;
extern zend_class_entry *solr_ce_SolrUpdateResponse;
extern zend_class_entry *solr_ce_SolrPingResponse;
extern zend_class_entry *solr_ce_SolrGenericResponse;
extern zend_class_entry *solr_ce_SolrUtils;
extern zend_class_entry *solr_ce_SolrException;
extern zend_class_entry *solr_ce_SolrIllegalOperationException;
extern zend_class_entry *solr_ce_SolrIllegalArgumentException;
extern zend_class_entry *solr_ce_SolrClientException;
extern ZEND_API zend_class_entry *zend_ce_serializable;
extern ZEND_API zend_class_entry *zend_ce_arrayaccess;
extern ZEND_API zend_class_entry *zend_ce_iterator;
/* {{{ Aliases for external class entries */
#define solr_ce_Serializable zend_ce_serializable
#define solr_ce_ArrayAccess zend_ce_arrayaccess
#define solr_ce_Iterator zend_ce_iterator
#define solr_ce_Exception zend_exception_get_default(TSRMLS_C)
/* }}} */
extern zend_object_handlers solr_object_handlers;
extern zend_object_handlers solr_document_field_handlers;
extern zend_object_handlers solr_input_document_object_handlers;
extern zend_object_handlers solr_client_object_handlers;
extern zend_object_handlers solr_response_object_handlers;
/* }}} */
/******************************************************************************/
/** DECLARATIONS FOR EXTENSION METHODS AND FUNCTIONS **/
/******************************************************************************/
/* {{{ Extension functions */
PHP_FUNCTION(solr_get_version);
/* }}} */
/* {{{ SolrObject methods */
PHP_METHOD(SolrObject, __construct);
PHP_METHOD(SolrObject, __destruct);
PHP_METHOD(SolrObject, __set);
PHP_METHOD(SolrObject, __get);
PHP_METHOD(SolrObject, __isset);
PHP_METHOD(SolrObject, __unset);
PHP_METHOD(SolrObject, offsetSet);
PHP_METHOD(SolrObject, offsetGet);
PHP_METHOD(SolrObject, offsetExists);
PHP_METHOD(SolrObject, offsetUnset);
PHP_METHOD(SolrObject, getPropertyNames);
/* }}} */
/* {{{ SolException object methods */
PHP_METHOD(SolrException, getInternalInfo);
PHP_METHOD(SolrClientException, getInternalInfo);
PHP_METHOD(SolrIllegalOperationException, getInternalInfo);
PHP_METHOD(SolrIllegalArgumentException, getInternalInfo);
/* }}} */
/* {{{ SolrDocument methods declarations */
PHP_METHOD(SolrDocument, __construct);
PHP_METHOD(SolrDocument, __destruct);
PHP_METHOD(SolrDocument, __clone);
PHP_METHOD(SolrDocument, __get);
PHP_METHOD(SolrDocument, __set);
PHP_METHOD(SolrDocument, __isset);
PHP_METHOD(SolrDocument, __unset);
/* Methods from Serializable */
PHP_METHOD(SolrDocument, serialize);
PHP_METHOD(SolrDocument, unserialize);
/* Methods from ArrayAccess */
PHP_METHOD(SolrDocument, offsetExists);
PHP_METHOD(SolrDocument, offsetGet);
PHP_METHOD(SolrDocument, offsetSet);
PHP_METHOD(SolrDocument, offsetUnset);
/* Methods from Iterator */
PHP_METHOD(SolrDocument, current);
PHP_METHOD(SolrDocument, key);
PHP_METHOD(SolrDocument, next);
PHP_METHOD(SolrDocument, rewind);
PHP_METHOD(SolrDocument, valid);
PHP_METHOD(SolrDocument, clear);
PHP_METHOD(SolrDocument, addField);
PHP_METHOD(SolrDocument, getFieldNames);
PHP_METHOD(SolrDocument, getFieldCount);
PHP_METHOD(SolrDocument, getField);
PHP_METHOD(SolrDocument, toArray);
PHP_METHOD(SolrDocument, fieldExists);
PHP_METHOD(SolrDocument, deleteField);
PHP_METHOD(SolrDocument, sort);
PHP_METHOD(SolrDocument, merge);
PHP_METHOD(SolrDocument, getInputDocument);
/* }}} */
/* {{{ SolrDocumentField methods */
PHP_METHOD(SolrDocumentField, __construct);
PHP_METHOD(SolrDocumentField, __destruct);
/* }}} */
/* {{{ SolrInputDocument methods declarations */
PHP_METHOD(SolrInputDocument, __construct);
PHP_METHOD(SolrInputDocument, __destruct);
PHP_METHOD(SolrInputDocument, __clone);
PHP_METHOD(SolrInputDocument, __sleep);
PHP_METHOD(SolrInputDocument, __wakeup);
PHP_METHOD(SolrInputDocument, setBoost);
PHP_METHOD(SolrInputDocument, getBoost);
PHP_METHOD(SolrInputDocument, clear);
PHP_METHOD(SolrInputDocument, addField);
PHP_METHOD(SolrInputDocument, setFieldBoost);
PHP_METHOD(SolrInputDocument, getFieldBoost);
PHP_METHOD(SolrInputDocument, getFieldNames);
PHP_METHOD(SolrInputDocument, getFieldCount);
PHP_METHOD(SolrInputDocument, getField);
PHP_METHOD(SolrInputDocument, toArray);
PHP_METHOD(SolrInputDocument, fieldExists);
PHP_METHOD(SolrInputDocument, deleteField);
PHP_METHOD(SolrInputDocument, sort);
PHP_METHOD(SolrInputDocument, merge);
/* }}} */
/* {{{ SolrClient methods declarations */
PHP_METHOD(SolrClient, __construct);
PHP_METHOD(SolrClient, __destruct);
PHP_METHOD(SolrClient, __sleep);
PHP_METHOD(SolrClient, __wakeup);
PHP_METHOD(SolrClient, __clone);
PHP_METHOD(SolrClient, query);
PHP_METHOD(SolrClient, getOptions);
PHP_METHOD(SolrClient, getDebug);
PHP_METHOD(SolrClient, addDocument);
PHP_METHOD(SolrClient, addDocuments);
PHP_METHOD(SolrClient, setServlet);
PHP_METHOD(SolrClient, setResponseWriter);
PHP_METHOD(SolrClient, request);
PHP_METHOD(SolrClient, ping);
PHP_METHOD(SolrClient, threads);
PHP_METHOD(SolrClient, deleteById);
PHP_METHOD(SolrClient, deleteByIds);
PHP_METHOD(SolrClient, deleteByQuery);
PHP_METHOD(SolrClient, deleteByQueries);
PHP_METHOD(SolrClient, optimize);
PHP_METHOD(SolrClient, commit);
PHP_METHOD(SolrClient, rollback);
/* }}} */
/* {{{ SolrParams methods declarations */
PHP_METHOD(SolrParams, setParam); /* Parameter can only accept one value */
PHP_METHOD(SolrParams, addParam); /* Parameter can accept more than one value */
PHP_METHOD(SolrParams, getParams); /* Retrieves the parameters and their values */
PHP_METHOD(SolrParams, getParam); /* Retrieves a parameter value */
PHP_METHOD(SolrParams, __toString); /* Returns a string representation of the object */
PHP_METHOD(SolrParams, toString); /* Returns a string representation of the object */
PHP_METHOD(SolrParams, getPreparedParams); /* Returns the prepared parameters */
PHP_METHOD(SolrParams, serialize); /* used by serialize() */
PHP_METHOD(SolrParams, unserialize); /* used by unserialize() */
PHP_METHOD(SolrParams, __clone); /* Used to enforce the cloning of SolrParams is currently unsupported */
/* }}} */
/* {{{ SolrModifiableParams methods declarations */
PHP_METHOD(SolrModifiableParams, __construct);
PHP_METHOD(SolrModifiableParams, __destruct);
/* }}} */
/* {{{ SolrQuery methods declarations */
/* Constructor and Destructor */
PHP_METHOD(SolrQuery, __construct);
PHP_METHOD(SolrQuery, __destruct);
/* CommonQueryParameters */
PHP_METHOD(SolrQuery, setQuery);
PHP_METHOD(SolrQuery, getQuery);
PHP_METHOD(SolrQuery, setStart);
PHP_METHOD(SolrQuery, getStart);
PHP_METHOD(SolrQuery, setRows);
PHP_METHOD(SolrQuery, getRows);
PHP_METHOD(SolrQuery, addField);
PHP_METHOD(SolrQuery, removeField);
PHP_METHOD(SolrQuery, getFields);
PHP_METHOD(SolrQuery, addSortField);
PHP_METHOD(SolrQuery, removeSortField);
PHP_METHOD(SolrQuery, getSortFields);
PHP_METHOD(SolrQuery, addFilterQuery);
PHP_METHOD(SolrQuery, removeFilterQuery);
PHP_METHOD(SolrQuery, getFilterQueries);
PHP_METHOD(SolrQuery, setShowDebugInfo);
PHP_METHOD(SolrQuery, setExplainOther);
PHP_METHOD(SolrQuery, setTimeAllowed);
PHP_METHOD(SolrQuery, getTimeAllowed);
PHP_METHOD(SolrQuery, setOmitHeader);
/* CoreQueryParameters */
PHP_METHOD(SolrQuery, setEchoHandler);
PHP_METHOD(SolrQuery, setEchoParams);
/* SimpleFacetParameters */
PHP_METHOD(SolrQuery, setFacet);
PHP_METHOD(SolrQuery, getFacet);
PHP_METHOD(SolrQuery, addFacetField);
PHP_METHOD(SolrQuery, removeFacetField);
PHP_METHOD(SolrQuery, getFacetFields);
PHP_METHOD(SolrQuery, addFacetQuery);
PHP_METHOD(SolrQuery, removeFacetQuery);
PHP_METHOD(SolrQuery, getFacetQueries);
PHP_METHOD(SolrQuery, setFacetPrefix);
PHP_METHOD(SolrQuery, getFacetPrefix);
PHP_METHOD(SolrQuery, setFacetSort);
PHP_METHOD(SolrQuery, getFacetSort);
PHP_METHOD(SolrQuery, setFacetLimit);
PHP_METHOD(SolrQuery, getFacetLimit);
PHP_METHOD(SolrQuery, setFacetOffset);
PHP_METHOD(SolrQuery, getFacetOffset);
PHP_METHOD(SolrQuery, setFacetMinCount);
PHP_METHOD(SolrQuery, getFacetMinCount);
PHP_METHOD(SolrQuery, setFacetMissing);
PHP_METHOD(SolrQuery, getFacetMissing);
PHP_METHOD(SolrQuery, setFacetMethod);
PHP_METHOD(SolrQuery, getFacetMethod);
PHP_METHOD(SolrQuery, setFacetEnumCacheMinDefaultFrequency);
/* Date facet parameters */
PHP_METHOD(SolrQuery, addFacetDateField);
PHP_METHOD(SolrQuery, removeFacetDateField);
PHP_METHOD(SolrQuery, getFacetDateFields);
PHP_METHOD(SolrQuery, setFacetDateStart);
PHP_METHOD(SolrQuery, getFacetDateStart);
PHP_METHOD(SolrQuery, setFacetDateEnd);
PHP_METHOD(SolrQuery, getFacetDateEnd);
PHP_METHOD(SolrQuery, setFacetDateGap);
PHP_METHOD(SolrQuery, getFacetDateGap);
PHP_METHOD(SolrQuery, setFacetDateHardEnd);
PHP_METHOD(SolrQuery, getFacetDateHardEnd);
PHP_METHOD(SolrQuery, addFacetDateOther);
PHP_METHOD(SolrQuery, removeFacetDateOther);
PHP_METHOD(SolrQuery, getFacetDateOther);
/* HighlightingParameters */
PHP_METHOD(SolrQuery, setHighlight);
PHP_METHOD(SolrQuery, getHighlight);
PHP_METHOD(SolrQuery, addHighlightField);
PHP_METHOD(SolrQuery, removeHighlightField);
PHP_METHOD(SolrQuery, getHighlightFields);
PHP_METHOD(SolrQuery, setHighlightSnippets);
PHP_METHOD(SolrQuery, getHighlightSnippets);
PHP_METHOD(SolrQuery, setHighlightFragsize);
PHP_METHOD(SolrQuery, getHighlightFragsize);
PHP_METHOD(SolrQuery, setHighlightMergeContiguous);
PHP_METHOD(SolrQuery, getHighlightMergeContiguous);
PHP_METHOD(SolrQuery, setHighlightRequireFieldMatch);
PHP_METHOD(SolrQuery, getHighlightRequireFieldMatch);
PHP_METHOD(SolrQuery, setHighlightMaxAnalyzedChars);
PHP_METHOD(SolrQuery, getHighlightMaxAnalyzedChars);
PHP_METHOD(SolrQuery, setHighlightAlternateField);
PHP_METHOD(SolrQuery, getHighlightAlternateField);
PHP_METHOD(SolrQuery, setHighlightMaxAlternateFieldLength);
PHP_METHOD(SolrQuery, getHighlightMaxAlternateFieldLength);
PHP_METHOD(SolrQuery, setHighlightFormatter);
PHP_METHOD(SolrQuery, getHighlightFormatter);
PHP_METHOD(SolrQuery, setHighlightSimplePre);
PHP_METHOD(SolrQuery, getHighlightSimplePre);
PHP_METHOD(SolrQuery, setHighlightSimplePost);
PHP_METHOD(SolrQuery, getHighlightSimplePost);
PHP_METHOD(SolrQuery, setHighlightFragmenter);
PHP_METHOD(SolrQuery, getHighlightFragmenter);
PHP_METHOD(SolrQuery, setHighlightUsePhraseHighlighter);
PHP_METHOD(SolrQuery, getHighlightUsePhraseHighlighter);
PHP_METHOD(SolrQuery, setHighlightHighlightMultiTerm);
PHP_METHOD(SolrQuery, getHighlightHighlightMultiTerm);
PHP_METHOD(SolrQuery, setHighlightRegexSlop);
PHP_METHOD(SolrQuery, getHighlightRegexSlop);
PHP_METHOD(SolrQuery, setHighlightRegexPattern);
PHP_METHOD(SolrQuery, getHighlightRegexPattern);
PHP_METHOD(SolrQuery, setHighlightRegexMaxAnalyzedChars);
PHP_METHOD(SolrQuery, getHighlightRegexMaxAnalyzedChars);
/* StatsComponent */
PHP_METHOD(SolrQuery, setStats);
PHP_METHOD(SolrQuery, getStats);
PHP_METHOD(SolrQuery, addStatsField);
PHP_METHOD(SolrQuery, removeStatsField);
PHP_METHOD(SolrQuery, getStatsFields);
PHP_METHOD(SolrQuery, addStatsFacet);
PHP_METHOD(SolrQuery, removeStatsFacet);
PHP_METHOD(SolrQuery, getStatsFacets);
/* MoreLikeThis */
PHP_METHOD(SolrQuery, setMlt);
PHP_METHOD(SolrQuery, getMlt);
PHP_METHOD(SolrQuery, setMltCount);
PHP_METHOD(SolrQuery, getMltCount);
PHP_METHOD(SolrQuery, addMltField);
PHP_METHOD(SolrQuery, removeMltField);
PHP_METHOD(SolrQuery, getMltFields);
PHP_METHOD(SolrQuery, addMltQueryField);
PHP_METHOD(SolrQuery, removeMltQueryField);
PHP_METHOD(SolrQuery, getMltQueryFields);
PHP_METHOD(SolrQuery, setMltMinTermFrequency);
PHP_METHOD(SolrQuery, getMltMinTermFrequency);
PHP_METHOD(SolrQuery, setMltMinDocFrequency);
PHP_METHOD(SolrQuery, getMltMinDocFrequency);
PHP_METHOD(SolrQuery, setMltMinWordLength);
PHP_METHOD(SolrQuery, getMltMinWordLength);
PHP_METHOD(SolrQuery, setMltMaxWordLength);
PHP_METHOD(SolrQuery, getMltMaxWordLength);
PHP_METHOD(SolrQuery, setMltMaxNumTokens);
PHP_METHOD(SolrQuery, getMltMaxNumTokens);
PHP_METHOD(SolrQuery, setMltMaxNumQueryTerms);
PHP_METHOD(SolrQuery, getMltMaxNumQueryTerms);
PHP_METHOD(SolrQuery, setMltBoost);
PHP_METHOD(SolrQuery, getMltBoost);
/* TermsComponent */
PHP_METHOD(SolrQuery, setTerms);
PHP_METHOD(SolrQuery, getTerms);
PHP_METHOD(SolrQuery, setTermsField);
PHP_METHOD(SolrQuery, getTermsField);
PHP_METHOD(SolrQuery, setTermsLowerBound);
PHP_METHOD(SolrQuery, getTermsLowerBound);
PHP_METHOD(SolrQuery, setTermsUpperBound);
PHP_METHOD(SolrQuery, getTermsUpperBound);
PHP_METHOD(SolrQuery, setTermsIncludeLowerBound);
PHP_METHOD(SolrQuery, getTermsIncludeLowerBound);
PHP_METHOD(SolrQuery, setTermsIncludeUpperBound);
PHP_METHOD(SolrQuery, getTermsIncludeUpperBound);
PHP_METHOD(SolrQuery, setTermsMinCount);
PHP_METHOD(SolrQuery, getTermsMinCount);
PHP_METHOD(SolrQuery, setTermsMaxCount);
PHP_METHOD(SolrQuery, getTermsMaxCount);
PHP_METHOD(SolrQuery, setTermsPrefix);
PHP_METHOD(SolrQuery, getTermsPrefix);
PHP_METHOD(SolrQuery, setTermsLimit);
PHP_METHOD(SolrQuery, getTermsLimit);
PHP_METHOD(SolrQuery, setTermsReturnRaw);
PHP_METHOD(SolrQuery, getTermsReturnRaw);
PHP_METHOD(SolrQuery, setTermsSort);
PHP_METHOD(SolrQuery, getTermsSort);
/* TODO : TermVectorComponent */
/* {{{ TermVectorComponent methods not yet defined */
PHP_METHOD(SolrQuery, setTermVector);
PHP_METHOD(SolrQuery, setTermVectorTermFrequency);
PHP_METHOD(SolrQuery, setTermVectorDocFrequency);
PHP_METHOD(SolrQuery, setTermVectorPositions);
PHP_METHOD(SolrQuery, setTermVectorOffsets);
PHP_METHOD(SolrQuery, setTermVectorTfIdfProduct);
PHP_METHOD(SolrQuery, setTermVectorAll);
PHP_METHOD(SolrQuery, addTermVectorField);
PHP_METHOD(SolrQuery, addTermVectorLuceneDocId);
/* }}} */
/* }}} */
/* {{{ SolrResponse methods declarations */
PHP_METHOD(SolrResponse, getHttpStatus);
PHP_METHOD(SolrResponse, getHttpStatusMessage);
PHP_METHOD(SolrResponse, success);
PHP_METHOD(SolrResponse, getRequestUrl);
PHP_METHOD(SolrResponse, getRawRequestHeaders);
PHP_METHOD(SolrResponse, getRawRequest);
PHP_METHOD(SolrResponse, getRawResponseHeaders);
PHP_METHOD(SolrResponse, getRawResponse);
PHP_METHOD(SolrResponse, getDigestedResponse);
PHP_METHOD(SolrResponse, setParseMode);
PHP_METHOD(SolrResponse, getResponse);
/* }}} */
/* {{{ SolrQueryResponse methods */
PHP_METHOD(SolrQueryResponse, __construct);
PHP_METHOD(SolrQueryResponse, __destruct);
/* }}} */
/* {{{ SolrUpdateResponse methods */
PHP_METHOD(SolrUpdateResponse, __construct);
PHP_METHOD(SolrUpdateResponse, __destruct);
/* }}} */
/* {{{ SolrPingResponse methods declarations */
PHP_METHOD(SolrPingResponse, __construct);
PHP_METHOD(SolrPingResponse, __destruct);
PHP_METHOD(SolrPingResponse, getResponse);
/* }}} */
/* {{{ SolrGenericResponse methods */
PHP_METHOD(SolrGenericResponse, __construct);
PHP_METHOD(SolrGenericResponse, __destruct);
/* }}} */
/* {{{ SolrUtils methods declarations */
PHP_METHOD(SolrUtils, escapeQueryChars);
PHP_METHOD(SolrUtils, queryPhrase);
PHP_METHOD(SolrUtils, digestXmlResponse);
PHP_METHOD(SolrUtils, getSolrVersion);
/* }}} */
/******************************************************************************/
/** DECLARATIONS FOR HELPERS AND EXTENSION-SPECIFIC FUNCTIONS **/
/******************************************************************************/
/* {{{ HTTP request function declarations */
size_t solr_curl_write(solr_char_t *data, size_t size, size_t nmemb, void *ctx);
size_t solr_curl_write_header(solr_char_t *data, size_t size, size_t nmemb, void *ctx);
int solr_curl_debug_callback(CURL *curl_handle, curl_infotype infotype, solr_char_t *debug_data, size_t size, void *ctx);
PHP_SOLR_API int solr_init_options(solr_client_options_t *options TSRMLS_DC);
PHP_SOLR_API int solr_init_handle(solr_curl_t *sch, solr_client_options_t *options TSRMLS_DC);
PHP_SOLR_API int solr_make_request(solr_client_t *client, solr_request_type_t request_type TSRMLS_DC);
PHP_SOLR_API void solr_free_handle(solr_curl_t *sch);
PHP_SOLR_API void solr_free_option(solr_client_options_t *options);
/* }}} */
PHP_SOLR_API void solr_extension_register_constants(int type, int module_number TSRMLS_DC);
PHP_SOLR_API void solr_document_register_class_constants(zend_class_entry *ce TSRMLS_DC);
PHP_SOLR_API void solr_client_register_class_constants(zend_class_entry *ce TSRMLS_DC);
PHP_SOLR_API void solr_query_register_class_constants(zend_class_entry *ce TSRMLS_DC);
PHP_SOLR_API void solr_response_register_class_properties(zend_class_entry *ce TSRMLS_DC);
PHP_SOLR_API void solr_response_register_class_constants(zend_class_entry *ce TSRMLS_DC);
PHP_SOLR_API void solr_exception_register_class_properties(zend_class_entry *ce TSRMLS_DC);
PHP_SOLR_API void solr_set_response_object_properties(zend_class_entry *scope, zval *response_object, const solr_client_t *client, const solr_string_t *request_url, zend_bool success TSRMLS_DC);
PHP_SOLR_API void solr_throw_exception_ex(zend_class_entry *exception_ce, long code TSRMLS_DC, const char *filename, int file_line, const char *function_name, char *format, ...);
PHP_SOLR_API void solr_throw_exception(zend_class_entry *exception_ce, char *message, long code TSRMLS_DC, const char *filename, int file_line, const char *function_name);
/* {{{ zval reference count post increment and decrement functions ++ and -- */
PHP_SOLR_API void solr_zval_add_ref(zval **p);
PHP_SOLR_API void solr_zval_minus_ref(zval **p);
/* }}} */
/* {{{ zend_hash_free functions */
PHP_SOLR_API void solr_destroy_field_list(solr_field_list_t **field_entry_ptr);
PHP_SOLR_API void solr_destroy_document(void *document);
PHP_SOLR_API void solr_destroy_client(void *document);
PHP_SOLR_API void solr_destroy_params(void *solr_params);
PHP_SOLR_API void solr_destroy_param(solr_param_t **param);
PHP_SOLR_API void solr_destroy_param_value(solr_param_t *param, solr_param_value_t *param_value);
/* }}} */
/* {{{ used for SolrDocument field manipulations */
PHP_SOLR_API int solr_document_insert_field_value(solr_field_list_t *queue, const solr_char_t *field_value, double field_boost);
PHP_SOLR_API void field_copy_constructor(solr_field_list_t **original_field_queue);
/* }}} */
/* {{{ Used for comparison of document fields */
PHP_SOLR_API int solr_compare_field_name (const void *a, const void *b TSRMLS_DC);
PHP_SOLR_API int solr_rcompare_field_name(const void *a, const void *b TSRMLS_DC);
PHP_SOLR_API int solr_compare_field_value_count (const void *a, const void *b TSRMLS_DC);
PHP_SOLR_API int solr_rcompare_field_value_count(const void *a, const void *b TSRMLS_DC);
PHP_SOLR_API int solr_compare_field_boost_value (const void *a, const void *b TSRMLS_DC);
PHP_SOLR_API int solr_rcompare_field_boost_value(const void *a, const void *b TSRMLS_DC);
/* }}} */
/* {{{ Functions for SolrParams Parameters */
PHP_SOLR_API solr_param_t *solr_create_new_param(const solr_char_t *param_name, size_t param_name_len, solr_param_type_t param_type, solr_bool allow_multiple, solr_param_value_equal_func_t value_equal_func, solr_param_fetch_func_t param_fetch_func, solr_param_value_free_func_t value_free_func, solr_char_t delimiter, solr_char_t arg_separator TSRMLS_DC);
PHP_SOLR_API int solr_params_insert_param_value(solr_param_t *param, solr_param_value_t *param_value);
PHP_SOLR_API int solr_params_delete_param_value(solr_param_t *param, const solr_param_value_t *target_value TSRMLS_DC);
PHP_SOLR_API int solr_delete_solr_parameter(zval *objptr, solr_char_t *name, int name_length TSRMLS_DC);
PHP_SOLR_API int solr_add_or_set_normal_param(zval *objptr, solr_char_t *pname, int pname_length, solr_char_t *pvalue, int pvalue_length, solr_bool allow_multiple TSRMLS_DC);
PHP_SOLR_API int solr_add_simple_list_param(zval *objptr, solr_char_t *pname, int pname_length, solr_char_t *pvalue, int pvalue_length TSRMLS_DC);
PHP_SOLR_API int solr_add_arg_list_param(zval *objptr, solr_char_t *pname, int pname_length, solr_char_t *pvalue, int pvalue_length, solr_char_t *avalue, int avalue_length, solr_char_t delimiter, solr_char_t arg_separator TSRMLS_DC);
#define solr_set_normal_param(objptr, pname, pname_length, pvalue, pvalue_length) solr_add_or_set_normal_param((objptr), (pname), (pname_length), (pvalue), (pvalue_length), 0 TSRMLS_CC)
#define solr_add_normal_param(objptr, pname, pname_length, pvalue, pvalue_length) solr_add_or_set_normal_param((objptr), (pname), (pname_length), (pvalue), (pvalue_length), 1 TSRMLS_CC)
PHP_SOLR_API int solr_normal_param_value_equal(const solr_param_value_t *a, const solr_param_value_t *b);
PHP_SOLR_API int solr_simple_list_param_value_equal(const solr_param_value_t *a, const solr_param_value_t *b);
PHP_SOLR_API int solr_arg_list_param_value_equal(const solr_param_value_t *a, const solr_param_value_t *b);
PHP_SOLR_API void solr_normal_param_value_fetch(solr_param_t *solr_param, solr_string_t *buffer);
PHP_SOLR_API void solr_simple_list_param_value_fetch(solr_param_t *solr_param, solr_string_t *buffer);
PHP_SOLR_API void solr_arg_list_param_value_fetch(solr_param_t *solr_param, solr_string_t *buffer);
PHP_SOLR_API void solr_normal_param_value_display(solr_param_t *solr_param, zval *param_value_array);
PHP_SOLR_API void solr_simple_list_param_value_display(solr_param_t *solr_param, zval *param_value_array);
PHP_SOLR_API void solr_arg_list_param_value_display(solr_param_t *solr_param, zval *param_value_array);
/* Used to display values where allow_multiple is false */
PHP_SOLR_API void solr_normal_param_value_display_string(solr_param_t *solr_param, zval *param_value);
PHP_SOLR_API void solr_normal_param_value_display_integer(solr_param_t *solr_param, zval *param_value);
PHP_SOLR_API void solr_normal_param_value_display_double(solr_param_t *solr_param, zval *param_value);
PHP_SOLR_API void solr_normal_param_value_display_boolean(solr_param_t *solr_param, zval *param_value);
PHP_SOLR_API void solr_normal_param_value_display_sort_type(solr_param_t *solr_param, zval *param_value);
PHP_SOLR_API int solr_param_find(zval *objptr, solr_char_t *pname, int pname_length, solr_param_t **solr_param TSRMLS_DC);
PHP_SOLR_API void solr_normal_param_value_tostring(solr_param_t *solr_param, solr_string_t *buffer, zend_bool url_encode);
PHP_SOLR_API void solr_simple_list_param_value_tostring(solr_param_t *solr_param, solr_string_t *buffer, zend_bool url_encode);
PHP_SOLR_API void solr_arg_list_param_value_tostring(solr_param_t *solr_param, solr_string_t *buffer, zend_bool url_encode);
PHP_SOLR_API void solr_normal_param_value_free(solr_param_value_t *param_value);
PHP_SOLR_API void solr_simple_list_param_value_free(solr_param_value_t *param_value);
PHP_SOLR_API void solr_arg_list_param_value_free(solr_param_value_t *param_value);
/* Used for removing parameter values from the list of values for that param */
PHP_SOLR_API int solr_delete_normal_param_value(zval *objptr, solr_char_t *pname, int pname_length, solr_char_t *pvalue, int pvalue_length TSRMLS_DC);
PHP_SOLR_API int solr_delete_simple_list_param_value(zval *objptr, solr_char_t *pname, int pname_length, solr_char_t *pvalue, int pvalue_length TSRMLS_DC);
PHP_SOLR_API int solr_delete_arg_list_param_value(zval *objptr, solr_char_t *pname, int pname_length, solr_char_t *pvalue, int pvalue_length TSRMLS_DC);
/* }}} */
/* {{{ Debugging functions */
/* Debug function used to print field values in the field queue */
PHP_SOLR_API void solr_debug_print_fields(const solr_field_list_t *queue);
/* Used when debugging is enabled to run in verbose mode */
PHP_SOLR_API void solr_debug_printf(const char *format, ...);
/* }}} */
/* {{{ Utility functions */
PHP_SOLR_API solr_char_t *solr_get_json_error_msg(solr_json_error_codes_t error_code);
PHP_SOLR_API int solr_json_to_php_native(solr_string_t *buffer, const solr_char_t *json_string, int json_string_length TSRMLS_DC);
PHP_SOLR_API int solr_is_supported_response_writer(const solr_char_t * response_writer, int length);
PHP_SOLR_API int solr_hashtable_get_new_index(HashTable *ht TSRMLS_DC);
PHP_SOLR_API int solr_fetch_document_entry(zval *objptr, solr_document_t **doc_entry TSRMLS_DC);
PHP_SOLR_API int solr_fetch_client_entry(zval *objptr, solr_client_t **solr_client TSRMLS_DC);
PHP_SOLR_API int solr_fetch_params_entry(zval *objptr, solr_params_t **solr_params TSRMLS_DC);
PHP_SOLR_API xmlDocPtr solr_xml_create_xml_doc(const xmlChar *root_node_name, xmlNode **root_node_ptr);
PHP_SOLR_API void solr_create_document_field_object(solr_field_list_t *field_values, zval **field_obj TSRMLS_DC);
PHP_SOLR_API void solr_encode_generic_xml_response(solr_string_t *buffer, const solr_char_t *serialized, int size, long int parse_mode TSRMLS_DC);
PHP_SOLR_API void solr_set_return_solr_params_object(zval **return_value_ptr, zval *current_objptr TSRMLS_DC);
PHP_SOLR_API void solr_escape_query_chars(solr_string_t *sbuilder, solr_char_t *unescaped, long int unescaped_length);
/* }}} */
/* {{{ Solr Object Handlers */
#if PHP_VERSION_ID < 50399
PHP_SOLR_API void solr_object_write_property(zval *object, zval *member, zval *value TSRMLS_DC);
PHP_SOLR_API zval *solr_object_read_property(zval *object, zval *member, int type TSRMLS_DC);
PHP_SOLR_API void solr_object_unset_property(zval *object, zval *member TSRMLS_DC);
#else
PHP_SOLR_API void solr_object_write_property(zval *object, zval *member, zval *value, const zend_literal *key TSRMLS_DC);
PHP_SOLR_API zval *solr_object_read_property(zval *object, zval *member, int type, const zend_literal *key TSRMLS_DC);
PHP_SOLR_API void solr_object_unset_property(zval *object, zval *member, const zend_literal *key TSRMLS_DC);
#endif
PHP_SOLR_API void solr_object_write_dimension(zval *object, zval *offset, zval *value TSRMLS_DC);
PHP_SOLR_API void solr_object_unset_dimension(zval *object, zval *offset TSRMLS_DC);
#if PHP_VERSION_ID < 50399
PHP_SOLR_API void solr_document_field_write_property(zval *object, zval *member, zval *value TSRMLS_DC);
PHP_SOLR_API void solr_document_field_unset_property(zval *object, zval *member TSRMLS_DC);
#else
PHP_SOLR_API void solr_document_field_write_property(zval *object, zval *member, zval *value, const zend_literal *key TSRMLS_DC);
PHP_SOLR_API void solr_document_field_unset_property(zval *object, zval *member, const zend_literal *key TSRMLS_DC);
#endif
/* }}} */
#include "solr_macros.h"
#endif /* HAVE_SOLR */
#endif /* SOLRCLIENT_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: fdm=marker
* vim: noet sw=4 ts=4
*/