I have a taxonomy term used in 1 content type. It's set to cardinality 1. Now all nodes in my system get indexed in the search_api_db_rm_content_search_index_field_product_taxonomy table. Also nodes of content types that do not have the field attached to it.
This leads to a strange facet (see attachment)
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | search_api_db_nullvalues.patch | 692 bytes | freakalis |
| Schermafdruk.png | 306.53 KB | Johnny vd Laar |
Comments
Comment #1
drunken monkeyThis seems to be a bug in the DB backend, not in the Search API per se.
Comment #2
freakalis commentedHere is is patch that stops null values from being indexed. This works for me
Comment #3
adam_b commented+1 - I'm having the same problem; will test this patch tonight.
Comment #4
drunken monkeyPatch looks very good, thank you!
@ adam_b: Did you get to it, did it work? If someone can confirm this works, I'll gladly commit this.
Comment #5
ollu commented+1 Tested it the other day and it worked just fine!
Comment #6
drunken monkeyPlease see whether #1649042: Fix handling of NULL values when indexing is the same problem, and whether the patch in #10 there solves it.
The solution here is a bit unflexible in my opinion.