Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong crosswords processing by indexer #10

Closed
sburn opened this issue May 29, 2016 · 1 comment
Closed

wrong crosswords processing by indexer #10

sburn opened this issue May 29, 2016 · 1 comment

Comments

@sburn
Copy link
Contributor

sburn commented May 29, 2016

Indexer is putting alt, title attributes content of IMG, A and LINK tags to crosswords section of the same document, instead of putting them as crosswords of documents linked by that tags.

Commented out code in parsehtml.c:

 else if (href && CrosSec && alt != NULL && TAG_WITH_CROSSATTRIBUTE ) {
    Item.href = href;
    Item.section = CrosSec->section;
    Item.section_name = CrosSec->name;
    Item.strict = CrosSec->strict;
    Item.str = alt;
    Item.len = dps_strlen(alt);
    putItem(Indexer, Doc, &Item);
}
 else if (href && CrosSec && title != NULL && TAG_WITH_CROSSATTRIBUTE ) {
    Item.href = href;
    Item.section = CrosSec->section;
    Item.section_name = CrosSec->name;
    Item.strict = CrosSec->strict;
    Item.str = title;
    Item.len = dps_strlen(title);
    putItem(Indexer, Doc, &Item);
}
@Maxime2
Copy link
Owner

Maxime2 commented Jun 7, 2016

That is intended behaviour. Crossword section belongs to both documents, however crosswords section value stored with a document consists only of word found under links or alt and tittle attributes with links on that document, not of all those on pages which link to that document.

Though the index population was correct, the value of crossword section was not. It is now fixed and changes were pushed into repository.

Thank you!

@Maxime2 Maxime2 closed this as completed Jun 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants