• Resolved JohnLauber

    (@johnlauber)


    I have question regarding how the SQL is getting built in the Admin search by SKU. When I search by SKU on the product page (using FacetWP also, btw), in general I get the correct products. When I do that on the Admin page, however, I get no or mixed result. Certainly not all results. I noticed in the SQL query generated (link here: https://pastebin.com/wvU29uV2) that there’s an added

    “AND relevanssi.doc IN (19844,19846,0,0)” in the query. When I remove that in phpMyAdmin it works correctly. How do I get rid of that part of the query in the Admin?

    Also, when I search for SKU partial ‘590’ I get results on the front end, but when I use ’59’ partial I get no results. Do you know why?

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mikko Saari

    (@msaari)

    There’s only one place in Relevanssi that can generate something like AND relevanssi.doc IN (19844,19846,0,0) and that’s where Relevanssi handles the p, page_id, and post__in parameters. Is your query including one of these for some reason?

    I don’t know why the partial search for two characters doesn’t work; it should. Try without FacetWP to rule out any possible conflicts there.

    Thread Starter JohnLauber

    (@johnlauber)

    Not included by me. I’m looking at products in WP Admin and just put a partial search and I’m adding those parameters. So not sure how they’re getting generated in the backend. FacetWP shouldn’t be relevant on the backend, correct.

    Plugin Author Mikko Saari

    (@msaari)

    The product search in WP admin does not work very well; often it just doesn’t use Relevanssi, no matter what. So I give no guarantee that it works. If you try the Relevanssi admin search (Dashboard > Admin search), does that work any better?

    Thread Starter JohnLauber

    (@johnlauber)

    Yes, that works correctly, every time. Thank you.

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

The topic ‘Search By SKU (Admin)’ is closed to new replies.