This might be a dumb question, but I take it that “Combining Faceted Navigation and the Event Search query processing mode is not supported.” (Event Search - Funnelback Documentation - Version 15.10.0) means I can’t use both of these parameters together in a query:
meta_4=somevalue
query=%25O>20170913<20170918
It doesn’t seem to filter by the metadata value at all.
Is there another way to do it, like remove the non-matching results in hook_post_process?
I’m pretty sure you can combine metadata contraints and event constraints - but you have to make sure that the event params are at the end of the query as processed. You can’t use faceted navigation with events mode though.
I have a vague recollection of raising a bug about how the query is built from CGI parameters, meaning that the meta constraint is lost because of where it ends up in the built query.
Try building the query directly yourself.
Instead of
meta_4=somevalue
query=%25O>20170913<20170918
In my particular situation, the date range query is being added by a hook script, so I’ll need to update the script to set it differently. Hmm it might even be a bug in the script that’s doing this, rather than a bug in Funnelback. Will investigate deeper..
Try getting your hook script to set the date in the system query field - that might solve the problem for you and sort of makes more sense anyway since it’s system generated.
Hmm no that’s not part of the question.
I might need some more direction on how to do that.. should I add “s” to the inputParameterMap ?
Added:
q.inputParameterMap["s"] = "%"+event_query;
Update: this seems to be working when there’s no text query, but when there is, it’s still including other results that match the text query. Eg with these params:
&query=medicine%20+4:370504%25O>20170913<20170918
I get queryAsProcessed":"medicine 4:370504 % O>20170913<20170918"
And results that match “medicine” but not “370504”.
As you can see, I tried adding a plus to see if that made a difference, but it’s getting stripped out. Interestingly a minus doesn’t get stripped out, and works as expected.
If you need all constraints to be matched you can set Funnelback to only return fully matching results (-fmo=on query processor option, or &fmo=on as a CGI parameter).
I’m not sure if Gordon’s suggestion will work (I think it might suffer from the same bug as your original post with the value inserted at the end of the query as processed - my reading of it was that the system generated paramaters were placed on the end of the query string). However worth a try.
Thanks guys, just realised I forget to submit my last comment:
I’d forgotten to urlencode the plus, so it was being converted to a space. Changed to %2B and it’s all working!!!
FMO is switched on (i wondered what FMO stands for, assumed Fear of Missing Out)