Hello,
I am still on the dev of my directory advocate site.
My client wants now that when the visitor search a town for advocate location
the result become now from 2 fields “Barreau” and “Ville” (“Ville“ is a repeatable group).
And this 2 fields return Towns name.
With Relevanssi I made searchable text for this 2 fields
In my search view I make a search field text but toolset returns as result
only the “Ville” field and not “Barreau” field
URL of the site : hidden link
For example when you type “Jura” is a “Barreau” location, toolset retours no result
Thanks for your help
Hello. Thank you for contacting the Toolset support.
You need to understand the thing that Barreau is the custom field that belongs to post Advocate and Ville is the field that belongs to the Repeating Field Group (which is maintained internally as relationship so all repeating field group entries will be a separate related post).
When you try to search within the repeating field group fields, you are displaying the parent post information using the item attribute. Something like the following shortcode:
I see also you set ordering setting to order by Ville field, so when you are searching in post field Barreau, the Ville field will not be available and hance the view's query will be failed to return any results.
The way you want to build the custom search is not supported as you want to search in both parent post field and repeating field group field.
Hi Minesh,
Ok ! and if I make the repeater group with “ville” field as a child the result will be the same I assume 🙁
The only solution to make a search on several fields is that these fields must belong to the same group of custom fields right ?
Best regards
Eric
Yes - as you are displaying the parent post information within the view that used to originally query the repeating field group, you need to add the Barreau field as the part of your repeating field group and then adjust the filters/query filters whatever required accordingly.
Hi Minesh,
ok ! So I put the field “Barreau” in the repeater field with the field “ville”. So I can make a search for this 2 field. I am right ??
Best regards
I put the “Barreau” field in the repeater group with the field “Villes”. Make the search text available for ville and barreau with Relevanssi. Make a text search in my view. But it doesn't work. Toolset give the result for the field “Ville” but not fpr the “Barreau“ it says that nothing is found 🙁
Thanks for your help
Just one more thing something doesn't work as expected
for example if I type “Lille”, toolset returns all the results that contains “Lille” in “ville“ field and “Barreau” field
But for example if I type “Tourcoing”, (the advocate works in “Tourcoing” and the “Barreau” is “Lille”), Toolset doesn't return all the advocate belonging in Lille but only the town. How can I achieve that ?
Thanks for your help
Not exactly. What I want is : If I type for example Tourcoing Toolset returns as result :
All the advocate that lives in Tourcoing -> Field : “Ville”
In this case Corinne Thullier but what is “missing” is all the advocate working in the same court (Lille)
An another example, if I type Roubaix Toolset returns as result : 4 advocates bu it is missing Corinne Thullier because she is working is Lille too.