When I perform full-text search with Wikipedia API, I can not narrow it to titles only (srwhat=title).
So while search anywhere (default) http://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=sql&srnamespace=14&format=xml
returns results, if I add srwhat=title, I got an error:
<api servedby="mw69">
<error code="srsearch-title-disabled" info="title search is disabled"/>
</api>
This error is even listed in the docs ( http://www.mediawiki.org/wiki/API:Search ), but without any explanation.
To implement a full-text search in a SQL database, you must create a full-text index on each column you want to be indexed. In MySQL, this would be done with the FULLTEXT keyword. Then you will be able to query the database using MATCH and AGAINST.
A: You can determine if Full-Text Search is installed by querying the FULLTEXTSERVICEPROPERTY like you can see in the following query. If the query returns 1 then Full-Text Search is enabled.
If a SQL query includes a full-text search query, the query is sent to the Full-Text Engine, both during compilation and during execution. The query result is matched against the full-text index. Full-Text Engine. The Full-Text Engine in SQL Server is fully integrated with the query processor.
Actually, there is a way to workaround this, just add intitle:
prefix to your search term:
srsearch=intitle:sql
You can find an explanation here: https://en.wikipedia.org/wiki/Help:Searching#Parameters
It means that the search engine Wikipedia uses (Lucene, I believe) does not support title search.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With