Support Forum
Support › MB Custom Table › best solution to search in custom tables, and post relationships, and native wpResolved
Hi!
I am looking to find a plugin that allows searching data built with Metabox, in particular I want the Custom Database Tables and MB Relationships in my search facets.
I saw you recommend SearchWP, which seems to allow searching in custom database table (and probably hence also in the MB Relationships?)
However, I am usually developing websites for non-coders, and they want a visual edit of the search facets and layout. SearchWP - while powerful - has zero "visual edit" mode for either search inputs (facets) or layout. So while I could code it, my clients would not be able to customise it.
Checking FacetWP, which seems to have nicer "user-friendly" edit and style GUI, does not seem to support custom database table.
WP Grid Builder, which would be the preferred one, does not support it at all.
Toolset, the second preferred search engine, as well is incapable of reading Custom Database Tables, or even any field from other plugins that is not bare simple text or number.
What is your suggestion?
It also needs to be somehow affordable, if I suggest a client to purchase Metabox, and FacetWP, and SearchWP, they won't have any funds left to pay my work 😆
Grateful for any input.
Hi,
FYI, FacetWP is also compatible with the custom table to create a filter that searches the field's value in the custom table. Refer to this topic: https://support.metabox.io/topic/facetwp-custom-table/.
But for the sub-fields inside a group, you need to use the SearchWP to search for sub-fields value. Follow this article https://metabox.io/searchwp-metabox-integration/.
That sounds great, thanks!
As for importing data, are there suggested ways to import content (like post and postmeta) but to Custom Tables?
Or would I have to custom code some importer in this case?
Also I read in that other post, the Maps/Google field cannot be searched by FacetWP?
I will test this, but just asking in case things changed meanwhile.
Thanks!
Hi,
The extension MB Custom Table has not supported to store whole a post object to a custom table yet. We are trying to create a new update to support it.
To export/import the data in the custom table, I think the simple way is to use the option export/import of phpMyAdmin. Or use the plugin WP All Import and follow this topic https://wordpress.org/support/topic/import-to-custom-table/.
Regarding the filter map by Facet, it has not worked. I've created a feature request to the developer team to cover this case.
Excellent thanks!
For anyone findings this - with WP Grid Builder (and probably all other plugins creating index) you can query these fields easily.
You just need to use the respective APIs to build the index, using the rwmb_get_value or rwmb_meta like in this example (for WP Grid Builder):
$row['facet_value'] = rwmb_meta( 'meta_field_slug', '', $object_id );
This also works for the map field, as long we match the Facet plugin expectations when building the index.
This works for all kind of fields, since actually those indexes do not expect real existing data, we could even pass fake data to it.
Thanks!
Sorry support team for posting here but I can not send a private message to Beda!
Hi Beda! Could you please share the full version of the WP Grid Builder facet to work with Metabox Custom Table? I used only the graphic interface and don't know how to apply your code into it.
Also do you know how to make the OSM / GoogleMaps field of Metabox (doesn't need Custom Table) to work with WP Grid Builder Map? I tried to use directly but it didn't work because the data structure is different.
Thank you in advance.