Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2011
    Posts
    1
    Plugin Contributions
    0

    Default How to add indexes and drop them?

    I would like to make a contribution public, it uses fulltext indexes on products_description name and description fields to allow relevance ordered search results.

    The code is working fine (an observer), but I am not sure if my current method to add and drop the indexes is right.

    I create the indexes transparently the first time the observer is run (on the first search after installation). This takes a while on big catalogs, but allows for very easy installation (no need to manually run SQL which confuses a lot of users).

    And I still don't know how to drop the indexes if the user wants to uninstall the whole thing. My first thought was to give the SQL statements for copy/paste on the admin>tools>sql patches, but seems to fail, with no messages. Is it perhaps disallow to run DROP statements from there? Should I better provide a PHP script for all DB modification ? An admin page?

  2. #2
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    360
    Plugin Contributions
    1

    Default Re: How to add indexes and drop them

    Quote Originally Posted by AJweb View Post
    I would like to make a contribution public, it uses fulltext indexes on products_description name and description fields to allow relevance ordered search results.

    The code is working fine (an observer), but I am not sure if my current method to add and drop the indexes is right.

    I create the indexes transparently the first time the observer is run (on the first search after installation). This takes a while on big catalogs, but allows for very easy installation (no need to manually run SQL which confuses a lot of users).

    And I still don't know how to drop the indexes if the user wants to uninstall the whole thing. My first thought was to give the SQL statements for copy/paste on the admin>tools>sql patches, but seems to fail, with no messages. Is it perhaps disallow to run DROP statements from there? Should I better provide a PHP script for all DB modification ? An admin page?
    Drop statements still are able to be run through the SQL Patches screen, I've done this enough times to recognize it. Are you using the DROP INDEX statement by chance?

 

 

Similar Threads

  1. db tuning - some queries not using defined indexes?
    By donplay in forum General Questions
    Replies: 3
    Last Post: 4 Jun 2010, 05:07 PM
  2. 2 Seperate Indexes?
    By CnTGifts in forum General Questions
    Replies: 4
    Last Post: 22 Mar 2008, 07:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •