Skip to content

Partial Content Index Builder adds documents instead of updating #641

Description

@nunoaguiar

Is your feature request related to a problem? Please describe.
We set up a partial Content Index Builder, and updated 1 document. Forcing the partial to run, adds a new document to the index, rather than updating the existing record. In the screencast below notice that

  • The repo has 90 documents
  • In Bruno it shows 8 (that's expected because I'm filtering by 1 certain Item Type)
  • About 10min before the recording I had updated 1 page
  • Then you can see me clicking to rebuild the index (partial) and in Bruno the counter starts to go up (once for every time I clicked to rebuild)

https://app.screencast.com/rENtLqABAWSU2
This happens with both Update and UpdateWithIds

The goal is to have a scheduled task that checks every 5min or 10min to run partial updates, and we might still have a daily update during the night (not sure if there's great value for this, but it's not a critical thing)

Describe the solution you'd like
With "Update" or "UpdateWithIds", the existing documents get updated.

I also noticed that these Build modes are not documented https://doc.dynamicweb.dev/documentation/implementing/repositories/indexes/contentindexes.html which makes me wonder if they just shouldn't be there to begin with OR if the documentation is outdated.
I do see some code in the ContentIndexBuilder that suggests it's supposed to be there

Describe alternatives you've considered
Instead of doing partial updates during the day, we'd have to do full updates frequently.

Additional context
A less than ideal scenario is that I can't simply index a particular Item Type, so I'm having to index all DW pages and then filter in the Query the ones I want. This means that once we have more pages, this may become a bigger problem.
If we could also have a builder setting to index specific item types (much like we have for apps), it would help to optimize what to index.

Best Regards,
Nuno Aguiar

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions