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.