We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Simple Search is not searching grid fields

Development and Programming

Shawn Holman's avatar
Shawn Holman
2 posts
4 years ago
Shawn Holman's avatar Shawn Holman

Hey,

I have a channel with a Grid field called Authors. For some reason, I am unable to search these grid fields using a simple search. Other custom fields, that I have set to “searchable” DO work. It’s only the given grid field. I am using expression engine 5.3.2 which I believe is the latest release.

My search for code is below. Note that I do have “search_in=”everywhere” and ‘where=”any”’

{exp:search:simple_form
             channel="Publication"
                search_in="everywhere"
                where="any"
                result_page="publication/searches" 
                no_result_page="publication/noresults" 
                form_id="search_form" 
                name="search_form" 
                error_handling="inline" 
                results="15"} 
              <div class="col">
                  <div class="row p-2">
                      <div class="form-group">
                          <input type="text" name="keywords" id="keywords" placeholder="Search..." class="form-control"
                              value="" size="30" maxlength="100">
                          <input type="submit" id="searchBtn" value="Search" class="btn btn-secondary ml-1 mr-3" disabled>
                      </div>
                  </div>
              </div>
            {/exp:search:simple_form}

Any idea how to get these grid fields to be searched? Or do I have to create a hidden field with these names in a text field?

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
4 years ago
Robin Sowell's avatar Robin Sowell

Can you do this- you’re sure the field is set to searchable- correct? If so, go edit one of the entries and make a minor change in the grid field. Then do a test search that 100% should pull back due to content in the grid field.

Does it?

       
Shawn Holman's avatar
Shawn Holman
2 posts
4 years ago
Shawn Holman's avatar Shawn Holman

Hey Robin!

I have made sure that the channel field is searchable as I did with the other fields! 😊

I’ve also added a test entry to try and see if I could search the authors, and I was unable to. Making a change on the grid field also does not end up getting that channel entry to be searched.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.