Implementation of hook_sphinxsearch_api()

markus_petrux - October 30, 2008 - 19:02
Project:Sphinx search
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:active
Description

This task is part of #306959: Porting sphinxsearch module to D6 (and Battle Plan).

Post #1 will be holding the draft on how hook_sphinxsearch_api() will work. Next posts may contain updates on progress, ideas, etc. Feel free to chime in if you wish.

#1

markus_petrux - October 31, 2008 - 13:29

--- DRAFT ---

hook_sphinxsearch_api() is that little thing that should help us deal with almost any kind of content, and of course, allow external modules extend the default sphinxseacrh module behaviour. We need this to:

- Describe the schema for XMLPipe documents. Status: DONE.
- Generate the data for fields and attributes used to generate XMLPipe documents. Status: DONE.
- Generate the form element for the advanced search page. Status: TODO.
- Parse GET/POST request to convert values into search options. Status: TODO.
- Convert search options into GET arguments. Status: TODO.
- Convert search options into something that can be used to build Sphinx search queries. Status: TODO.
- Define if and how Sphinx document attributes appear in faceted blocks (guided search). Status: TODO.

To be continued...

PS: I'm coding these features in parallell, and then commit to CVS when I feel something is stable enough.

#2

markus_petrux - October 31, 2008 - 13:37

I have commited today the first attempt to implement hook_sphinxsearch_api(). For the moment, it basically works like nodeapi, but applied to what we need here.

Hook operation 'sphinx_schema' and 'sphinx_document' are implemented already. And the XMLPipe generator is using these to build indexes. So that means, we could implement modules that expose node language, workflow attributes, CCK fields, etc. and it all would be indexed automagically. :)

That was the easy part of it. :( lol

I have updated the draft above to include a description about the rest of the things the API should do for us.

 
 

Drupal is a registered trademark of Dries Buytaert.