Forum Replies Created

Viewing 4 replies - 16 through 19 (of 19 total)
  • Plugin Contributor sburdett

    (@sburdett)

    Also just out of curiosity, how come you convert all the index field name dashes to underscores?

    Plugin Contributor sburdett

    (@sburdett)

    You said you use this for more advanced searches at your company. Do you manually convert the WP-Queries to Lucene or is there a library for this? I have the system working for simple queries like:

    Array (
    [post_type] => custom
    [meta_query] => Array (
    [1] => Array (
    [key] => FOO
    [value] => BAR
    )
    )

    by converting the array to variables $key_type = ‘foo’; and $key = ‘bar’;

    However, I am having issues for more complex searches like:

    Array (
    [post_type] => custom
    [meta_query] => Array (
    [0] => Array (
    [key] => custom_key
    [compare] => EXISTS
    )
    [1] => Array (
    [key] => FOO
    [value] => BAR
    )
    [2] => Array (
    [key] => number
    [value] => Array (
    [0] => 4
    [1] => 6
    )
    [type] => numeric
    [compare] => BETWEEN
    )
    [3] => Array (
    [key] => number
    [compare] => NOT IN
    [value] => Array (
    [0] => [1] => None [2] => none
    )
    )
    [4] => Array (
    [key] => custom_key
    [value] => 2
    )

    [paged] => 1
    [posts_per_page] => 10
    [order] => DESC
    [post_status] => publish
    [orderby] => date
    )

    I guess I can write a custom decode but I thought maybe you had a better more inclusive option.

    • This reply was modified 6 years, 6 months ago by sburdett.
    Plugin Contributor sburdett

    (@sburdett)

    No worries just thought I would ask. I’m enjoying the challenge of integrating the plugin into our site which uses a custom search plugin. Great plugin, thanks!

    +1 Breaks checkout.min.js

Viewing 4 replies - 16 through 19 (of 19 total)