All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

No results show, until a page refresh

mike 15 Oct 2019 20:01 problem, active

The search I created almost works. You put in a mix of keywords and categories... and it directs you to the results page. Sometimes though, I get a "no results found" message. But if I refresh that exact page, they will appear.

Replies

  1. Low 16 Oct 2019 08:35

    What version of EE and LS are you using?
    Can you make sure Dynamic Channel Query Caching is turned off?
    What is the URL for such a no-results page?
    Can you enable the Template Debugger and copy/paste its contents here for such a page?

  2. mike 16 Oct 2019 12:46

    EE 4.3.8 (we've had to do a server upgrade to prepare for 5, which is complete, but I was hoping to complete the search bug fix before upgrading)

    Low Search: 6.1.3

    ***

    Dynamic Channel Query Caching is already turned off

    ***

    https://utkdev.utk.edu/history/filter...

    (if you refresh multiple times, you'll see the results appear and reappear. you can try a new search by clicking in the upper right)

    **

  3. Low 16 Oct 2019 13:02

    Can you enable the Template Debugger and copy/paste its contents here for such a page?

    Also, do you have any caching enabled on that page?

  4. mike 16 Oct 2019 13:44

    Caching was the first thing I thought of, I have disabled caching on the templates and all the includes.

    I've enabled the Template Debugger. Where do I get the contents?

  5. Low 16 Oct 2019 17:55

    When logged in as Super Admin, you should be able to see the template debugger on the bottom of the page.

  6. mike 16 Oct 2019 18:12

    Hate to be dense, but a lot of info there. Is there a specific query you're looking for? Doing a find on the page, I do not see anything having to do with Low Search.

  7. Low 16 Oct 2019 18:14

    Click the tab Templates and look up all lines that mention Low Search (or low_search), or just copy/paste the whole list.

  8. mike 16 Oct 2019 18:52

    Oh no. Not seeing it. Maybe I'm in the wrong place.

  9. Low 16 Oct 2019 19:00

    Yeah, you're in the CP. You need to be logged in as Super Admin (in the CP) and then visit the front-end of the site, like https://utkdev.utk.edu/history/filter...

    Then you'll see the template debugger there, with the Templates tab.

  10. mike 16 Oct 2019 19:04

    0.000012 / 1.9MB - Begin Template Processing -
    0.000038 / 1.9MB - Beginning Page Cache Garbage Collection -
    0.000088 / 1.9MB - End Page Cache Garbage Collection -
    0.000207 / 1.9MB URI: history/filter/eyJyZXN1bHRfcGFnZSI6Imhpc3RvcnlcL2ZpbHRlciIsImtleXdvcmRzIjoiYXlyZXMiLCJjYXRlZ29yeTppbmR1c3RyeSI6IjEzN3wxMzl8MTQxIn0
    0.000212 / 1.9MB Template: /
    0.001538 / 1.9MB Template Group Found: history
    0.002087 / 1.9MB Retrieving Template from Database: history/filter
    0.004436 / 2.0MB Calling Extension Class/Method: Stash_ext/template_fetch_template
    0.004517 / 2.0MB Template Type: webpage
    0.004530 / 2.0MB Parsing Site Variables
    0.004668 / 2.0MB Config Assignments & Template Partials
    0.004820 / 2.0MB Parse Current Time Variables
    0.004868 / 2.0MB Parsing Segment, Embed, Layout, logged_in_*, and Global Vars Conditionals
    0.007289 / 2.1MB - Beginning Tag Processing -
    0.007298 / 2.1MB Detecting Tags in Template
    0.007419 / 2.1MB Running Tags
    0.008149 / 2.1MB Calling Tag: {exp:low_search:filters query="eyJyZXN1bHRfcGFnZSI6Imhpc3RvcnlcL2ZpbHRlciIsImtleXdvcmRzIjoiYXlyZXMiLCJjYXRlZ29yeTppbmR1c3RyeSI6IjEzN3wxMzl8MTQxIn0" disable="categories|custom_fields|member_data|pagination"}
    0.009493 / 2.3MB -> Data Returned
    0.009707 / 2.3MB Calling Tag: {exp:low_search:results query="eyJyZXN1bHRfcGFnZSI6Imhpc3RvcnlcL2ZpbHRlciIsImtleXdvcmRzIjoiYXlyZXMiLCJjYXRlZ29yeTppbmR1c3RyeSI6IjEzN3wxMzl8MTQxIn0" channel="history" orderby="timeline_start_year" sort="asc" keywords:lang="en" keywords:inflect="yes" limit="10" disable="member_data"}
    0.010395 / 2.4MB Low Search: Applying Low_search_filter_categories
    0.012510 / 2.4MB Low Search: Applying Low_search_filter_keywords
    0.012960 / 2.4MB Low Search: Extending keywords with inflections
    0.013515 / 2.4MB Low Search: Keywords: ayres ayre
    0.013612 / 2.4MB Low Search: Starting search (fulltext)
    0.014247 / 2.4MB Low Search: Searched but found nothing
    0.014262 / 2.4MB Low Search: Filters found no matches, returning no results
    0.014271 / 2.4MB Returning No Results Content
    0.014283 / 2.4MB -> Data Returned
    0.014314 / 2.3MB Detecting Tags in Template
    0.014384 / 2.3MB Running Tags
    0.014482 / 2.3MB Calling Tag: {exp:channel:categories show="137|139|141" channel="history" category_group="20" style="linear" backspace="2"}
    0.034970 / 8.8MB -> Data Returned
    0.035080 / 8.8MB Calling Tag: {exp:channel:categories show="" channel="history" category_group="15" style="linear" backspace="2"}
    0.036876 / 8.8MB -> Data Returned
    0.036887 / 8.8MB - End Tag Processing -
    0.036892 / 8.8MB Processing Advanced Conditionals
    0.037163 / 8.8MB Processing Layout Templates
    0.037213 / 8.8MB Retrieving Template from Database: history/_default
    0.038011 / 8.8MB Calling Extension Class/Method: Stash_ext/template_fetch_template
    0.038042 / 8.8MB Template Type: webpage
    0.038053 / 8.8MB Parsing Site Variables
    0.038110 / 8.8MB Config Assignments & Template Partials
    0.038258 / 8.8MB layout Variables: (show more)
    0.038306 / 8.8MB Parse Current Time Variables
    0.038347 / 8.8MB Parsing Segment, Embed, Layout, logged_in_*, and Global Vars Conditionals
    0.038888 / 8.8MB - Beginning Tag Processing -
    0.038895 / 8.8MB - End Tag Processing -
    0.038897 / 8.8MB Processing Advanced Conditionals
    0.039224 / 8.8MB Calling Extension Class/Method: Stash_ext/template_post_parse
    0.039268 / 8.8MB - Processing Sub Templates (Depth: 2) -
    0.039273 / 8.8MB List of Embeds: history/_header,history/_inc_moretoexplore,history/_footer
    0.039285 / 8.8MB Processing Sub Template: history/_header
    0.039288 / 8.8MB Retrieving Template from Database: history/_header
    0.040073 / 8.8MB Calling Extension Class/Method: Stash_ext/template_fetch_template
    0.040097 / 8.8MB Template Type: webpage
    0.040103 / 8.8MB Parsing Site Variables
    0.040148 / 8.8MB Config Assignments & Template Partials
    0.040194 / 8.8MB Parse Current Time Variables
    0.040209 / 8.8MB Parsing Segment, Embed, Layout, logged_in_*, and Global Vars Conditionals
    0.040380 / 8.8MB - Beginning Tag Processing -
    0.040386 / 8.8MB Detecting Tags in Template
    0.040426 / 8.8MB Running Tags
    0.040503 / 8.8MB Calling Tag: {exp:channel:entries channel="history" limit="1" orderby="timeline_start_year" status="open" sort="asc"}
    0.055014 / 9.6MB Calling Extension Class/Method: Low_alphabet_ext/channel_entries_query_result
    0.055199 / 9.6MB Calling Extension Class/Method: Low_search_ext/channel_entries_query_result
    0.064731 / 9.9MB -> Data Returned
    0.064741 / 9.9MB - End Tag Processing -
    0.064816 / 9.8MB Calling Extension Class/Method: Stash_ext/template_post_parse
    0.064857 / 9.8MB Processing Sub Template: history/_inc_moretoexplore
    0.064863 / 9.8MB Retrieving Template from Database: history/_inc_moretoexplore
    0.065657 / 9.8MB Calling Extension Class/Method: Stash_ext/template_fetch_template
    0.065683 / 9.8MB Template Type: webpage
    0.065691 / 9.8MB Smart Static Parsing Triggered
    0.065742 / 9.8MB Calling Extension Class/Method: Stash_ext/template_post_parse
    0.065772 / 9.8MB Processing Sub Template: history/_footer
    0.065777 / 9.8MB Retrieving Template from Database: history/_footer
    0.066512 / 9.8MB Calling Extension Class/Method: Stash_ext/template_fetch_template
    0.066539 / 9.8MB Template Type: webpage
    0.066548 / 9.8MB Parsing Site Variables
    0.066620 / 9.9MB Config Assignments & Template Partials
    0.066728 / 9.9MB Parse Current Time Variables
    0.066753 / 9.9MB Parsing Segment, Embed, Layout, logged_in_*, and Global Vars Conditionals
    0.066903 / 9.9MB - Beginning Tag Processing -
    0.066906 / 9.9MB - End Tag Processing -
    0.066969 / 9.9MB Calling Extension Class/Method: Stash_ext/template_post_parse
    0.067063 / 9.8MB Calling Extension Class/Method: Stash_ext/template_post_parse
    0.067121 / 9.8MB Stash: batch processing queued queries
    0.067135 / 9.8MB - End Template Processing -
    0.067136 / 9.8MB Parse Global Variables
    0.069373 / 9.9MB Template Parsing Finished

  11. Low 16 Oct 2019 19:07

    Okay, I'll need to take a look myself. Please send SuperAdmin login credentials to hi at gotolow dot com if you can.

  12. mike 16 Oct 2019 19:39

    Is there another way? Any other ideas for me to try? Could it be a setting in the collections? A server side issue with PHP or anything?

  13. Low 17 Oct 2019 07:59

    That makes things cumbersome.

    I'd like to see the SQL query generated by LS for both the no results and has-results page, in the same debugger under Queries (specifically the one targeting the exp_low_search_indexes table).

    Also, I'd like to see the debugger for a page that does return results where the same keywords were given.

    Then I'd try and turn off the inflection rule to see if that makes a difference.

    It's most likely not a setting in the collections. If the same query sometimes returns results and sometimes returns no results, then it might be a MySQL problem, but not sure why.

  14. mike 17 Oct 2019 13:16

    SQL Query for page that returned results:

    '
    SELECT exp_low_search_indexes.entry_id, exp_low_search_indexes.collection_id, MATCH(exp_low_search_indexes.index_text) AGAINST('ayres ayre') AS 'score'
    FROM ('exp_low_search_indexes')
    WHERE 'exp_low_search_indexes'.'site_id' IN (1, 0)
    AND 'exp_low_search_indexes'.'entry_id' IN (4422, 4425)
    AND MATCH(index_text) AGAINST('+(ayres ayre)' IN BOOLEAN MODE)
    '
    ***

    SQL Query for no results:

    '
    SELECT exp_low_search_indexes.entry_id, exp_low_search_indexes.collection_id, MATCH(exp_low_search_indexes.index_text) AGAINST('ayres ayre') AS 'score'
    FROM ('exp_low_search_indexes')
    WHERE 'exp_low_search_indexes'.'site_id' IN (1, 0)
    AND 'exp_low_search_indexes'.'entry_id' IN (4422, 4425)
    AND MATCH(index_text) AGAINST('+(ayres ayre)' IN BOOLEAN MODE)
    '

  15. mike 17 Oct 2019 13:53

    I set the exp:low_search:results query to keywords:lang="en" keywords:inflect="no"

    ***
    SQL for page that returned results:

    '
    SELECT exp_low_search_indexes.entry_id, exp_low_search_indexes.collection_id, MATCH(exp_low_search_indexes.index_text) AGAINST('ayres ayre') AS 'score'
    FROM ('exp_low_search_indexes')
    WHERE 'exp_low_search_indexes'.'site_id' IN (1, 0)
    AND 'exp_low_search_indexes'.'entry_id' IN (4419, 4422, 4425, 4428, 4431, 4434, 4437, 4440, 4443, 4446, 4449, 4452, 4455, 4458, 4464, 4467, 4470, 4473, 4842)
    AND MATCH(index_text) AGAINST('+(ayres ayre)' IN BOOLEAN MODE)
    '

    ***
    SQL for when it did not return results:

    '
    SELECT exp_low_search_indexes.entry_id, exp_low_search_indexes.collection_id, MATCH(exp_low_search_indexes.index_text) AGAINST('ayres ayre') AS 'score'
    FROM ('exp_low_search_indexes')
    WHERE 'exp_low_search_indexes'.'site_id' IN (1, 0)
    AND 'exp_low_search_indexes'.'entry_id' IN (4419, 4422, 4425, 4428, 4431, 4434, 4437, 4440, 4443, 4446, 4449, 4452, 4455, 4458, 4464, 4467, 4470, 4473, 4842)
    AND MATCH(index_text) AGAINST('+(ayres ayre)' IN BOOLEAN MODE)
    '

  16. Low 18 Oct 2019 12:30

    Those queries look identical. Can you confirm that you both get

    "Low Search: Searched but found nothing"

    for the no results, and the same query returns

    "Low Search: Returning entry IDs"

    when it does return results?

    If that is the case, what happens if you copy/paste the query directly into the SQL manager (or phpMyAdmin, or Sequel Pro)? Do you get intermittent results and no results, too?

  17. mike 18 Oct 2019 12:36

    They are identical, which is not surprising. To restate the problem, if you look at a results page and hit refresh a few times, you'll see that the results sometimes load, and sometimes not.
    https://utkdev.utk.edu/history/filter...

    But since it's the same template, etc, the queries remain. I'll look into the SQL manager.

  18. Low 18 Oct 2019 12:45

    Yes, I can see that behaviour. The point is, is MySQL sometimes returning results and sometimes no results for the same query. If that's the case, then it's looking like some sort of issue within MySQL, as LS just takes what it has been given by MySQL.

  19. mike 24 Oct 2019 21:01

    From our sys-admin:

    The exp_low_search_engines table was created as a MyISAM table instead of an
    InnoDB table. MyISAM is a non-transactional storage engine and thus inherently
    incapable of replication. This means that for this table only, you will get a
    different version of the content in a transient manner depending on which actual
    database server the mysql proxy is pointing at.

    This most likely happened because the table was imported from a non-clustered
    database environment where the storage engine wouldn't have mattered, and where
    the default storage engine behavior was different than in the MariaDB cluster.
    Assuming this explanation is correct, my recommendation would be to find where
    you originally imported the database and change the storage engine to InnoDB and
    then redo the import. If you're using a plain .sql dump file, this will be easy
    because the storage engine will be spelled out in the sql statements. You'll
    also want to make sure everyone who is importing into the database is using
    InnoDB by default.

    If it somehow turns out that ExpressionEngine is actually explicitly creating a
    MyISAM table with its own code in the dev environment directly, that's really an
    error in the CMS code. In this case I would contact the developer and ask them
    to never use MyISAM tables, but in the meantime we'd want to identify which
    instance of the database has a good copy of the table, export that, change the
    storage engine to InnoDB, drop the table from all databases in the cluster, and
    re-import. Once the database already exists, we shouldn't encounter the code
    needed to create it unless the table is dropped again, so the storage engine
    shouldn't change.

  20. Low 25 Oct 2019 11:26

    When Low Search was built, MySQL didn't support using full-text functions on InnoDB indexed tables, which is why LS explicitly set the engine to MyISAM. To make sure it always works, I kept that in.

    You can, of course, change the engine of the table to InnoDB if your MySQL installation supports full-text on it (from MySQL 5.6 and up).