You are here

README.txt in Search API Database Search 7

Database search
---------------

This module provides a database based implementation of the Search API. The
database and target to use for storing and accessing the indexes can be selected
when creating a new server.

All Search API datatypes are supported by using appropriate SQL datatypes for
their respective columns (with "String"/"URI", and "Integer"/"Duration" being
equivalent).

The "direct" parse mode for queries will result in a simple splitting of the
query string into keys. Additionally, search keys containing whitespace will be
split, as searching for phrases is currently not supported.

Supported optional features
---------------------------

- search_api_autocomplete
  Introduced by module: search_api_autocomplete
  Lets you add autocompletion capabilities to search forms on the site. (See
  also "Hidden variables" below for backend-specific customization.)
  NOTE: Due to internal database restrictions, this will perform significantly
  better if only a single field is used for autocompletion.
- search_api_facets
  Introduced by module: search_api_facetapi
  Allows you to create facetted searches for dynamically filtering search
  results.

If you feel some service option is missing, or have other ideas for improving
this implementation, please file a feature request in the project's issue queue,
at [http://drupal.org/project/issues/search_api], using the "Database search"
component.

Known problems
--------------

Currently, Drupal doesn't support setting the table collation when creating
tables. This might cause problems when you want to index data which can contain
accented characters, umlauts and other non-ASCII characters (à, á, ä, …).
To resolve the issue, please set "utf8_bin" as the collation for all tables
starting with "search_api_db_". This has already been automated for MySQL
databases in newer releases but must be done manually for other databases.
See [1] for details.

[1] http://drupal.org/node/1144620

Also, using facets with a database server will only work if the database user
Drupal is using has the "CREATE TEMPORARY TABLES" permission (or similar, in
DBMSs other than MySQL).

Developer information
---------------------

Database queries for searches with this module are tagged with
"search_api_db_search" to allow easy altering. As metadata, such database
queries will have the Search API query object set as "search_api_query", and the
field settings of the server for the corresponding search index as
"search_api_db_fields".

Hidden variables
----------------

- search_api_db_autocomplete_max_occurrences (default: 0.9)
  By default, keywords that occur in more than 90% of results are ignored for
  autocomplete suggestions. This setting lets you modify that behaviour by
  providing your own ratio. Use 1 or greater to use all suggestions.

File

README.txt
View source
  1. Database search
  2. ---------------
  3. This module provides a database based implementation of the Search API. The
  4. database and target to use for storing and accessing the indexes can be selected
  5. when creating a new server.
  6. All Search API datatypes are supported by using appropriate SQL datatypes for
  7. their respective columns (with "String"/"URI", and "Integer"/"Duration" being
  8. equivalent).
  9. The "direct" parse mode for queries will result in a simple splitting of the
  10. query string into keys. Additionally, search keys containing whitespace will be
  11. split, as searching for phrases is currently not supported.
  12. Supported optional features
  13. ---------------------------
  14. - search_api_autocomplete
  15. Introduced by module: search_api_autocomplete
  16. Lets you add autocompletion capabilities to search forms on the site. (See
  17. also "Hidden variables" below for backend-specific customization.)
  18. NOTE: Due to internal database restrictions, this will perform significantly
  19. better if only a single field is used for autocompletion.
  20. - search_api_facets
  21. Introduced by module: search_api_facetapi
  22. Allows you to create facetted searches for dynamically filtering search
  23. results.
  24. If you feel some service option is missing, or have other ideas for improving
  25. this implementation, please file a feature request in the project's issue queue,
  26. at [http://drupal.org/project/issues/search_api], using the "Database search"
  27. component.
  28. Known problems
  29. --------------
  30. Currently, Drupal doesn't support setting the table collation when creating
  31. tables. This might cause problems when you want to index data which can contain
  32. accented characters, umlauts and other non-ASCII characters (à, á, ä, …).
  33. To resolve the issue, please set "utf8_bin" as the collation for all tables
  34. starting with "search_api_db_". This has already been automated for MySQL
  35. databases in newer releases but must be done manually for other databases.
  36. See [1] for details.
  37. [1] http://drupal.org/node/1144620
  38. Also, using facets with a database server will only work if the database user
  39. Drupal is using has the "CREATE TEMPORARY TABLES" permission (or similar, in
  40. DBMSs other than MySQL).
  41. Developer information
  42. ---------------------
  43. Database queries for searches with this module are tagged with
  44. "search_api_db_search" to allow easy altering. As metadata, such database
  45. queries will have the Search API query object set as "search_api_query", and the
  46. field settings of the server for the corresponding search index as
  47. "search_api_db_fields".
  48. Hidden variables
  49. ----------------
  50. - search_api_db_autocomplete_max_occurrences (default: 0.9)
  51. By default, keywords that occur in more than 90% of results are ignored for
  52. autocomplete suggestions. This setting lets you modify that behaviour by
  53. providing your own ratio. Use 1 or greater to use all suggestions.