syahra712 opened a new pull request, #23:
URL: https://github.com/apache/solr-orbit-workloads/pull/23

   Fixes #12.
   
   ### Description
   
   `nyc_taxis/workload.py` drew every randomized date range from 2015-01-01 to 
2015-01-15. The corpus covers all of 2015, so with `--randomization-enabled` 
the two yearly histograms only ever queried the first two weeks of the year.
   
   The issue suggests widening the range to the whole year. That works for two 
of the three operations but not the third. The randomizer only rewrites the 
range in the `query` string 
(`QueryRandomizerWorkloadProcessor.set_solr_range_terms` in solr-orbit). It 
leaves the facet's `start`/`end` alone, so each date source has to stay inside 
the facet window of the operation it feeds:
   
   | value source | operation(s) | facet window | before | after |
   |---|---|---|---|---|
   | `date_source_with_hours` | `date_histogram_calendar_interval`, 
`date_histogram_fixed_interval` | 2015-01-01 to 2016-01-01 | Jan 1–15 | all of 
2015 |
   | `date_source_without_hours` | `date_histogram_facet` | 2015-01-01 to 
2015-01-22 | days 1–14 | days 1–21 |
   
   Widening `date_source_without_hours` to the whole year would have sent most 
`date_histogram_facet` queries outside its 21-day facet, so the buckets would 
no longer add up to `numFound`.
   
   ### Testing
   
   I drew 100,000 values from each source before and after the change, with 
`TZ` set to UTC, America/New_York and Asia/Karachi (the function uses 
local-time timestamps):
   
   - `date_source_with_hours`: lower bounds now fall in all 12 months (before: 
January only). The highest upper bound is `2015-12-31T23:59:35Z`. No draw falls 
outside `[2015-01-01, 2016-01-01)`.
   - `date_source_without_hours`: upper bounds now cover all 21 days, 
`2015-01-02` to `2015-01-22` (before: up to `2015-01-15`). No draw falls 
outside the facet window and no range is empty.
   
   This doesn't touch `operations/default.json`, so it doesn't overlap with #21.
   
   AI-assisted (Claude)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to