Summary: | date created and modified indexes in ccl.properties | ||
---|---|---|---|
Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
Component: | Architecture, internals, and plumbing | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | CLOSED WONTFIX | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | drnoe, gitbot, m.de.rooy, mathsabypro, veron |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 8252 | ||
Bug Blocks: | |||
Attachments: |
Bug 10740 - date created and modified indexes in ccl.properties
Bug 10740 - date created and modified indexes in ccl.properties Bug 10740 - date created and modified indexes in ccl.properties and QP |
Description
Fridolin Somers
2013-08-16 10:28:46 UTC
Created attachment 20393 [details] [review] Bug 10740 - date created and modified indexes in ccl.properties See commit message. Is it really a good idea to put a slash in the index name? What we usually do is replace all punctuation with hyphens. (In reply to Jared Camins-Esakov from comment #2) > Is it really a good idea to put a slash in the index name? What we usually > do is replace all punctuation with hyphens. The index is actually like this. But I agree to modify. I'd say : Datetime-last-modified What do you say ? (In reply to Fridolyn SOMERS from comment #3) > (In reply to Jared Camins-Esakov from comment #2) > > Is it really a good idea to put a slash in the index name? What we usually > > do is replace all punctuation with hyphens. > The index is actually like this. > But I agree to modify. I'd say : Datetime-last-modified > What do you say ? I think that's the best idea. Hello Fridolyn I wanted to reword this index in bug 8252 (needs signoff), but changed my mind after Paul's comment. Mathieu (In reply to mathieu saby from comment #5) > Hello Fridolyn > I wanted to reword this index in bug 8252 (needs signoff), but changed my > mind after Paul's comment. > > Mathieu Oh, yes. @Jared : What do you think about bug 8252 ? I'd say it is dangerous to use a "/" in indexes. I thought it was dangerous too ;-) But bug 8252 is already quite complex to test, so I won't replace the / in it... Mathieu Patch applied cleanly, go forth and signoff Bug 8252 has been signed off by Bernardo Gonzales Kriegel and Frédéric Demians. I'm waiting for its QA. When it is pushed we could do other improvements/corrections, like the one proposed by Fridolyn. M. Saby This patch does not apply. The change appear to have been made already. Both these line are in ccl.properties: att 1011 date-entered-on-file att 1012 Date/time-last-modified Created attachment 22262 [details] [review] Bug 10740 - date created and modified indexes in ccl.properties Patch rebased (Conflict with Bug 8252) (In reply to Fridolyn SOMERS from comment #11) > Created attachment 22262 [details] [review] [review] > Bug 10740 - date created and modified indexes in ccl.properties > > Patch rebased (Conflict with Bug 8252) Hi Fridolyn As 8252 is pushed to master, can we say that it "block" 10740 ? Mathieu I will test your patch in a DOM UNIMARC this evening. Mathieu Out of the scope of your bug : Each time we add an new index in the list of indexes in Search.pm, my blood is freezing :( I know it's needed now, but would not it be more flexible (if a library wants to add custom index) with a list stored out of Perl code, in some YAML file for ex? Mathieu (In reply to mathieu saby from comment #14) > Out of the scope of your bug : > Each time we add an new index in the list of indexes in Search.pm, my blood > is freezing :( > I know it's needed now, but would not it be more flexible (if a library > wants to add custom index) with a list stored out of Perl code, in some YAML > file for ex? This is how QueryParser works. :) (In reply to Jared Camins-Esakov from comment #15) > (In reply to mathieu saby from comment #14) > > Out of the scope of your bug : > > Each time we add an new index in the list of indexes in Search.pm, my blood > > is freezing :( > > I know it's needed now, but would not it be more flexible (if a library > > wants to add custom index) with a list stored out of Perl code, in some YAML > > file for ex? > > This is how QueryParser works. :) Great! So when we decide that pre-QP search could be deprecated, this piece of code could be delete I imagine? But, is there a similar operation to do in QP conf to declare the new index, or is it automatic? Mathieu (In reply to mathieu saby from comment #16) > Great! So when we decide that pre-QP search could be deprecated, this piece > of code could be delete I imagine? Yup. We talked about that at the hackfest on Sunday. > But, is there a similar operation to do in QP conf to declare the new index, > or is it automatic? There is a similar configuration required: you have to add your new index to etc/searchengine/queryparser.yaml. (In reply to Jared Camins-Esakov from comment #17) > (In reply to mathieu saby from comment #16) > > Great! So when we decide that pre-QP search could be deprecated, this piece > > of code could be delete I imagine? > > Yup. We talked about that at the hackfest on Sunday. > > > But, is there a similar operation to do in QP conf to declare the new index, > > or is it automatic? > > There is a similar configuration required: you have to add your new index to > etc/searchengine/queryparser.yaml. I did not know that... Is there a page on the wiki or elsewere explaining that, or other points about QP? I found http://wiki.koha-community.org/wiki/C_%26_P_Search_Rewrite_RFC but it is a RFC, not a page on "What you absolutely need to know about QP now that it is used by Koha". For example, with QP, is it possible to search for an exact expression using Google syntax (double quotes), like "bla bla" ? Mathieu Jared, I suppose I need to add a followup to this bug I wrote some time ago and which does not take into account the QP : http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9828 and added some fields to Search.pm. I don't know at all how to do this, and in which cases (when Search.pm is altered? when bib1.att is altered? when ccl.properties is altered?). Mathieu (In reply to mathieu saby from comment #19) > I don't know at all how to do this I will provide a QP follow-up for this bug 10740, to add "date-time-last-modified". I noticed that in QP all indexes are lowercase. So in the end I wonder why not use everywhere : "date-time-last-modified" and not "Date/time-last-modified". Created attachment 22391 [details] [review] Bug 10740 - date created and modified indexes in ccl.properties and QP Revised patch. Date/time-last-modified converted in date-time-last-modified for QP. I think using / in an index would have provoke bugs is future. (In reply to Fridolyn SOMERS from comment #20) > (In reply to mathieu saby from comment #19) > > I don't know at all how to do this > I will provide a QP follow-up for this bug 10740, to add > "date-time-last-modified". > I noticed that in QP all indexes are lowercase. > So in the end I wonder why not use everywhere : "date-time-last-modified" > and not "Date/time-last-modified". In ccl.properties, there are a lot of aliases differing from the main index only in terms of capitalisation (Notes notes etc). I always wondered if it was necessary or not... Mathieu This patch does not deal with DOM indexing. In the biblio-koha-indexdefs.xml/biblio-zebra-indexdefs.xsl files that govern dom indexing (compare them with record.abs for grs1), I see Date/time-last-modified. I think it would be consistent to use the same fieldname here too. Failed QA Still valid? (In reply to Marc Véron from comment #24) > Still valid? In ES the search field is without slash, see Bug 22524 But with Zebra the index is "1012 Date/time-last-modified" and Date-time-last-modified is an alias. Since it works I close. |