solved What exists before we add "additional search fields" in the search module?

researchcooperative
@researchcooperative
10 years ago
694 posts
When we look at jrSearch module in ACP, we can see a field for

"additional search fields"

Additional to what?

If we do not add any custom search fields, what will be searched?


--
PJ Matthews, Kyoto
Migrated from Ning 2.0. Now at Jamroom 6 beta and using Jamroom Hosting for The Research Cooperative (researchcooperative.org)

updated by @researchcooperative: 05/20/15 08:48:04AM
brian
@brian
10 years ago
10,149 posts
researchcooperative:
When we look at jrSearch module in ACP, we can see a field for

"additional search fields"

Additional to what?

If we do not add any custom search fields, what will be searched?

All modules have a set of default fields that can be searched - i.e.

audio_title
audio_description

These are "registered" by the module into the search system. The defaults for a module are basically anywhere there is text that can be searched.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
So, if i understand this...:
we go into our general Search module and we can add in the box "profile_location" if we want to include the member's location in a search on the general /profile page, right?

I remember adding profile_location into the index/tpl search code criteria via acp, so it included: profile_name,profile_url,profile_location . But I don't remember adding that profile_location into that big box in the Search Module itself. Now I see it's there. Did it get added automatically when I added the code to the profile index.tpl, or did I just not remember adding it also to the Search Module's additional fields box?
Do we have to add additional search fields in BOTH places? Or does adding it in one then automatically add it to the other location too? Thanks


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
researchcooperative
@researchcooperative
10 years ago
694 posts
For the profile module, the default fields are profile_image and profile_name. Only the latter has searchable text, so what counts for the default, site-wide jr search is the profile_name field (I presume).

To build a search box that digs into new fields added to a profile form, does it matter if the added profile fields are in the Create section or Settings section? I presume all that matters is the label given to the form field.

Why is the Settings section called Settings and not Update?

In the profile form design tool, it seems that new Create fields cannot be automatically added to the Settings fields, but we can give them the same name manually.... e.g. profile_country. But then the way profile_country is set up in the Create section may be different than the way it is set up in the Settings section, so the search system may not be seeing the same data each time. Does the Settings section overwrite the Create section in the same way as an Update form?

Is the "Settings" section effectively the same thing as an "Update" section, but without the option of automatically synchronising the two sections?

Thanks


--
PJ Matthews, Kyoto
Migrated from Ning 2.0. Now at Jamroom 6 beta and using Jamroom Hosting for The Research Cooperative (researchcooperative.org)

updated by @researchcooperative: 04/17/15 06:37:30PM
brian
@brian
10 years ago
10,149 posts
researchcooperative:
For the profile module, the default fields are profile_image and profile_name. Only the latter has searchable text, so what counts for the default, site-wide jr search is the profile_name field (I presume).

Actually the default is just the profile_name field.

Quote:
To build a search box that digs into new fields added to a profile form, does it matter if the added profile fields are in the Create section or Settings section? I presume all that matters is the label given to the form field.

All you have to do is put in the FIELD name you created when creating your custom form (i.e. "profile_interests") and it will be included in searches.

Quote:
Why is the Settings section called Settings and not Update?

Settings describes what the user is viewing - "Update" is ambiguous and an adjective so (IMO) would not be a good choice when a user wants to just view (and not update) their settings. "Save Changes" is the action the user would perform in the Settings section.

Quote:
In the profile form design tool, it seems that new Create fields cannot be automatically added to the Settings fields, but we can give them the same name manually.... e.g. profile_country. But then the way profile_country is set up in the Create section may be different than the way it is set up in the Settings section, so the search system may not be seeing the same data each time. Does the Settings section overwrite the Create section in the same way as an Update form?

If they are named the same they will BE the same field and contain the same info. When the user views their profile settings and updates the field, if the field name is the same as on the create form, then it will update that existing field.

Note that only ADMIN USERS see the "create" form (since normal users will create their profile as part of the signup) so you'll likely only want to customize the settings form.

Quote:
Is the "Settings" section effectively the same thing as an "Update" section, but without the option of automatically synchronising the two sections?

Thanks

Yes.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

updated by @brian: 04/19/15 07:22:51AM
researchcooperative
@researchcooperative
10 years ago
694 posts
Thanks for all that.

Clarity reigns on a raining grey day in Springtime Japan.


--
PJ Matthews, Kyoto
Migrated from Ning 2.0. Now at Jamroom 6 beta and using Jamroom Hosting for The Research Cooperative (researchcooperative.org)