The search_node_links table schedule definition has descriptions for all of its fields but not for the table itself.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

douggreen’s picture

Status: Active » Needs review
FileSize
631 bytes

How's this?

bjaspan’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
675 bytes

Perfect, thanks. I re-rolled the patch to be from the Drupal root directory, not the modules/search directory; otherwise it is unchanged.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed.

mooffie’s picture

Title: No schema description for search_node_links table » The schema description for search_node_links table
Priority: Normal » Minor
Status: Fixed » Active

There's another, minor issue in the doc for this table: the doc for the "type" column says "The {search_dataset}.sid of the searchable item to which the word belongs." But shouldn't this be "The {search_dataset}.type of the ..."?

Another thing: if this table holds nodes, then why is a "type" column necessary? Doesn't it always contain "node"?

douggreen’s picture

The search module is quite extensible, and this table can hold types other than nodes. This is why there is a 'type' fields, and this is why the id is a 'sid' instead of a 'nid'. However, nothing in Drupal core (and no contrib modules that I know of) implement anything other than nodes.

douggreen’s picture

Hmm, where do you see that the 'type' column says 'The {search_dataset}.sid...'. Looking at the search.install source (lines 78-83), it looks right to me:

      'type' => array(
        'type' => 'varchar',
        'length' => 16,
        'not null' => FALSE,
        'description' => t('The {search_dataset}.type of the searchable item to which the word belongs.'),
      ),
Gábor Hojtsy’s picture

Title: The schema description for search_node_links table » No schema description for search_node_links table
Priority: Minor » Normal
Status: Active » Fixed

Reopen please if it does not look right for you.

mooffie’s picture

Priority: Normal » Minor
Status: Fixed » Needs review
FileSize
1.55 KB

Hmm, where do you see that the 'type' column says 'The {search_dataset}.sid...'

It's further down. I'm attaching a patch with enough context lines to see it.

The search module is quite extensible, and this table can hold types other than nodes. [...]

The description just given to this table was "stores /nodes/ that link to other nodes." It wasn't "stores /items/ that links to other nodes." So I was asking what the point in the "type" column if this table stored only nodes....

I'm attaching a fix to these two issues (plus a bonus one!):

1. Changed one `{search_dataset}.sid' to `{search_dataset}.type'

2. (that's the bonus!) Changed "to which the word belongs" to "that links to the node". This string was copied from another table but somebody forgot to update it.

3. Changed "Stores nodes that link [,,,]" to "Stores items that link [...]." The term 'item' is a the common term used in this file. (Well. I'd actually prefer "Records items" instead of "Stores items.")

Gábor Hojtsy’s picture

Looked at the changes: the 'search_node_links' description we only added after string freeze above, so it is not out for translators yet. The others are also misleading here, so they need fixing. Oh well.

douggreen’s picture

FileSize
1.19 KB

@mooffie, the rephrasing in point 2 makes it more confusing to me. There might be something confusing with the current language, but I don't think you've found the language that clarifies it.

I've rerolled with just 1 and 3. And I've added "(e.g., nodes)" to the table description.

mooffie’s picture

There might be something confusing with the current language

The current language isn't confusing. It's just wrong :-)

"to which the word belongs"

What "word"?

A "word" indeed exists in some other table of this module ...but not in the "search_node_links" table.

(I think it's unnecessary to add "(e.q., nodes)." All other descriptions mentioning "items" don't do it. I believe it's clear enough. Also, you wrote "e.q." instead of "e.g.")

douggreen’s picture

Status: Needs review » Needs work

I'm going to give up on wordsmithing this, and let others (@moofie) do it. I'll just try to point out where the language is incorrect.

Sorry, I tried to write "e.g." - a bad habit. We do use "e.g., node" in the search_dataset.sid description. So I guess, having it there is good enough.

I do think "that links to the node" is also wrong. The sid/type pair refers to the source search item, and the nid refers to the node that it links to. So the sid/type pair should say something like "... of the search item containing the link to the node."

mooffie’s picture

Status: Needs work » Needs review
FileSize
1.46 KB

I'm going to give up on wordsmithing this, and [...]

Oops. I can be nitpicky sometimes. Please bear with me.

We do use "e.g., node" in the search_dataset.sid description.

Hey, you're right! I didn't see this. I apologize for accusing you of commiting a crime ;-)
I still don't like this "e.g.," but I accept your judgment.

I'm attaching the patch.

I do think "that links to the node" is also wrong. The sid/type pair refers to the source search item, and the nid refers to the node that it links to. So [...]

So what's wrong with "that links to the node"? It answers your description.

So the sid/type pair should say something like "... of the search item containing the link to the node."

I don't get it. Why is "containing the link" more correct than "that links to"?
The description of the table says "Stores items (e.g., nodes) that link to other nodes," and I simply took this "that links to" from there.

douggreen’s picture

I'm not giving up. This is a minor issue for me, and my time is best used writing code, not documentation. So, I'm going to defer the wordsmithing to our technical writers.

I simply don't think that the English words "the {search_dataset}.type that links to the node" is as descriptive as the English words "the {search_dataset}.type of the search item containing the link to the node". In "the {search_dataset}.type that links to the node" the word "that" is the wrong word. I think that in this context, "that" is an adverb that connotes action upon the noun and predicate (?). But it's not the "type" that links to the node", it's the sid/type pair that links to the node. So, the word "that" just doesn't seem right to me.

We need to get the opinion of a couple other technical writers.

mooffie’s picture

FileSize
1.47 KB

In "the {search_dataset}.type that links to the node" the word "that" is the wrong word.
[...]
"that" is an adverb that connotes action upon the noun and predicate (?). it's not the "type" that links to the node",

You misquoted my sentence. The sentence was actually "The {search_dataset}.type of the searchable item that links to the node."

But I don't mind, I'm attaching a patch with your version.

douggreen’s picture

Status: Needs review » Reviewed & tested by the community

I never saw that your's had "of the searchable item." If you just read #8, and don't look at the patch close enough, this subtle difference is missed. I like the words "searchable item" better than "search item."

So, I can RTBC the patch in #8, credit to moofie.

Sorry for the stubbornness.

mooffie’s picture

FileSize
1.47 KB

I like the words "searchable item" better than "search item."

Agreed. Here it is.

mooffie’s picture

So, I can RTBC the patch in #8

Ahhm. You mean #17. (It contains your "e.g. node" + "containing the link". It's a good one.)

douggreen’s picture

I was willing to live without the "e.g.", but since you re-rolled it, sure #17.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.