[Bug 17815] New: Problems with search for dateaccessioned
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17815 Bug ID: 17815 Summary: Problems with search for dateaccessioned Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Searching Assignee: gmcharlt@gmail.com Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org Tested this as described in bug 14861: Search from advanced search by accession date: 2011-09-01 - 2011-09-30 9461 results Searched with SQL: select distinct biblionumber from items where dateaccessioned between '2011-09-01' and '2011-09-30' 805 results The date range search doesn't seem to work right. The search for a single date appears to work correctly. It's also possible to truncate dates using *. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17815 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #1 from David Cook <dcook@prosentient.com.au> --- I don't have time to look at this one at the moment, but it sounds interesting... Can you give us any more data? I trust with the SQL that the dateaccessioned would be between '2011-09-01' and '2011-09-30', but what about those 9461 results? If you look at a sample of them, do they all have dateaccessioned within that range, or do they have different data? Can you share a link to your results? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17815 Barton Chittenden <barton@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |barton@bywatersolutions.com --- Comment #2 from Barton Chittenden <barton@bywatersolutions.com> --- Numeric searches in Koha are possible using the syntax NNN-MMM Where NNN and MMM are numeric, and there are no spaces between the numerals and the dashes... so 1970-1980 will work as a numeric search, but I'm not sure about searching for date ranges in other formats. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17815 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> ---
Can you give us any more data?
I trust with the SQL that the dateaccessioned would be between '2011-09-01' and '2011-09-30', but what about those 9461 results? If you look at a sample of them, do they all have dateaccessioned within that range, or do they have different data?
They have different data. I verified the results with SQL, the Zebra results were clearly wrong. I was not able to verify which items actually showed up in the search.
Can you share a link to your results?
It won't help. I filed a separate bug for the dateaccessioned search not working by entering the index name in keyword search and the search option is only available from the staff side of Koha. It would be interesting tho if someone can see similar (wrong) results on a different data set. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17815 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Barton Chittenden from comment #2)
Numeric searches in Koha are possible using the syntax
NNN-MMM
Where NNN and MMM are numeric, and there are no spaces between the numerals and the dashes... so
1970-1980
will work as a numeric search, but I'm not sure about searching for date ranges in other formats.
The help on the search option states to enter a date in the format of YYYY-MM-DD and there are examples with this syntax in the test plan on bug 14861. Would be good to get to the bottom of this somehow, but not sure where to start. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17815 --- Comment #5 from Barton Chittenden <barton@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #4)
(In reply to Barton Chittenden from comment #2)
Numeric searches in Koha are possible using the syntax
NNN-MMM
Where NNN and MMM are numeric, and there are no spaces between the numerals and the dashes... so
1970-1980
will work as a numeric search, but I'm not sure about searching for date ranges in other formats.
The help on the search option states to enter a date in the format of YYYY-MM-DD and there are examples with this syntax in the test plan on bug 14861. Would be good to get to the bottom of this somehow, but not sure where to start.
The available CCL attributes are documented at http://www.indexdata.com/yaz/doc/tools.html#ccl.qualifiers in "Table 7.2. Special attribute combos". We use "r=r" for numeric searches, creating the behavior above. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17815 --- Comment #6 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #4)
The help on the search option states to enter a date in the format of YYYY-MM-DD and there are examples with this syntax in the test plan on bug 14861. Would be good to get to the bottom of this somehow, but not sure where to start.
The search help is often quite incorrect. I've been meaning to update it for a while. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17815 --- Comment #7 from David Cook <dcook@prosentient.com.au> --- As for bug 14861, you'll notice the CCL qualifiers are "acqdate,st-date-normalized". That st-date-normalized gives it a structure attribute of "date". If we follow the spec for "date", we find: The day, month, year and time when a (normalized) transaction or event takes place. The date search term structure is as defined for Generalized Time in ASN.1 (ISO 8824) except that the only mandatory portion of the string is the four-digit representation of the year. http://www.loc.gov/z3950/agency/bib1.html Some Googling suggests ISO 8824 might use the following format: Format: YYYY[MM[DD[HHMM[SS[.S[S[S[S]]]]]]]][+/-ZZZZ]^ Of course, I don't know how ICU and CHR normalization rules factor in with the "2011-09-01 - 2011-09-30" search string... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17815 --- Comment #8 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #3)
Can you give us any more data?
I trust with the SQL that the dateaccessioned would be between '2011-09-01' and '2011-09-30', but what about those 9461 results? If you look at a sample of them, do they all have dateaccessioned within that range, or do they have different data?
They have different data. I verified the results with SQL, the Zebra results were clearly wrong. I was not able to verify which items actually showed up in the search.
Can you share a link to your results?
It won't help. I filed a separate bug for the dateaccessioned search not working by entering the index name in keyword search and the search option is only available from the staff side of Koha. It would be interesting tho if someone can see similar (wrong) results on a different data set.
It would be nice to see even a small selection of data to see if anything jumps out at me, but OK. I don't have time to work on this, but maybe Barton can make some headway? I'd try to reproduce the situation, and then maybe use zebra::snippet to see why I'm getting matches which don't make sense for our understanding of the query. Could be that the staff client search template isn't using st-date-normalized, or that the query is processed differently than we expect, or a bug in YAZ/Zebra.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17815 --- Comment #9 from David Cook <dcook@prosentient.com.au> --- Oh that might be useful to know. Katrin: What version of Zebra and YAZ are you using? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17815 trevor.diamond@mainlib.org changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Searching |Searching - Zebra CC| |trevor.diamond@mainlib.org -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org