Add daterange to Google Search Appliance without displaying daterange in input

85 views Asked by At

I'm using the GSA Iframe and I have a date selection that the user can choose the date range. Is there a way to add the daterange without changing the value of the user's query? I know I can add daterange:YYYY-MM-DD..YYY-MM-DD to the query input box right before the user clicks submit but I don't want it to appear in the input box. I thought I could add a hidden input field named 'daterange' with the date value but that doesn't seem to work.

Update: I have tried adding as_q as a hidden form element. This does work but seems to also add the date to the input box.

I also tried adding daterange hidden form field and modifying the xslt

2

There are 2 answers

1
BigMikeW On BEST ANSWER
0
BPercival On

What I ended up doing is creating my own variable in the XSLT that holds the query parameter and then setting that as the input value only.