• Resolved winniezz

    (@winniezz)


    Hi,

    Most of my posts are 2 3 or 4 time, sometimes more in the index.

    Also, sometimes results page returns 10 elements, sometimes 8 sometimes 9, can it be changed and be consistent ?

    Yours, !

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter winniezz

    (@winniezz)

    It seems huge posts are splitted and so appears many times in the index and it’s faking the number of results displayed

    add_action(‘pre_get_posts’, function( $query ) {
    if ( !is_admin() && $query->is_main_query() && $query->is_search() ) {
    $query->set( ‘posts_per_page’, 24 );
    }
    }, 1);

    When results have huge posts, number or returned results will be lower. 20 ,21 …

    I also wonder if it can’t be a problem when results are paginated because of this behaviour.. ;will page 2 really be page ?

    • This reply was modified 1 month, 2 weeks ago by winniezz.
    • This reply was modified 1 month, 2 weeks ago by winniezz.
    • This reply was modified 1 month, 2 weeks ago by winniezz.
    Thread Starter winniezz

    (@winniezz)

    ps: I’m using elementor to display query results using built-in loop-grid with current query.

    Plugin Author Darko G.

    (@darkog)

    Hey @winniezz

    Thanks for reporting this issue. We are checking the issue and will get back to you asap.

    Best Regards,
    Darko

    Plugin Author Darko G.

    (@darkog)

    Hey @winniezz – post splitting / de-duplication bug is now fixed in v1.2.2.

    Thanks for reporting.

    Thread Starter winniezz

    (@winniezz)

    Thank you 😉

    But I still have “random” number of results (14 ?) on standard elementor search page and some overlaps between pages

    page 1 : a b c d e

    page 2 : e f g h i (we already had e one page 1)

    this kind of behaviour

    • This reply was modified 1 month, 1 week ago by winniezz.
    Thread Starter winniezz

    (@winniezz)

    if I’m using

    add_action(‘pre_get_posts’, function( $query ) {
    if ( !is_admin() && $query->is_main_query() && $query->is_search() ) {
    $query->set( ‘posts_per_page’, 10 );
    }
    }, 1);

    I got 5 results on page 1

    with

    add_action(‘pre_get_posts’, function( $query ) {
    if ( !is_admin() && $query->is_main_query() && $query->is_search() ) {
    $query->set( ‘posts_per_page’, 20 );
    }
    }, 1);

    I get 11 results on page 1

    I suppose it depends if some posts are duplicated in the index or not.

    Thread Starter winniezz

    (@winniezz)

    Also, in indices panel it’s shown “82435 / 43982” in “Documents” column

    Thread Starter winniezz

    (@winniezz)

    will try this command and re-build index, will keep you in touch

    define( 'CELERSEARCH_SPLIT_POSTS', false );
    • This reply was modified 1 month, 1 week ago by winniezz.
    • This reply was modified 1 month, 1 week ago by winniezz.
    Thread Starter winniezz

    (@winniezz)

    it works, indexing is much more slow now but it works.

    (search is still fast)

    Plugin Author Darko G.

    (@darkog)

    Thanks for the valuable info @winniezz. I will address this in a new version. I want to make the post splitting work really well for performance reasons.

Viewing 10 replies - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.