Closed (fixed)
Project:
Search API
Version:
7.x-1.x-dev
Component:
Facets
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
31 Dec 2011 at 15:48 UTC
Updated:
28 Nov 2013 at 10:00 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
damien tournoud commentedHere is a very simple implementation of this idea.
Comment #2
damien tournoud commentedRe-roll of the same patch, with an additional exception if the operator is unknown.
Comment #3
drunken monkeySorry, I've been looking at this patch now and then for well over a month now, but I'm just not sure.
I agree it's a very soft API change (or, rather, addition), but when other modules then rely on this, we introduce yet again some version incompatibilities which are sure to trip some people up.
In any case, we couldn't use this in #1390586: Add support for OR facets until there's a new Search API release with this included. When we wait a bit and mention it prominently enough, we might avoid these problems as far as possible … (Also, at least for Solr, we could leave the alternative also in for a bit, with some code checking for the existence of tags.)
Anyways, I've asked for others to comment, maybe someone has a strong opinion or arguments for either side.
If not, I guess I'll commit this in the coming weeks …
Sorry you had to wait so long, and thank you very much for the initiative and your patches!
On a more technical note (i.e., actual patch review):
"conjonction"
Even I would say that this is too cautious. We should be able to rely on the Facet API only passing these two operators here.
On the other hand, it doesn't really hurt and in the future there might even be other operators defined by the Facet API …
I guess either way is fine.
Newline after the method, please.
This and all other instances: Please use type hinting, i.e.,
array $tags = array().Also, we should preprocess the tags with
drupal_map_assoc()so we can just useisset($tags[$tag])to check for a certain tag.There should also be a
hasTag($tag)method for doing this directly.Comment #4
restyler commentedHi guys, I came here from https://drupal.org/node/1390586 ("or" operator issue for db engine)
More than 2 months passed, and since there are no objections, may be we should commit it to dev and wait for some bugreporting? :)
Comment #5
drunken monkeyIt's 14 months (now 16), not two. Not really better, though – I have to apologize, it must have slipped from my radar.
I now fixed the few issues mentioned in the last comment and committed the patch.
Thanks again, Damien, and sorry it took me so long!