Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Jan
    @funkdoobiest
    it’s just an array of image urls
    so no need for a nested object
    Mantas Marcinkevičius
    @einorler
    You can just provide a property type string, it can hold a single or an array of strings
    Jan
    @funkdoobiest
    i see, thanks
    Mantas Marcinkevičius
    @einorler
    No problem
    Jan
    @funkdoobiest
    Hey
    I want to generate a url in twig template for a product variant
    but I am getting: Route 'The route object is fit for parsing to generate() method' not found")
    I’ve used „SeoAwareTrait"
    for the variant class
    any idea?
    in twig i am using: „path(variant)“. for a product it’s working
    Jan
    @funkdoobiest
    fixed it
    was my fault
    Jan
    @funkdoobiest
    hm no, not fixed.
    it’s working for product but not vor variant :(
    Mantas Marcinkevičius
    @einorler
    whats your data structure? How do you implement variants?
    Jan
    @funkdoobiest
    <?php
    
    namespace AppBundle\Document;
    
    use ONGR\ElasticsearchBundle\Annotation as ES;
    use ONGR\RouterBundle\Document\SeoAwareTrait;
    use ONGR\RouterBundle\Document\SeoAwareInterface;
    
    
    /**
     * @ES\Nested
     */
    class ProductVariant implements SeoAwareInterface
    {
        use SeoAwareTrait;
    }
    Mantas Marcinkevičius
    @einorler
    hmm...
    Jan
    @funkdoobiest
    'Route 'The route object is fit for parsing to generate() method' not found': Document is not correct or route cannot be generated.
    Mantas Marcinkevičius
    @einorler
    i would suggest simply using a link to a product with a correct id of a variant in the requst query and let the twig handle the correct variant to display
    Jan
    @funkdoobiest
    we need real urls for SEO
    Mantas Marcinkevičius
    @einorler
    that way you wouldnt need to use the trait in the variant at all
    it is a real url to a product
    Jan
    @funkdoobiest
    yes, but not the same as before
    and I need this specific urls for seo
    Mantas Marcinkevičius
    @einorler
    difficult to say whats wrong in your situation, but it may be that if you insist on having the urls generated for variants and the problem is deeper, it may be that you will need to create a custom router
    the shrot description on how to do it is in the docs right now, a lot more in depth one will be accessible in the docs shortly
    you coud try to debug the generate method in ONGR\RouterBundle\Routing to see whats going wrong
    Mantas Marcinkevičius
    @einorler
    i ment ONGR\RouterBundle\Routing\DocumentUrlGenerator :)
    Mantas Marcinkevičius
    @einorler
    I've just taken a quick look at the ONGR url generator
    you should check if its so, but it seems, that it will not return a correct type because the variant is not a ES document, but a nested object
    this may be the problem in your case
    Mantas Marcinkevičius
    @einorler
    This message was deleted
    This message was deleted
    Jan
    @funkdoobiest
    thanks, I will have a look
    Jan
    @funkdoobiest
    problem is routing is just for „Document“ type not for „nested"
    Jan
    @funkdoobiest
    Hi
    I want to sort search result
    i found "$search->addSort()“, but I don’t find the right use statement
    andy docs for this?
    Mantas Marcinkevičius
    @einorler
    yes, this is a way to do it but if you are working with lists here you really could be using FilterManager Bundle
    Tautrimas Pajarskas
    @tautrimas
    Hello (: I see that ElasticsearchDSL does not support https://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-aggregations-bucket-datehistogram-aggregation.html date_histogram aggregation. It does not differ a lot from histogram, but has some usefull datetime related features. Is there a reason why it's not implemented in ONGR?
    Simonas Šerlinskas
    @saimaz
    it’s on this ongr-io/ElasticsearchDSL#97
    Tautrimas Pajarskas
    @tautrimas
    So I am the first to complain (: I'll implement one against 0.x branch
    Simonas Šerlinskas
    @saimaz
    sure, if you need something implement it in 0.x and I’ll merge
    Jan
    @funkdoobiest
    Hi
    Array
    (
        [took] => 11
        [errors] => 1
        [items] => Array
            (
                [0] => Array
                    (
                        [update] => Array
                            (
                                [_index] => ongr_app
                                [_type] => product
                                [_id] => 1950
                                [status] => 400
                                [error] => Array
                                    (
                                        [type] => mapper_parsing_exception
                                        [reason] => failed to parse
                                        [caused_by] => Array
                                            (
                                                [type] => illegal_state_exception
                                                [reason] => Mixing up field types: class org.elasticsearch.index.mapper.core.LongFieldMapper$LongFieldType != class org.elasticsearch.index.mapper.internal.IdFieldMapper$IdFieldType on field _id
                                            )
    
                                    )
    
                            )
    
                    )
    
            )
    
    )