|
From: Neal R. <ne...@ri...> - 2002-02-08 06:12:37
|
Hey, I've got a question on htsearch code (latest 3.2b4 snapshot): htsearch/htsearch.cc line 145-371 is the 'iterate over collections' loop. lines 161-283 (inside the loop) are setting htconfig variables based on CGI-form parameters. lines 285 & 370 (inside the loop) create and delete a Parser object. Then proceeding to approx line 322 the search is performed on the current database in the collection. Looks like a lot of redundant processing.. What is the future of this code? I've read ill-understood (by me) references to new searching/parsing code in previous posts. FYI: I'm trying to understand this to write an api for the searching code by reorganizing it: int htsearch_open(htsearch_parameters_struct *); int htsearch_query(htsearch_query_struct *); int htsearch_get_next_result(htsearch_query_result_struct *); int htsearch_close(); char * htsearch_get_error(); htsearch_get_next_result(..) is called in a loop to retrieve each hit. Some of the objects become global or at least global-static to the file. There will be PHP wrappers for these functions to call them in PHP pages. I'm wondering if it wouldn't be easier to start with qtest.cc and implement the 'hit' extraction if this code is going to get rewritten massively. Thanks again! -- Neal Richter Knowledgebase Developer RightNow Technologies, Inc. Customer Service for Every Web Site |