#2393·lbry-sdk

incorrect results with tags + not_tags being same tag value

Author: tzarebczanCreated Aug 13, 2019Updated Aug 19, 2023
Labelstype: bugarea: hub

When you run a claim search with tags/not_tags being the same value, you get bogus results, see below. This should return a blank list.

{"method": "claim_search", "params":{"any_tags": ["porn"], "not_tags": ["mature", "porn", "nsfw", "xxx"], "no_totals": true, "page": 1}}

Results:

    "jsonrpc": "2.0",
    "result": {
        "items": [
            {
                "address": "bQt1P1w4wL7pynogAnkPgDxKjr4WpM5YAB",
                "amount": "0.01",
                "canonical_url": "lbry://@Jason-McVicar#e/defining-true-blessedness-dexter-chua#6",
                "claim_id": "6c8944ed2f19c839b8afeb9162040a6ad0e3ffff",
                "claim_op": "create",
                "confirmations": 25263,
                "height": 591065,
                "is_channel_signature_valid": true,
                "meta": {
                    "activation_height": 591065,
                    "creation_height": 591065,
                    "creation_timestamp": 1561627097,
                    "effective_amount": "0.01",
                    "expiration_height": 2693465,
                    "is_controlling": true,
                    "support_amount": "0.0",
                    "take_over_height": 591065,
                    "trending_global": 0,
                    "trending_group": 0,
                    "trending_local": 0,
                    "trending_mixed": 0
                },
                "name": "defining-true-blessedness-dexter-chua",
                "normalized_name": "defining-true-blessedness-dexter-chua",
                "nout": 0,
                "permanent_url": "lbry://defining-true-blessedness-dexter-chua#6c8944ed2f19c839b8afeb9162040a6ad0e3ffff",
                "short_url": "lbry://defining-true-blessedness-dexter-chua#6",
                "signing_channel": {
                    "address": "bK9881qmfPe3hh8Uybx5Cv36B8V65zKiSe",
                    "amount": "0.01",
                    "canonical_url": "lbry://@Jason-McVicar#e",
                    "claim_id": "e3cc9c350d3dcfce05c1699b08db34f2c5cce1b7",
                    "claim_op": "create",
                    "confirmations": 25264,
                    "height": 591064,
                    "meta": {
                        "activation_height": 591064,
                        "claims_in_channel": 38,
                        "creation_height": 591064,
                        "creation_timestamp": 1561626695,
                        "effective_amount": "0.01",
                        "expiration_height": 2693464,
                        "is_controlling": true,
                        "support_amount": "0.0",
                        "take_over_height": 591064,
                        "trending_global": 0,
                        "trending_group": 0,
                        "trending_local": 0,
                        "trending_mixed": 0
                    },
                    "name": "@Jason-McVicar",
                    "normalized_name": "@jason-mcvicar",
                    "nout": 0,
                    "permanent_url": "lbry://@Jason-McVicar#e3cc9c350d3dcfce05c1699b08db34f2c5cce1b7",
                    "short_url": "lbry://@Jason-McVicar#e",
                    "timestamp": 1561626695,
                    "txid": "2dea897b04f6f7e96453ef5f84c326802e4cf2fad199cdad2967d488bc74cdd5",
                    "type": "claim",
                    "value": {
                        "cover": {
                            "url": "https://thumbnails.lbry.com/banner-UCQfwXUI1NROpXrrdChaqyig"
                        },
                        "description": "Preaching and teaching.",
                        "public_key": "3056301006072a8648ce3d020106052b8104000a03420004361105b291261cea08526b489b664ce3b314cfc5585024d0f6bf45e846cdbadf8e1ad7664e9d824b265461fdf37c092a5e9eaff52b1da3e892772c0c6bd45796",
                        "public_key_id": "bEERBAZoM5cFRwWzQBuNnyf2nUiJSzyndx",
                        "thumbnail": {
                            "url": "https://thumbnails.lbry.com/UCQfwXUI1NROpXrrdChaqyig"
                        },
                        "title": "Jason McVicar"
                    },
                    "value_type": "channel"
                },
                "timestamp": 1561627097,
                "txid": "5a4c8d33972bf309dad5065a2bfc7b4d2db28e991b54454bcd12c910f549e92d",
                "type": "claim",
                "value": {
                    "description": "This channel features teaching and preaching out of Fredericton Christian Church as well as creative and experimental projects.\n...\nhttps://www.youtube.com/watch?v=QYmre8IanJg",
                    "license": "Copyrighted (contact publisher)",
                    "release_time": "1548770757",
                    "source": {
                        "hash": "15683f79fa3a9c304fdb34e5286ea3b8be3ecbd0a8f938eac894a94a359f8a1dbab9d59e464df52a8be763593f94329d",
                        "media_type": "video/mp4",
                        "name": "defining-true-blessedness.mp4",
                        "sd_hash": "0dc442af5d88d3f40a56bd848134bb5c3a11d4e5c4bf899a20c1ba1dc39d1e913b5d5869c995fa1d1ce340c3d2201388",
                        "size": "107229564"
                    },
                    "stream_type": "video",
                    "tags": [
                        "beliefs",
                        "bible",
                        "christian",
                        "church",
                        "fredericton",
                        "fredericton christian church",
                        "fredericton new brunswick",
                        "god",
                        "holy spirit",
                        "jason mcvicar",
                        "jesus",
                        "new brunswick",
                        "preaching",
                        "teaching",
                        "education"
                    ],
                    "thumbnail": {
                        "url": "https://thumbnails.lbry.com/QYmre8IanJg"
                    },
                    "title": "Defining True Blessedness - Dexter Chua - Fredericton Christian Church",
                    "video": {
                        "duration": 2561,
                        "height": 720,
                        "width": 1280
                    }
                },
                "value_type": "stream"
            },
            {
                "address": "bLVQT7Q6LiGeSo2wWRJuFYPhomDoRbtFee",
                "amount": "0.01",
                "canonical_url": "lbry://@CaserosenYoutube#f/si-aloe-vera-y-aceite-esencial-pueden#a",
                "claim_id": "a9397df01364d9c58c744584866e3261eedeffff",
                "claim_op": "create",
                "confirmations": 26812,
                "height": 589516,
                "is_channel_signature_valid": true,
                "meta": {
                    "activation_height": 589516,
                    "creation_height": 589516,
                    "creation_timestamp": 1561378883,
                    "effective_amount": "0.01",
                    "expiration_height": 2691916,
                    "is_controlling": true,
                    "support_amount": "0.0",
                    "take_over_height": 589516,
                    "trending_global": 0,
                    "trending_group": 0,
                    "trending_local": 0,
                    "trending_mixed": 0
                },
                "name": "si-aloe-vera-y-aceite-esencial-pueden",
                "normalized_name": "si-aloe-vera-y-aceite-esencial-pueden",
                "nout": 0,
                "permanent_url": "lbry://si-aloe-vera-y-aceite-esencial-pueden#a9397df01364d9c58c744584866e3261eedeffff",
                "short_url": "lbry://si-aloe-vera-y-aceite-esencial-pueden#a",
                "signing_channel": {
                    "address": "bVGDMKhfZxcW5rNTWuftdQ4v4g6PscszZp",
                    "amount": "0.01",
                    "canonical_url": "lbry://@CaserosenYoutube#f",
                    "claim_id": "f58b8ec9dc69bd7875a5e991afd1a594368f845e",
                    "claim_op": "create",
                    "confirmations": 26813,
                    "height": 589515,
                    "meta": {
                        "activation_height": 589515,
                        "claims_in_channel": 107,
                        "creation_height": 589515,
                        "creation_timestamp": 1561378672,
                        "effective_amount": "0.01",
                        "expiration_height": 2691915,
                        "is_controlling": true,
                        "support_amount": "0.0",
                        "take_over_height": 589515,
                        "trending_global": 0,
                        "trending_group": 0,
                        "trending_local": 0,
                        "trending_mixed": 0
                    },
                    "name": "@CaserosenYoutube",
                    "normalized_name": "@caserosenyoutube",
                    "nout": 0,
                    "permanent_url": "lbry://@CaserosenYoutube#f58b8ec9dc69bd7875a5e991afd1a594368f845e",
                    "short_url": "lbry://@CaserosenYoutube#f",
                    "timestamp": 1561378672,
                    "txid": "2e250091680f9b93e702e558457eef85158bae80ee0065979c8132f31b7bf63c",
                    "type": "claim",
                    "value": {
                        "cover": {
                            "url": "https://thumbnails.lbry.com/banner-UCHRwi1a-WFadE9w3JakBeUA"
                        },
                        "description": "Caseros En YouTube Es un canal que tiene como finalidad darte los mejores consejos para que tengas una vida plena, además de ello tenemos para ti los mejores consejos naturales de salud y tips para asegurar tu bienestar físico y emocional. Tenemos para ti las mejores dietas y bebidas adelgazantes para que pierdas peso en poco tiempo, además de muchos consejos para la belleza del rostro, cabello y cuerpo en general. Visítanos y disfruta de toda esta valiosa información",
                        "locations": [
                            {
                                "country": "US"
                            }
                        ],
                        "public_key": "3056301006072a8648ce3d020106052b8104000a03420004eede06de9673b372ba5337ab943194c5c38d94082c9947f3fb3a31c0e12373c9be69890b6020fdcf523e09715ea5e140b4afa68ccf41b5a5b406d13cc2a07073",
                        "public_key_id": "bQNLL8QVzpxaXkXkSqr8r12twej8JhhE1E",
                        "thumbnail": {
                            "url": "https://thumbnails.lbry.com/UCHRwi1a-WFadE9w3JakBeUA"
                        },
                        "title": "Caseros En Youtube"
                    },
                    "value_type": "channel"
                },
                "timestamp": 1561378883,
                "txid": "5f7a087f335627e432c95b06084fc30f051d3e3974d6cfaab79ef9c627cc4b66",
                "type": "claim",
                "value": {
                    "description": "Si!  Aloe Vera y Aceite esencial pueden volver atrás cualquier parte de tu piel\nSuscríbete es Gratis:  https://goo.gl/SCvFnX\n\n\n IMPORTANTE: Las informaciones expuestas en este video, tienen el único propósito de educar y no pretenden sustituir el consejo o diagnostico de un médico.\n...\nhttps://www.youtube.com/watch?v=uHpLnRE_w3c",
                    "license": "Copyrighted (contact publisher)",
                    "release_time": "1555808080",
                    "source": {
                        "hash": "f29cb41f8d5b3786c670eb19846af071152bfb0152e4ecca0de118806626e8a2c0093a21786bcda82e3f9172d4fc81c8",
                        "media_type": "video/mp4",
                        "name": "si-aloe-vera-y-aceite-esencial.mp4",
                        "sd_hash": "2f2af3334b38fa4c98c21834b3b8d0b3c9f225fb40dce1cf4eccfc3852b680adad0e17adf172466d238490ddb3dcb397",
                        "size": "29656053"
                    },
                    "stream_type": "video",
                    "tags": [
                        "aceite esencial de incienso",
                        "aceite esencial de menta",
                        "aceite esencial de romero",
                        "aloe vera",
                        "remedios caseros",
                        "remedios para la piel",
                        "howto & style"
                    ],
                    "thumbnail": {
                        "url": "https://thumbnails.lbry.com/uHpLnRE_w3c"
                    },
                    "title": "Si!  Aloe Vera y Aceite esencial pueden volver atrás cualquier parte de tu piel",
                    "video": {
                        "duration": 288,
                        "height": 720,
                        "width": 1280
                    }
                },
                "value_type": "stream"
            },
            {
                "address": "bP9CBtSYZXL3HuPtg9MdRY1z46aP4cf1CX",
                "amount": "0.01",
                "canonical_url": "lbry://@aseedoflight#1/dcbc51b7fedd64d-1#2",
                "claim_id": "2d037b88af4e6a18e5cea5e5423db85b0edcffff",
                "claim_op": "create",
                "confirmations": 1778,
                "height": 614550,
                "is_channel_signature_valid": true,
                "meta": {
                    "activation_height": 614550,
                    "creation_height": 614550,
                    "creation_timestamp": 1565426558,
                    "effective_amount": "0.01",
                    "expiration_height": 2716950,
                    "is_controlling": true,
                    "support_amount": "0.0",
                    "take_over_height": 614550,
                    "trending_global": 0,
                    "trending_group": 0,
                    "trending_local": 0,
                    "trending_mixed": 0
                },
                "name": "dcbc51b7fedd64d-1",
                "normalized_name": "dcbc51b7fedd64d-1",
                "nout": 0,
                "permanent_url": "lbry://dcbc51b7fedd64d-1#2d037b88af4e6a18e5cea5e5423db85b0edcffff",
                "short_url": "lbry://dcbc51b7fedd64d-1#2",
                "signing_channel": {
                    "address": "bQdriXNSfpRapGsmhPEfqiL3irULxYPnhU",
                    "amount": "0.01",
                    "canonical_url": "lbry://@aseedoflight#1",
                    "claim_id": "1160a618a567cb5ea42dcce422f969f63615a143",
                    "claim_op": "create",
                    "confirmations": 1793,
                    "height": 614535,
                    "meta": {
                        "activation_height": 614535,
                        "claims_in_channel": 318,
                        "creation_height": 614535,
                        "creation_timestamp": 1565424361,
                        "effective_amount": "0.01",
                        "expiration_height": 2716935,
                        "is_controlling": true,
                        "support_amount": "0.0",
                        "take_over_height": 614535,
                        "trending_global": 0,
                        "trending_group": 0,
                        "trending_local": 0,
                        "trending_mixed": 0
                    },
                    "name": "@aseedoflight",
                    "normalized_name": "@aseedoflight",
                    "nout": 0,
                    "permanent_url": "lbry://@aseedoflight#1160a618a567cb5ea42dcce422f969f63615a143",
                    "short_url": "lbry://@aseedoflight#1",
                    "timestamp": 1565424361,
                    "txid": "71d2f8b30ebc311d58a749464af170ca1d32f17ad6611885496639af6cd62fd2",
                    "type": "claim",
                    "value": {
                        "cover": {
                            "url": "https://thumbnails.lbry.com/banner-UClXAk91DXIjSW4jZgEp6tww"
                        },
                        "description": "القناة الرسمية للباحث محمد الكيلاني\nhttp://mkilani.com",
                        "public_key": "3056301006072a8648ce3d020106052b8104000a034200042cf06552415cf662e63671325a812d416e9850d9e2dba919973c3eec3a75a44efd0060949a43a16613573a52bbd77be19623f02c11c5553009fefe115427988d",
                        "public_key_id": "bKXaattrF1CWrVjKcw2kiy4Lx2EtJ5XSWf",
                        "thumbnail": {
                            "url": "https://thumbnails.lbry.com/UClXAk91DXIjSW4jZgEp6tww"
                        },
                        "title": "Mohammed Kilani"
                    },
                    "value_type": "channel"
                },
                "timestamp": 1565426558,
                "txid": "4e28f30a27b16950cc6863be918898a60ee539df6e21f677695386afd8d6797e",
                "type": "claim",
                "value": {
                    "description": "الصور التي تحدثت عنها السيدة هيا\nhttp://mkilani.com/files/haya-photos.pdf\n\nللاستماع إلى بث الراديو كل يوم جمعة\nhttp://mkilani.com\n\n* جميع المعلومات و الإجراءات تطوعية من قبل الأصدقاء و مقدمة كمعلومات للبحث العلمي، و ليس كمعلومات طبية علاجية.\n...\nhttps://www.youtube.com/watch?v=g8UJmTEfJFk",
                    "license": "Copyrighted (contact publisher)",
                    "release_time": "1525343093",
                    "source": {
                        "hash": "44a1a54842764e35f25dd2dc813cd9a462151db8ed63474cf93e72a30fe595114b42578c5e7c39160660216f381c260b",
                        "media_type": "video/mp4",
                        "name": "g8UJmTEfJFk.mp4",
                        "sd_hash": "e398b5d87c1450da84a87946c40cc65efef35b8bc191aa47340086a15afb06b54b27e10dcf8048fab36c7604bca24cb1",
                        "size": "82137554"
                    },
                    "stream_type": "video",
                    "tags": [
                        "cancer cure",
                        "caroline myss",
                        "chakras",
                        "dmso",
                        "dmt",
                        "kundalini",
                        "pineal",
                        "santos bonacci",
                        "people & blogs"
                    ],
                    "thumbnail": {
                        "url": "https://thumbnails.lbry.com/g8UJmTEfJFk"
                    },
                    "title": "وصفات لشهر رمضان | مشاركات من الأصدقاء",
                    "video": {
                        "duration": 3205,
                        "height": 720,
                        "width": 1280
                    }
                },
                "value_type": "stream"
            },
            {
                "address": "bR7zG9UphEve1iNybdJzrV9Vsuu9ExNQDR",
                "amount": "0.01",
                "canonical_url": "lbry://@GamingGazer#1/rebuilding-foundation-super-mario-maker#6",
                "claim_id": "6bb3ab493833e049d5237eaa4fab4e0bf7d8ffff",
                "claim_op": "create",
                "confirmations": 19353,
                "height": 596975,
                "is_channel_signature_valid": true,
                "meta": {
                    "activation_height": 596975,
                    "creation_height": 596975,
                    "creation_timestamp": 1562599242,
                    "effective_amount": "0.01",
                    "expiration_height": 2699375,
                    "is_controlling": true,
                    "support_amount": "0.0",
                    "take_over_height": 596975,
                    "trending_global": 0,
                    "trending_group": 0,