• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 4.x Series
    • Bug
    • Enhanced search breaks when excluding Wiki content-types.

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Enhanced search breaks when excluding Wiki content-types.

    • Issue Tools
      • View Changes
    1. issueid=6355 November 1, 2022 2:46 AM
      mazzly mazzly is offline
      Junior Member
      Enhanced search breaks when excluding Wiki content-types.

      Our search stopped working recently, I tracked the error down to having disabled some types under "Exclude content-types from generic search results"

      Code:
      XFES\Elasticsearch\RequestException: Elasticsearch error: [21:29] [terms_lookup] unknown field [21] DSL:{"sort":["_score",{"date":"desc"}],"docvalue_fields":["discussion_id","user","date"],"_source":false,"size":"100","query":{"bool":{"must_not":[{"terms":{"vwtype":{"21":21,"29":29,"32":32}}},{"term":{"node":68}}],"must":[{"function_score":{"query":{"simple_query_string":{"query":"test","fields":["title","message"],"default_operator":"and"}},"functions":[{"exp":{"date":{"origin":1667283118,"decay":0.5,"scale":31536000}}}]}}]}}} src/addons/XFES/Elasticsearch/Api.php:410
      Generated by: mazzly Nov 1, 2022 at 8:11 AM
      Stack trace
      #0 src/addons/XFES/Elasticsearch/Api.php(331): XFES\Elasticsearch\Api->request('get', 'ttfcluster/_sea...', '{
          "sort": [...')
      #1 src/addons/XFES/Elasticsearch/Api.php(234): XFES\Elasticsearch\Api->requestFromIndex('get', '_search', Array)
      #2 src/addons/SV/SearchImprovements/XFES/Elasticsearch/Api.php(33): XFES\Elasticsearch\Api->search(Array)
      #3 src/addons/XFES/Search/Source/Elasticsearch.php(748): SV\SearchImprovements\XFES\Elasticsearch\Api->search(Array)
      #4 src/addons/XFES/Search/Source/Elasticsearch.php(144): XFES\Search\Source\Elasticsearch->executeSearch(Object(SV\SearchImprovements\XF\Search\Query\KeywordQuery), Array, '100')
      #5 src/XF/Search/Search.php(183): XFES\Search\Source\Elasticsearch->search(Object(SV\SearchImprovements\XF\Search\Query\KeywordQuery), '100')
      #6 src/XF/Search/Search.php(212): XF\Search\Search->XF\Search\{closure}(Object(SV\SearchImprovements\XF\Search\Query\KeywordQuery), '100')
      #7 src/XF/Search/Search.php(179): XF\Search\Search->executeSearch(Object(SV\SearchImprovements\XF\Search\Query\KeywordQuery), '100', Object(Closure), true)
      #8 src/XF/Repository/Search.php(34): XF\Search\Search->search(Object(SV\SearchImprovements\XF\Search\Query\KeywordQuery))
      #9 src/XF/Pub/Controller/Search.php(430): XF\Repository\Search->runSearch(Object(SV\SearchImprovements\XF\Search\Query\KeywordQuery), Array, true)
      #10 src/XF/Pub/Controller/Search.php(117): XF\Pub\Controller\Search->runSearch(Object(SV\SearchImprovements\XF\Search\Query\KeywordQuery), Array)
      #11 src/addons/SV/SearchImprovements/XF/Pub/Controller/Search.php(71): XF\Pub\Controller\Search->actionSearch()
      #12 src/XF/Mvc/Dispatcher.php(350): SV\SearchImprovements\XF\Pub\Controller\Search->actionSearch(Object(XF\Mvc\ParameterBag))
      #13 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Search', 'Search', Object(XF\Mvc\RouteMatch), Object(SV\SearchImprovements\XF\Pub\Controller\Search), NULL)
      #14 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\SearchImprovements\XF\Pub\Controller\Search), NULL)
      #15 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
      #16 src/XF/App.php(2337): XF\Mvc\Dispatcher->run()
      #17 src/XF.php(488): XF\App->run()
      #18 index.php(20): XF::runApp('XF\\Pub\\App')
      #19 {main}
      Request state
      array(4) {
        ["url"] => string(14) "/search/search"
        ["referrer"] => string(32) "https://www.....com/"
        ["_GET"] => array(1) {
          ["/search/search"] => string(0) ""
        }
        ["_POST"] => array(3) {
          ["keywords"] => string(4) "test"
          ["c"] => array(1) {
            ["users"] => string(0) ""
          }
          ["_xfToken"] => string(8) "********"
        }
      }
      I saw there was a thread about "search improvements" addon breaking things, so I tried disabling that also, but still problem:

      Code:
      XFES\Elasticsearch\RequestException: Elasticsearch error: [21:29] [terms_lookup] unknown field [21] src/addons/XFES/Elasticsearch/Api.php:410
      Generated by: mazzly Nov 1, 2022 at 8:41 AM
      Stack trace
      #0 src/addons/XFES/Elasticsearch/Api.php(331): XFES\Elasticsearch\Api->request('get', 'ttfcluster/_sea...', '{
          "sort": [...')
      #1 src/addons/XFES/Elasticsearch/Api.php(234): XFES\Elasticsearch\Api->requestFromIndex('get', '_search', Array)
      #2 src/addons/XFES/Search/Source/Elasticsearch.php(748): XFES\Elasticsearch\Api->search(Array)
      #3 src/addons/XFES/Search/Source/Elasticsearch.php(144): XFES\Search\Source\Elasticsearch->executeSearch(Object(XF\Search\Query\KeywordQuery), Array, '100')
      #4 src/XF/Search/Search.php(183): XFES\Search\Source\Elasticsearch->search(Object(XF\Search\Query\KeywordQuery), '100')
      #5 src/XF/Search/Search.php(212): XF\Search\Search->XF\Search\{closure}(Object(XF\Search\Query\KeywordQuery), '100')
      #6 src/XF/Search/Search.php(179): XF\Search\Search->executeSearch(Object(XF\Search\Query\KeywordQuery), '100', Object(Closure), true)
      #7 src/XF/Repository/Search.php(34): XF\Search\Search->search(Object(XF\Search\Query\KeywordQuery))
      #8 src/XF/Pub/Controller/Search.php(430): XF\Repository\Search->runSearch(Object(XF\Search\Query\KeywordQuery), Array, true)
      #9 src/XF/Pub/Controller/Search.php(117): XF\Pub\Controller\Search->runSearch(Object(XF\Search\Query\KeywordQuery), Array)
      #10 src/XF/Mvc/Dispatcher.php(350): XF\Pub\Controller\Search->actionSearch(Object(XF\Mvc\ParameterBag))
      #11 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Search', 'Search', Object(XF\Mvc\RouteMatch), Object(vw\vw\XF\Pub\Controller\Search), NULL)
      #12 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(vw\vw\XF\Pub\Controller\Search), NULL)
      #13 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
      #14 src/XF/App.php(2337): XF\Mvc\Dispatcher->run()
      #15 src/XF.php(488): XF\App->run()
      #16 index.php(20): XF::runApp('XF\\Pub\\App')
      #17 {main}
      Request state
      array(4) {
        ["url"] => string(14) "/search/search"
        ["referrer"] => string(45) "https://www......com/search/search"
        ["_GET"] => array(1) {
          ["/search/search"] => string(0) ""
        }
        ["_POST"] => array(3) {
          ["keywords"] => string(6) "awgwah"
          ["c"] => array(1) {
            ["users"] => string(0) ""
          }
          ["_xfToken"] => string(8) "********"
        }
      }
      Only thing that helps is to uncheck all boxes in "Exclude content-types from generic search results"
    Issue Details
    Issue Number 6355
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Search
    Status Fixed
    Priority 3 - Loss of Functionality
    Affected Version 4.1.5
    Fixed Version 4.1.6
    Milestone (none)
    Software DependencyXenForo 2.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. November 1, 2022 2:49 AM
      mazzly mazzly is offline
      Junior Member
      Further info:

      If I select only 1 box in "Exclude content-types from generic search results" it still works..
      If I select multiple boxes, the errors happen
      Reply Reply  
    2. November 1, 2022 1:16 PM
      pegasus pegasus is offline
      VaultWiki Team
      I don't have a copy of XFES right now, but judging by the fact that checking 1 box works, that probably means that the wiki-related search field is actually being processed, so it's not that the wiki fields aren't registered in XFES. By the error dump, it looks like it passes the search query as JSON, which may be interpreting the vwtype values array incorrectly as an object instead (which may account for it claiming the value is not a valid field). If that's the reason, then it may be simple to fix by modifying src/addons/vw/vw/XF/Pub/Controller/Search.php. Find:
      Code:
      $query->withMetadata($metadataKey, $metadataValues, 'none');
      BEFORE it, add:
      Code:
      					if (is_array($metadataValues))
      					{
      						$metadataValues = array_values($metadataValues);
      					}
      Remember to clear your PHP opcache. Please let me know if this change resolves the error.

      I believe you may have similar errors using Advanced Search but filtering by area or prefix. If the above change works, it tells me how to fix those too.
      Reply Reply  
    3. November 1, 2022 2:00 PM
      mazzly mazzly is offline
      Junior Member
      That seems to have done the trick :+1:
      Reply Reply  
    4. November 1, 2022 2:23 PM
      pegasus pegasus is offline
      VaultWiki Team
      Marking this as fixed in the next release.
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 3:04 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.