Make search index freshness dates reflect successful indexing

Open
#677 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
csharp
Domain
backend

Research direction

Read the requirements in this issue and the related discussions in #675 and #676 first. The issue names History, System > Indexes, NEST indexing stats, and Bonsai and Elastic Cloud, but does not identify source files or tests. Start by locating the date displays and indexing paths; done means agreed semantics are implemented with tests for success, failure, partial success, unknown state, backend selection, and timezone handling.

Written by the indexing model from the issue text.

Description

Problem

The modified/current-as-of dates in History and System > Indexes do not establish when the displayed search data was successfully indexed.

  • All three History pages display DateTime.UtcNow.ToPacificTime().AddMinutes(-5).ToLocalTime(). This advances with the request clock even if indexing has stopped or failed.
  • System > Indexes converts NEST IndexingStats.Time to DateTime. This property reads the index_time string, a cumulative indexing duration rather than a timestamp. The default stats request omits the human-readable field, so the string is null and Convert.ToDateTime(null) returns DateTime.MinValue. When a duration string such as 1s is present, the conversion throws FormatException.

PR #676 intentionally restores the existing date displays, formatting, tooltips, and data behavior at the user's request. The dual-backend work in #675 should not remove this useful UI while its accuracy requirements are unresolved. This issue tracks the accuracy work separately.

Requirements to define

  • Decide what each displayed date means, including the difference between a successful indexing operation and a guarantee that all relevant source changes are searchable.
  • Report dates for the configured read backend and relevant index. Bonsai and Elastic Cloud may have different successful work and failures during dual indexing.
  • Define how failed operations, partial success across batches/indexes/targets, and full-index replacement affect the displayed value. An attempted or partly successful job must not imply that every result is current.
  • Define the unknown or unavailable state and consistent timezone conversion, formatting, and tooltip wording.
  • Preserve a useful date display for users, with tests covering success, failure, partial success, unknown state, backend selection, and timezone handling.

Choose the source and storage of these dates after the requirements are agreed. This issue does not prescribe SQL tracking, durable recovery, retry queues, or cross-process coordination, and does not expand the scope of #675.

Related: #675 and #676.

Dominant language
C#
Stars
7
Forks
5
Avg merge
9h 3m
Merged PRs (30d)
5

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ucdavis/Purchasing

All issues in ucdavis/Purchasing

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.