Re: Various htdb questions

[email protected]
Newsgroups gmane.comp.web.mnogosearch.general
Message-ID <8588487.3841461260976100761.JavaMail.root@spooler3-g27.priv.proxad.net>
Hello again,

let us say that I have the following commands in my indexer.conf file:

HTDBAddr mysql://.....
Section body 1 256
Section title 2 128
Section CachedCopy 100 128000
HTDBList "SELECT CONCAT('http://test.com/drupal6/node/', nid) from node_access WHERE nid IS NOT NULL"
Server urllist htdb:/
Realm site *

As a result, the HTDBList command will generate a list of URLs, such as 

- http://test.com/drupal6/node/1
- http://test.com/drupal6/node/2
- http://test.com/drupal6/node/3
...

If MnogoSearch does not retrieve anything via HTTP, how do the http://test.com/drupal6/node/x pages get indexed?

It can't be via the SELECT command as it only returns nid numbers.

Could it be via SQL done by the htdb:/ command? If so, how does MnogoSearch know which table columns (TITLE, etc.) to index?

Many thanks.

phiroc

PS I am asking this because I can't get Mnogo to index private pages althought their nids appear in the list generated by the SELECT.









----- Mail Original -----
De: "Alexander Barkov" <[email protected]>
À: [email protected]
Cc: "general" <[email protected]>
Envoyé: Mercredi 16 Décembre 2009 08:49:55 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne
Objet: Re: Various htdb questions

Hi,

[email protected] wrote:
> Hi,
> 
> - what is the difference between 'Server urllist htdb:/' and 'Server htdb:/'?
> 
> Let's say that you have an HTDBList that returns a list of ids. Would you use 'Server urllist htdb:/' or 'Server htdb:/' in this case?


It's enough to use 'Server htdb:/' in this case.

'Server urllist htdb:/' is only needed when HTDBList returns a list of
http:// URLs.


> 
> - in 
> 
> HTDBList "SELECT url FROM mytable"
> Server urllist htdb:/
> Realm page *
> 
> Why do you need 'Realm page *'?

Indexer checks all URLs it gets from HTDBList query
against Server and Realm commands. Every URL which is
put to the database must have a matching Server or Realm
command.

If you remove "Realm page *", it will ignore all URLs.

> 
> 
> - in the following HTDBList example, shouldn't $2 be $1, as SELECT only returns one item, id?
> 
> Furthermore, why was "messages" added to the htdb URL? The messages table is already specified in the HTDBList and HTDBDoc queries.
> 
> HTDBList "SELECT id FROM messages"
> HTDBDoc "SELECT title, body FROM messages WHERE id='$2'"
> Server htdb:/messages/

$2 is correct.

Imagine, HTDBList returned id "123" which results into URL
URL htdb:/messages/123, which is parsed as:

$1= messages
$2= 123


> 
> 
> - I am using MnogoSearch to index pages created in Drupal 6. 
> 
> I use an HTDBList to retrieve the list of published nodes. Unfortunately, only public nodes get indexed, not private ones.
> 
> My temporary explanation is that MnogoSearch can't index data which it can't access via HTTP.
> 
> Is that true?

When using HTDB, mnoGoSearch does not access anything via HTTP.
All data is fetched directly from the database.
Make sure that your HTDBList query returns all IDs, including
private IDs.

> 
> Many thanks.
> 
> pr
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
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.