{"id":8797,"date":"2010-04-15T09:30:24","date_gmt":"2010-04-15T09:30:24","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/spectacula-advanced-search\/"},"modified":"2010-04-15T09:32:15","modified_gmt":"2010-04-15T09:32:15","slug":"spectacula-advanced-search","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/spectacula-advanced-search\/","author":1260653,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.3","stable_tag":"1.0.3","tested":"2.9.2","requires":"2.7.0","requires_php":"","requires_plugins":"","header_name":"Spectacu.la Advanced Search","header_author":"Interconnect IT, James R Whitehead","header_description":"","assets_banners_color":"","last_updated":"2010-04-15 09:32:15","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/spectacu.la\/signup\/signup.php","header_plugin_uri":"http:\/\/spectacu.la","header_author_uri":"http:\/\/interconnectit.com","rating":0,"author_block_rating":0,"active_installs":10,"downloads":3055,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"1.0.3":"<p>If you have the Beta version of this then it would be best if you got this one.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.3"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[944],"plugin_category":[],"plugin_contributors":[80834,80835],"plugin_business_model":[],"class_list":["post-8797","plugin","type-plugin","status-publish","hentry","plugin_tags-search","plugin_contributors-interconnectit","plugin_contributors-spectacula","plugin_committers-interconnectit","plugin_committers-spectacula"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/spectacula-advanced-search.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plug-in provides you with more relevant search results than are currently\navailable to the normal Wordpress search and it should also do so with less of a\nperformance hit on the db than the normal Wordpress search. We use the MySQL\ncommands MATCH () AGAINST () as opposed to Wordpress\u2019 use of LIKE to do our\nqueries which are not as heavy on the db. The only issue we have with \u201cmatch\nagainst\u201d is that we need an index on the columns we intend to search on.<\/p>\n\n<!--section=installation-->\n<h4>The install<\/h4>\n\n<ol>\n<li>Upload <code>spec-adv-search<\/code> folder to  <code>\/wp-content\/plugins\/spec-adv-search\/<\/code>\nor  the content of the folder to <code>\/wp-content\/mu-plugins\/<\/code>.\nIf the directory doesn't exist then create it.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>You should now see an extra menu Advanced search show up under the\nsettings menu in the main admin sidebar.<\/li>\n<li>Go to the new page and hit the \"Create Index\" button. Once the index has\nbeen created you'll then be able to tick the enable box at the top of the\npage.<\/li>\n<\/ol>\n\n<h4>The config<\/h4>\n\n<ol>\n<li><p>For these search methods to work you'll need a FULLTEXT index on your\npost_content and post_title in the wp_posts table. This can be done by using\nthe \"create index\" button. There are some things to be aware of before you\nproceed.<\/p>\n\n<ol>\n<li>Firstly adding the index will likely double the size of your wp_posts\ntable, this in and of itself isn\u2019t a problem however if you\u2019re running up\nagainst the upper limits of your hosts allowed size then creating an index\nmay push you over that limit. If you do hit your size limit nothing bad\nshould happen but it would be best if you backed up your database first just\nin case. Always a good idea to run a backup before anything is done to\nchange the db.<\/li>\n<li><p>Second thing you should know is that the index creation is handled by a\nWordpress cron job. Some hosts have problems with wp_cron and if your host\nis one of those then you will see this \u201cThe index creation\/deletion is\nscheduled to start after {date and time}\u201d below the button for a long time\nafter the job was supposed to run. Don\u2019t worry if it\u2019s only a few mins as\nthat is quite normal. If you do have a problem with wp_cron on your server\nyou may find future dated posts don\u2019t become live when you hoped. We can, if\nyou have something like PHPMyAdmin, create the indexes manually by running\nthese commands against your Wordpress db:<\/p>\n\n<p>CREATE FULLTEXT INDEX spec_post_content_fulltext ON wp_posts (post_content);<\/p>\n\n<p>CREATE FULLTEXT INDEX spec_post_content_fulltext_title ON wp_posts (post_title);<\/p><\/li>\n<li><p>Thirdly creating the indexes could take quite some time depending upon\nyour server set up. Once the index creation kicks in, unless your server\ncreates the index so quickly that it completes the creation before the\ncommand to collect the status has run, you should see \u201cCreating index on\npost_-----. MySQL is returning the following message:\u201d Don\u2019t panic if you\nsee something like \u201crepair by sorting\u201d or \u201ccopy to tmp table\u201d as these are\nexpected messages but if you get \u201cRepair with keycache\u201d still don\u2019t panic\njust be prepared to wait a long while for the index to complete its\ncreation.<\/p><\/li>\n<\/ol><\/li>\n<li>Once the index is live you should be able to tick the enable button. Now we\nget to choose from up to 5 different modes of search:\n\n<ol>\n<li>Default mode: This will find posts containing any of the term, the more\nof the terms there are in a post the higher relevance score it receives\nand thus the higher in the results it will appear (presuming sorting by\nrank). If two or more terms are searched for but only one can be found\nthen posts matching that one will be returned. Terms matched in titles\ncount as one and a half as much as those in the content.<\/li>\n<li>Boolean mode: Very much the same as default mode but you get several\nextra operators that can alter a query. Adding + or \u2013 to the head of a\nterm will either make it so that you return posts that must have the\nterm or must not have the term. &gt; or &lt; will increase or decrease the\nimportance of a word. So for example (phone &gt;droid) would find all phone\npost and droid post but droid posts would be considered more important.\nA full explanation of the operators can be found here.<\/li>\n<li>With query expansion: This kind of search can find posts related to your\nsearch terms but don\u2019t necessarily contain any of the terms entered. So\nsearch for \u201candroid\u201d for example and it will use posts that contain the\nword android to find words that are related to it. So it may deem that\nyou want posts about robots too or it may also figure you want post\nrelating to Google\u2019s phone OS it really depends upon your sites content.\nFor this mode you\u2019ll need to tweak the relevance limit bases on what has\nbeen returned for your content otherwise it can end up returning all\nposts on your site. Not too big a problem if ordered by relevance but\nif ordered by date your results will make no sense at all.<\/li>\n<li>In natural language mode: If you have MySQL 5.1 or better you will have\ntwo more modes available to you. First is In natural language mode which\nis mostly the same as default mode and in natural language more with\nquery expansion which is functionally the same as the with query\nexpansion.<\/li>\n<\/ol><\/li>\n<li>If your server works with wp_cron then you can set up a periodic table\noptimise that will help keep your table index in order. If your site changes\nrarely then you can set it to run infrequently or not at all and just use\nthe \u201coptimise table\u201d button to do it as and when you want\/need to. The more\naccurate your index is the better your search results will be and the lower\nthe load on the db. All good basically. The optimise will kick in after the\ntime it is set to run but wp-cron requires a visitor to kick off the job. So\nif you set it to start at 3:00am and you don\u2019t get an activity on your site\nuntil 10am the next day the job won\u2019t start until 10am. This shouldn\u2019t be a\nproblem as most optimisations apply very little load and take only a few\nsecond to run.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>With query expansion mode returns some odd results?<\/dt>\n<dd><p>This mode guesses what the searcher was after from words MySQL thinks are\n    related to the terms searched for. If your content implies an association\n    between two otherwise unrelated terms then MySQL will make an assumption\n    that they are related. For example if you mention Ducks and Strawberries\n    together in a few post your index will see a relationship and searches for\n    Ducks may return results for Strawberries.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Moved out of beta and corrected a few typos.<\/li>\n<\/ul>\n\n<h4>1.0.2.beta<\/h4>\n\n<ul>\n<li>Fixed it so that the ranking score shouldn't now show in anything that calls\nthe_excerpt\/content once the loop is complete. If you call before the loop\nthen it likely still will.<\/li>\n<\/ul>\n\n<h4>1.0.1.beta<\/h4>\n\n<ul>\n<li>Added help text and a few other fixes and tweaks.<\/li>\n<\/ul>\n\n<h4>1.0.beta<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Changes the Wordpress search queries to provide more relevant results more efficiently and with options to influence the results.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/8797","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=8797"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/spectacula"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=8797"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=8797"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=8797"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=8797"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=8797"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=8797"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}