ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Trouble with an ADVANCED SEARCH setup

February 11, 2011 11:54am

Subscribe [6]
  • #1 / Feb 11, 2011 11:54am

    genehil

    23 posts

    I am building a new EE website to replace our current EE website.  On this new website I have a biography page template set up with a “pre-loaded” search box embedded in it.

    The “pre-loaded” search box is there so that articles entered by each of my reporters can be listed by clicking the “GO” button when said template is displaying the biography of each of my reporters.

    I have one reporter who goes by the name of “J. Michael Brown”.  On his biography page the search box is “pre-loaded” with “J. Michael Brown” in it… but when I click the “GO” button - the search returns results of “Your search did not return any results.”

    If, in the “pre-loaded” search box, I shorten “J. Michael Brown” to just “Michael Brown” the correct articles for this particular reporter are returned as desited - but searching for “J. Michael Brown” returns no results.

    http://www.northwestfloridaonline.com/mbb2.0/index.php/site/biography/j._michael_brown/

    I have other reporters in the system whose “pre-loaded” search box works just fine and returns what they’re supposed to return. None of those reporters have initials in their names.

    Here are some of those bio pages:
    http://www.northwestfloridaonline.com/mbb2.0/index.php/site/biography/amy_hoyt/
    http://www.northwestfloridaonline.com/mbb2.0/index.php/site/biography/jerry_brown/
    http://www.northwestfloridaonline.com/mbb2.0/index.php/site/biography/jessica_foster/

    My problem is that my “pre-loaded” search box works on all my biography pages except for the one author who has an “initial” in his name (title).

    Below is my EE code for the “pre-loaded” search box:

    {exp:weblog:entries weblog="authors" limit="1"}
    {exp:search:advanced_form result_page="site/search_results" cat_style="nested" weblog="article" }
    <strong>List {title}'s Articles:</strong>
    
    
    <input type="text" maxlength="100" size="35" name="keywords" value="{title}"/>
    <input name="search_in" type="hidden" value="entries" />
    <input name="where" type="hidden" value="exact" />
    <input type='submit' value='Go' class='submit' />
    {/exp:search:advanced_form}
    {/exp:weblog:entries}

    Any thoughts?

  • #2 / Feb 11, 2011 1:33pm

    Sue Crocker

    26054 posts

    Hi, Gene.

    Can you tell us which version/build of EE1.x you’re using? See EEWiki:// HowTo Determine My EE Version

  • #3 / Feb 11, 2011 2:50pm

    genehil

    23 posts

    My version is 1.7.0

  • #4 / Feb 11, 2011 4:15pm

    Barry Cogan

    291 posts

    Hi Gene,

    Are you searching by exact match or all?
    I think we may have to do a bit of digging on this.
    My initial thought is that the less than three characters keyword is interfering with the search.

    Are you running any third party add ons?


    Best regards,
    Barry

  • #5 / Feb 12, 2011 12:22am

    genehil

    23 posts

    No third party ad ons…
    The search is set for exact match…

    Yep… I worked for several hours on this problem before raising my hand…  It may be one of those head scratchers.

  • #6 / Feb 12, 2011 5:22pm

    Greg Salt

    3988 posts

    Hi genehill,

    I’m afraid that I can’t replicate this on my local install. Does it work if you change the search type to ‘all’ instead of ‘exact’?

    Cheers

    Greg

  • #7 / Feb 12, 2011 6:09pm

    genehil

    23 posts

    Out of town this weekend Greg… Will check on Monday.  Thanks!

  • #8 / Feb 13, 2011 4:07pm

    Greg Salt

    3988 posts

    Hi genehill,

    Okay, please do let us know how you get on.

    Cheers

    Greg

  • #9 / Feb 15, 2011 5:10pm

    genehil

    23 posts

    My problem is also seen in my basic Search page… Not just the “pre-loaded” search box on in my bio template.

    Here is my basic “Search” page:
    http://www.northwestfloridaonline.com/mbb2.0/index.php/search/

    If I search Titles and Entries for “J. Michael Brown” using the “Exact Phrase Match” (Which is what my “pre-loaded” search box on the bio template is set up to do) I get—- Your search did not return any results.—-

    If I search Titles and Entries for “J. Michael Brown” using any of the other options (exact word, all words or any word) I get more items than I want to be returned…

    What I’m wanting to do is extract only those records that have the exact phrase “J. Michael Brown” in one of the Entries.

    The “Exact Phrase” search works well for all my other authors - Amy Hoyt or Jerry Brown or Jessica Foster or any of my other authors who do not have an Initial beginning their names.

  • #10 / Feb 16, 2011 1:33am

    John Henry Donovan

    12339 posts

    Gene ,

    Can you give the simple search form a go please?

    {exp:weblog:entries weblog="authors" limit="1"}
    {exp:search:simple_form weblog="news" result_page="site/search_results" weblog="article" search_in="entries" where="exact" status="not closed"}
    
    <label for="keywords">Search:</label>
    
    <input type="text" name="keywords" id="keywords" value="{title}" size="18" maxlength="100" /></p>
    
    <a href="http://{path=search/index}">Advanced Search</a>
    
    <input type="submit" value="submit" class="submit" /></p>
    
    {/exp:search:simple_form}
    {/exp:weblog:entries}
  • #11 / Feb 16, 2011 10:29am

    genehil

    23 posts

    No Luck John…

    Here is a test template for J. Michael Brown’s bio that has my current search box and your search box:
    http://www.northwestfloridaonline.com/mbb2.0/index.php/workspace_scratch_area/bio_search_test_page/j._michael_brown/

    Both return no results.

    Here is the same test template for another of my authors - Amy Hoyt.
    http://www.northwestfloridaonline.com/mbb2.0/index.php/workspace_scratch_area/bio_search_test_page/amy_hoyt/

    Both of her search boxes return the correct results.

  • #12 / Feb 16, 2011 5:09pm

    Ingmar

    29245 posts

    I think it might have to do with the period and/or the short word length. Wouldn’t simply searching for “Michael Brown” turn up the desired results?

  • #13 / Feb 16, 2011 11:01pm

    handyman

    509 posts

    If I may offer both a comment and a possible partial answer…....

    What I think has happened are the combination of various things. Without knowing it, most of us are getting very comfortable with very smart searching…that is, google and other such things have raised the bar considerably. They do things like guess what you are trying to find, fix mis-spellings and order results using fuzzy logic (human-like).....

    I know that I personally find my EE search results….less and less relevant, because they are using plain old - or barely improved, MySQL searching. In fact, as of late I have almost stopped using my own forum search because of poor returned results…..I prefer using a programmed google custom search…..

    Anyway, just a comment…..because in reality any of the searches posted above SHOULD (human interface models) return what you are looking for…that is, the correct author. But they don’t.

    I can’t speak too much to the programming needed for smarter and more fuzzy searching in EE or other php/mysql apps. I know a lot of people could use such a thing….and there are lots of discussions around the web about such things….

    I’m not even sure if this has been improved in 2.x….....or what add-ons (if any) can help with better results.

  • #14 / Feb 17, 2011 10:28am

    genehil

    23 posts

    I think it might have to do with the period and/or the short word length. Wouldn’t simply searching for “Michael Brown” turn up the desired results?

    It actually does Ingmar… but I’m establishing “what to search for” from the Title of a weblog entry… and I can’t change the reporter’s “Title” from J. Michael Brown to Michael Brown on his bio…

    That being said… I’m happy to figure out some sort of workaround.  I think I can use the “if” “if:else” “/if” arguments to get this box to search for Michael Brown instead of J. Michael Brown.  As long as we don’t pick up another reporter who “MUST” have an initial in his name, I should be OK.

    Thanks to all who looked into the for me!

  • #15 / Feb 17, 2011 4:05pm

    Ingmar

    29245 posts

    I am glad you have a workaround for now. We’ll continue to look into this as well, thanks.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases