Skip to content

duplicates in searchdata.xml "text" field #11683

@MatthiasIsele

Description

@MatthiasIsele

Describe the bug
Brief comments in a base class result in searchdata.xml containing the field "text" N times where N is the number of classes derived from the base class.
This doesn't seem like a big issue in this small example. However in my huge project with a large class hierarchy this results in getting huge fields which is also visible in the search results on the website using the external search engine.

To Reproduce
There are three c++ classes defined:
ClassA, ClassB and ClassC where ClassB and ClassC are both derived from ClassA.
ClassA has a method myMethod with a brief comment containing the text "This is a brief comment".
Generate using the following settings:

JAVADOC_AUTOBRIEF = YES
EXTERNAL_SEARCH = YES

the attached zip contains a minimal example to replicate.

As a result I get an entry in searchdata:

<doc>
  <field name="type">function</field>
  <field name="name">ClassA::myMethod</field>
  <field name="args">(int arg)</field>
  <field name="url">class_class_a.html#a464f8f980ac6ef91714a60d2bd906203</field>
  <field name="keywords">myMethod ClassA::myMethod ClassA</field>
  <field name="text">This is a brief comment This is a brief comment This is a brief comment</field>
</doc>

Expected behavior
As a result I should get an entry in searchdata like:

<doc>
  <field name="type">function</field>
  <field name="name">ClassA::myMethod</field>
  <field name="args">(int arg)</field>
  <field name="url">class_class_a.html#a464f8f980ac6ef91714a60d2bd906203</field>
  <field name="keywords">myMethod ClassA::myMethod ClassA</field>
  <field name="text">This is a brief comment</field>
</doc>

Version
Tested with current master but got the same behaviour with version 1.13.x and 1.14.x
Running on linux or windows results in the same behaviour.

searchdata.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions