Webboard: mnoGoSearch as search engine for a MySQL database

[email protected]
Newsgroups gmane.comp.web.mnogosearch.general
Message-ID <[email protected]>
Author: Alexander Barkov
Email: [email protected]
Message:
> I read the manual about 'Indexing SQL tables (htdb:/ virtual URL 

> scheme)' and 'Using mnoGoSearch as an external SQL full-text engine' 

> and want to try using it on a MySQL database.

> 

> 

> Lets say I have a MySQL database with a table like this:

> 

> ID  Productname  Description             Link                        

> Price  Ranking

> 1   mnoGoSearch  Fulltext search engine  http://www.mnogosearch.org  

> $0.00  5

> 2   Google       Web search              http://www.google.com       

> $0.00  2

> 

> 

> I search for 'search' and get 2 results like

> 

> mnogosearch (with the weblink) and the description as description

> 

> Is that possible and how do I pull the different fields in the result 

> template?



The easiest way is to declare "Section" command for every

SQL column you want to be displayed.



For example:



Section Productname 2 256

Section Description 3 256

Section Price       4 256

Section Ranking    5 256

HTDBDoc "SELECT Productname, Description, Price, Ranking FROM table_name WHERE ID='$1'"





After indexing, the section values will be available

in search template by the corresponding variables:



  $(Producetname)

  $(Description)

  $(Price)

  $(Ranking)





Reply: <http://www.mnogosearch.org/board/message.php?id=21211>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.