Trouble with Search – Any idea why one works, but not the other?

This topic contains 8 replies, has 3 voices, and was last updated by  Kiran 5 years, 6 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #484523

    jkirker
    Lifetime Member
    Post count: 298

    This returns zero results:
    https://www.rinktime.com/rinksearch/?geodir_search=1&stype=gd_place&s=Youth+Hockey+Camps+and+Clinics&snear=anaheim+california&sfacility_type%5B%5D=Indoor&spost_category%5B%5D=33&sgeo_lat=33.839&sgeo_lon=-117.8572

    But when I remove the spost_category from the search it works.
    https://www.rinktime.com/rinksearch/?geodir_search=1&stype=gd_place&s=Youth+Hockey+Camps+and+Clinics&snear=anaheim+california&sfacility_type%5B%5D=Indoor&sgeo_lat=33.839&sgeo_lon=-117.8572

    The problem is that there are listings associated with the category for this criteria that are returning empty.

    I also noticed that the search sometimes returns listings that aren’t relevant. Here’s an example – specifically the first listing returned – World on Wheels – the listing has absolutely nothing to do with hockey or no mention of hockey within it.

    https://www.rinktime.com/rinksearch/?geodir_search=1&stype=gd_place&s=Ice+Hockey+Rinks&snear=los+angeles+california&sfacility_type%5B%5D=&spost_category%5B%5D=34&sgeo_lat=34.1139&sgeo_lon=-118.4068

    Finally, I looked at the query – is there a reason why terms and term_taxonomy are not considered? I’m a big user of tags but they aren’t included in the search so far as I can tell.

    SELECT SQL_CALC_FOUND_ROWS xxx_posts.*, xxx_geodir_gd_place_detail.* , (3958.761 * 2 * ASIN(SQRT( POWER(SIN((ABS(33.839) – ABS(xxx_geodir_gd_place_detail.latitude)) * pi()/180 / 2), 2) +COS(ABS(33.839) * pi()/180) * COS( ABS(xxx_geodir_gd_place_detail.latitude) * pi()/180) *POWER(SIN((-117.8572 – xxx_geodir_gd_place_detail.longitude) * pi()/180 / 2), 2) ))) AS distance , CASE
    WHEN xxx_geodir_gd_place_detail.featured=1
    THEN 1
    ELSE 0
    END AS gd_featured , CASE
    WHEN xxx_posts.post_title LIKE ‘Youth Hockey Camps and Clinics’
    THEN 1
    ELSE 0
    END AS gd_exacttitle, CASE
    WHEN ( xxx_posts.post_title LIKE ‘Youth’
    OR xxx_posts.post_title LIKE ‘Youth%’
    OR xxx_posts.post_title LIKE ‘% Youth%’ )
    AND ( xxx_posts.post_title LIKE ‘Hockey’
    OR xxx_posts.post_title LIKE ‘Hockey%’
    OR xxx_posts.post_title LIKE ‘% Hockey%’ )
    AND ( xxx_posts.post_title LIKE ‘Camps’
    OR xxx_posts.post_title LIKE ‘Camps%’
    OR xxx_posts.post_title LIKE ‘% Camps%’ )
    AND ( xxx_posts.post_title LIKE ‘Clinics’
    OR xxx_posts.post_title LIKE ‘Clinics%’
    OR xxx_posts.post_title LIKE ‘% Clinics%’ )
    THEN 1
    ELSE 0
    END AS gd_alltitlematch_part, CASE
    WHEN ( xxx_posts.post_title LIKE ‘Youth’
    OR xxx_posts.post_title LIKE ‘Youth%’
    OR xxx_posts.post_title LIKE ‘% Youth%’ )
    OR ( xxx_posts.post_title LIKE ‘Hockey’
    OR xxx_posts.post_title LIKE ‘Hockey%’
    OR xxx_posts.post_title LIKE ‘% Hockey%’ )
    OR ( xxx_posts.post_title LIKE ‘Camps’
    OR xxx_posts.post_title LIKE ‘Camps%’
    OR xxx_posts.post_title LIKE ‘% Camps%’ )
    OR ( xxx_posts.post_title LIKE ‘Clinics’
    OR xxx_posts.post_title LIKE ‘Clinics%’
    OR xxx_posts.post_title LIKE ‘% Clinics%’ )
    THEN 1
    ELSE 0
    END AS gd_titlematch_part, CASE
    WHEN ( xxx_posts.post_title LIKE ‘Youth Hockey Camps and Clinics’
    OR xxx_posts.post_title LIKE ‘Youth Hockey Camps and Clinics%’
    OR xxx_posts.post_title LIKE ‘% Youth Hockey Camps and Clinics%’ )
    THEN 1
    ELSE 0
    END AS gd_titlematch, CASE
    WHEN ( xxx_posts.post_content LIKE ‘Youth Hockey Camps and Clinics’
    OR xxx_posts.post_content LIKE ‘Youth Hockey Camps and Clinics %’
    OR xxx_posts.post_content LIKE ‘% Youth Hockey Camps and Clinics %’
    OR xxx_posts.post_content LIKE ‘%>Youth Hockey Camps and Clinics%’
    OR xxx_posts.post_content LIKE ‘% Youth Hockey Camps and Clinics’
    OR xxx_posts.post_content LIKE ‘% Youth Hockey Camps and Clinics,’ )
    THEN 1
    ELSE 0
    END AS gd_content
    FROM xxx_posts
    INNER JOIN xxx_geodir_gd_place_detail
    ON (xxx_geodir_gd_place_detail.post_id = xxx_posts.ID)
    WHERE 1=1
    AND ( (xxx_posts.post_title LIKE “Youth Hockey Camps and Clinics”
    OR ( xxx_posts.post_title LIKE “Youth”
    OR xxx_posts.post_title LIKE “Youth%”
    OR xxx_posts.post_title LIKE “% Youth%” )
    OR ( xxx_posts.post_title LIKE “Hockey”
    OR xxx_posts.post_title LIKE “Hockey%”
    OR xxx_posts.post_title LIKE “% Hockey%” )
    OR ( xxx_posts.post_title LIKE “Camps”
    OR xxx_posts.post_title LIKE “Camps%”
    OR xxx_posts.post_title LIKE “% Camps%” )
    OR ( xxx_posts.post_title LIKE “Clinics”
    OR xxx_posts.post_title LIKE “Clinics%”
    OR xxx_posts.post_title LIKE “% Clinics%” ))
    OR (xxx_posts.post_content LIKE “Youth Hockey Camps and Clinics”
    OR xxx_posts.post_content LIKE “Youth Hockey Camps and Clinics%”
    OR xxx_posts.post_content LIKE “% Youth Hockey Camps and Clinics%”
    OR xxx_posts.post_content LIKE “%>Youth Hockey Camps and Clinics%”
    OR xxx_posts.post_content LIKE “% Youth Hockey Camps and Clinics%”) )
    AND xxx_posts.post_type in (‘gd_place’)
    AND (xxx_posts.post_status = ‘publish’)
    AND latitude between 32.969435 and 34.708565
    AND longitude between -118.904105 and -116.810295
    AND FIND_IN_SET( ‘Indoor’, xxx_geodir_gd_place_detail.facility_type )
    AND FIND_IN_SET( ’34’, xxx_geodir_gd_place_detail.post_category )
    HAVING distance <= 60.000000
    ORDER BY distance, ( gd_titlematch * 2 + gd_exacttitle * 10 + gd_alltitlematch_part * 100 + gd_titlematch_part * 50 + gd_content * 1.5) DESC
    LIMIT 0, 10;

    #484536

    Guust
    Moderator
    Post count: 29970

    I get this message:

    “Forbidden
    You don’t have permission to access / on this server.”

    Can you check that?

    If we need to have a look at your settings, add your WP admin details in a private reply.

    Thanks

    #484540

    jkirker
    Lifetime Member
    Post count: 298
    This reply has been marked as private.
    #484549

    jkirker
    Lifetime Member
    Post count: 298
    This reply has been marked as private.
    #484580

    Guust
    Moderator
    Post count: 29970

    The search you are trying is to find a listing near the center of Anaheim in the category “Ice Skating Rink” that has all of the words “Youth Hockey Camps and Clinics” in the category, tag, description or title.

    There is one listing that has that exact tag, so it should come up:
    https://www.rinktime.com/rinks/united-states/california/anaheim/ice-skating-rink/the-rinks-anaheim-ice/

    I’ll get a developer to have a closer look.

    #484587

    jkirker
    Lifetime Member
    Post count: 298

    Hi Guust,

    The link you sent is not what I want…

    What I want is this:
    https://www.rinktime.com/rinksearch/?geodir_search=1&stype=gd_place&s=Youth+Hockey+Camps+and+Clinics&snear=anaheim+california&sfacility_type%5B%5D=Indoor&sgeo_lat=33.839&sgeo_lon=-117.8572

    But I want it to also include the post category: &spost_category%5B%5D=33

    It seems when &spost_category is included, other parts of the search are not. I’m not sure if this is by design.

    &spost_category%5B%5D=33 should show just ice skating rinks, vs. &spost_category%5B%5D=34 which shows just roller skating rinks. If &spost_category is not included, it should show all.

    In addition to that, I’m also curious to know why the geodir_search query (provided above) does not include searching/filgering for tags??

    #484600

    jkirker
    Lifetime Member
    Post count: 298
    This reply has been marked as private.
    #484609

    jkirker
    Lifetime Member
    Post count: 298
    This reply has been marked as private.
    #484652

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
Viewing 9 posts - 1 through 9 (of 9 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount