[ 
https://jira.duraspace.org/browse/DS-1237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=26138#comment-26138
 ] 

Andrea Bollini commented on DS-1237:
------------------------------------

Hi Kostas,
imho we need to apply some change before commit this contribution to the master:
1) you are (partially) assuming that the advanced search include only 3 
dropdown for index selection but this was configurable in local customization 
including a num_field hidden field in the form where the actual number was 
specified. You take care of this in 
https://github.com/DSpace/DSpace/pull/50/files#L0R407 but not here 
https://github.com/DSpace/DSpace/pull/50/files#L0R180 where it is assumed that 
query4 is related to the date range
2) it works with only a range, if the user select the same index there are 
issues (ok, it is a stupid use case) but there are not possibilities to 
configure two different data range index (for example one on date.issued and 
one on date.available)
3) it will be better if you require and work on the date type index 
(search.index.<n> = dateissued:dc.date.issued:date). With this configuration 
the lucene index is called dateissued.year see 
https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/search/DSIndexer.java#L201
https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/search/DSIndexer.java#L1082
4) for the javascript methods you should use the jquery framework as it is 
supported by all the major browser, getElementById and .innerHTML can produce 
issues with some (old/bad) IE and others. I also suggest to move (and rename in 
a more clear way) these methods in a dedicated .js file. You can include this 
file in the header fragment setting the attribute dspace.layout.head in the 
request see
https://github.com/DSpace/DSpace/blob/master/dspace-jspui/dspace-jspui-webapp/src/main/webapp/layout/header-default.jsp#L38
https://github.com/DSpace/DSpace/blob/master/dspace-jspui/dspace-jspui-webapp/src/main/webapp/layout/header-default.jsp#L73
                
> Support date ranges in advance search
> -------------------------------------
>
>                 Key: DS-1237
>                 URL: https://jira.duraspace.org/browse/DS-1237
>             Project: DSpace
>          Issue Type: New Feature
>          Components: JSPUI
>            Reporter: Kostas Stamatis
>              Labels: has-patch, has-pull-request
>         Attachments: daterange_patch.diff, README.txt
>
>
> This proposed extension (implemented by National Documentation Centre/EKT - 
> http://www.ekt.gr) allows date range search in advance search. When a search 
> index is declared as a "date" search index in configuration file, then, when 
> selected in advance search drop down lists, a new drop down list appears to 
> select the range type (equals, before than, after than or between) and the 
> appropriate fields appear to the user to input the date ranges for the search.
> The date range search is based on Lucene's range search mechanism.
> The only limitation of this extension is that the companison is String-based 
> meaning that it works better if the metadata value in the date fields are 
> saved in the format yyyy-mm-dd.
> USEFULNESS
> ---------------------
> In case you want to search for records that are dated within a period of 
> time, you can use this extension to add this functionality in DSpace's 
> advance search.
> CONFIGURATION FILES
> ---------------------------------------
> In the default configuration file of DSpace (dspace.cfg) just declare the 
> search indices that you want to be of type date, as follows:
> #Declare the indices that are of type date and want to have ranges in 
> searching
> search.index.date.1 = date
> EXAMPLES
> ------------
> Repository: http://phdtheses.ekt.gr/eadd/advanced-search
> Note: Select search by date and then a new option drop-down menu appears

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Dspace-devel mailing list
Dspace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to