Active
Project:
Search API ranges
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Feb 2013 at 17:05 UTC
Updated:
8 May 2020 at 13:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedIndeed it does not currently support the date query type. Would also require a widget on the frontend to display date input widgets for the slider.
Comment #2
emettler commentedThanks for the quick reply!
I was looking at the second bullet in the Help so I wasn't sure:
Comment #3
Anonymous (not verified) commentedYou could use a unix timestamp and index it as an integer, but not as a date field.
Comment #4
Anonymous (not verified) commentedReopen if more questions
Comment #6
tommeir commentedJust changed my index type from date to integer for a unix timestamp field. (+swipe and reindexed the site).
when I try to edit the facet settings again I still get the "The widget does not support the date query type" error message.
Comment #7
kostask commentedSame as tommeir I am trying to index the node's date created. I have indexed it as integer and I get the "The widget does not support the date query type" error message.
Strangely enough I am not getting the same error when indexing the node's date changed.
Comment #8
kostask commentedI am digging a little bit deeper into this:
The validation function that throws this error is facetapi_facet_display_form_validate in facetapi.admin.inc
When dpming the $query_type of date created and date changed I get date and term respectively.
The only allowed widget type is term in both cases, thus date changed works and date created does not.
My next question is why this happens...
Comment #9
merilainen commentedIf you add the date to the "query types" in search_api_ranges.module function search_api_ranges_facetapi_widgets()
then you can get the slider working.
Slider is naturally not a very intuitive element for users, but maybe it can be replaced with a datepicker or something in a template.
Why the default "query type" value is "term", I don't know. I thought this module works best with integers and decimals...
Comment #10
suchdavid commented@mErilainen Thank you for the idea, I made a patch from it.
Comment #11
philyThanks, above patch #10 works.