PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Date range searching by year

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Date range searching by year

    I'm trying to set up a system to search between date ranges, but only by year, e.g. 1601 - 1844.

    The calendar picker in the date range option in Zoom is a bit overkill and awkward for the purpose.

    I've developed a sort of workaround whereby I have 2 meta fields in each file which include the year of the document's publication:

    Code:
    <meta name="date" content="1627" /><!--date of publication-->
    <meta name="date2" content="1627" /><!--date of publication for upper end date range searches-->
    ("date" is set to "equal to or greater than" and "date2" to "less than or equal to")

    However, this means that the date appears twice in the search results.

    Is there a way to prevent the "date2" line appearing in the search results, perhaps by "display: none" in the css? If so, where would I do that?

    Or perhaps there is a neater solution to what I want to do?

  • #2
    Okay, I've managed to crack this by setting the "result_metaname_date2" and "result_metavalue_date2" span classes to "display: none;" in the css on the search_template.html.

    Comment


    • #3
      I might be missing something, but is there any reason you're not using "Exact match" if you just want it to match 1627 exactly? Rather than "Greater than or equal to", etc.
      --Ray
      Wrensoft Web Software
      Sydney, Australia
      Zoom Search Engine

      Comment


      • #4
        Hello Ray, the site contains dated documents ranging from the 13th century to present and so researchers may want to narrow searches down to a specified period, say, 1850-1950.

        Comment

        Working...
        X