<commit_before>from superdesk.services import BaseService
from liveblog.blogs.blogs import BlogsResource
from superdesk.resource import Resource


class BlogService(BaseService):
    notification_key = 'marketplace_blogs'


# Outgoing endpoint used by the central marketplace app
class BlogResource(Resource):
    url = 'marketed/blogs'
    datasource = {
        'source': 'blogs',
        'search_backend': None,
        'default_sort': [('_updated', -1)],
        'elastic_filter': {'bool': {
            'must': {'term': {'market_enabled': 'true', 'blog_status': 'open'}},
        }},
        # projection don't work
        'projection': {
            'blog_preferences': 0
        }
    }
    public_methods = ['GET']

    schema = {}
    schema.update(BlogsResource.schema)<commit_msg>Fixed filter on marketed blogs endpoint<commit_after>from superdesk.services import BaseService
from liveblog.blogs.blogs import BlogsResource
from superdesk.resource import Resource


class BlogService(BaseService):
    notification_key = 'marketplace_blogs'


# Outgoing endpoint used by the central marketplace app
class BlogResource(Resource):
    url = 'marketed/blogs'
    datasource = {
        'source': 'blogs',
        'search_backend': None,
        'default_sort': [('_updated', -1)],
        'elastic_filter': {'bool': {
            'must': [
                {'term': {'market_enabled': 'true'}},
                {'term': {'blog_status': 'open'}}
            ]
        }},
        # projection don't work
        'projection': {
            'blog_preferences': 0
        }
    }
    public_methods = ['GET']

    schema = {}
    schema.update(BlogsResource.schema)
{'fraction_non_alphanumeric': 0.12582384661473936, 'fraction_numerical': 0.002396644697423607, 'mean_word_length': 2.752808988764045, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1349618', 'n_tokens_mistral': 491, 'n_tokens_neox': 458, 'n_words': 113}