jasehead Posted November 3, 2023 Share Posted November 3, 2023 Are the recent versions of CubeCart usable if we don't have a web host that supports Elasticsearch? Will future versions of CubeCart work across the board, or will all future updates be dependent on Elasticsearch? Does that mean that CubeCart merchants without access to Elasticsearch are stuck at 6.4.10? Will a non-elastic branch of CubeCart continue to be developed and updated, or at least security patched occasionally? To quote Al from 2017, considering adding Elasticsearch to CubeCart: Quote It will never happen because the vast majority of our merchants have generic shared web hosting which will never be compatible with ElasticSearch. We could integrate it but only for merchants who have there own dedicated server or VPS and are happy configuring ElasticSearch. Sadly this just doesn't fit our demographic and the development time required to implement this isn't worth while. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted November 3, 2023 Share Posted November 3, 2023 Quote Does that mean that CubeCart merchants without access to Elasticsearch are stuck at 6.4.10? Not at all. This of it as just an extra (awesome) feature. Please upgrade to the latest version still there are a bunch of other bug fixes and smaller feature updates. Quote Link to comment Share on other sites More sharing options...
sack123 Posted November 11, 2023 Share Posted November 11, 2023 Here in Setting > Advanceed > Elasticsearch, it is not allowed to add index name. If I saved by checking box, it gives highlighter. "A unique index name is required" I tried 6.5.2 and 6.5.3 as well. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted November 11, 2023 Share Posted November 11, 2023 Do you have an ES server? Quote Link to comment Share on other sites More sharing options...
sack123 Posted December 1, 2023 Share Posted December 1, 2023 Yes, ES Application is installed. If I checked box on enable and save then it uncheck automatically. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted December 1, 2023 Share Posted December 1, 2023 Try setting the values in the includes/global.inc.php file (in most cases the last two can be ignored): $glob['es_h'] = ''; // Elasticsearch host e.g. https://localhost:9200 $glob['es_u'] = ''; // Elasticserch username $glob['es_p'] = ''; // Elasticsearch password $glob['es_i'] = ''; // Elasticsearch index name $glob['es_v'] = ''; // Elasticsearch vertificate validation enum('1','0') $glob['es_c'] = ''; // Elasticsearch certificate path Quote Link to comment Share on other sites More sharing options...
sack123 Posted December 1, 2023 Share Posted December 1, 2023 Is the value same as database host name, username , password and specially index name ? Quote Link to comment Share on other sites More sharing options...
bsmither Posted December 1, 2023 Share Posted December 1, 2023 I would think not. What you refer to is the access credentials to the MySQL database server. The mentioned $glob array elements for ElasticSearch would/should be different. If your site is hosted, and your host gives you a site management tool (such as CPanel), and if ElasticSearch is installed by your host, the access credentials to the MySQL database and ElasticSearch engine should have been emailed to you in your new subscriber "Welcome" notice, or, at least, these connection details would be shown somewhere in the management tool. Quote Link to comment Share on other sites More sharing options...
sack123 Posted December 1, 2023 Share Posted December 1, 2023 I am using cyberpanel. In that manage, elastisearch is application, can be install and remove. When I set $glob['es_h'] = 'localhost:9200'; it able to select enable check box. username, password and index name I sed from the global $glob['dbdatabase'] similarly... In maintainance -> elasticsearch tab, it shouws the count and size, But can not see result on search box. Is there any way/command to know this ES engine credential from the root access ? Quote Link to comment Share on other sites More sharing options...
bsmither Posted December 1, 2023 Share Posted December 1, 2023 Sorry, I would not know. We will need to wait for Al or HavenSwift to advise. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted December 2, 2023 Share Posted December 2, 2023 Add these fields to the includes/global.inc.php file with correct values. Please note that your skin may need changes if you are not using the default Foundation theme. $glob['es_h'] = ''; // Elasticsearch host e.g. https://localhost:9200 $glob['es_u'] = ''; // Elasticserch username $glob['es_p'] = ''; // Elasticsearch password $glob['es_i'] = ''; // Elasticsearch index name $glob['es_v'] = ''; // Elasticsearch vertificate validation enum('1','0') $glob['es_c'] = ''; // Elasticsearch certificate path The last two fields can probably remain empty. Quote Link to comment Share on other sites More sharing options...
sack123 Posted December 2, 2023 Share Posted December 2, 2023 Great! Thank you very much. It is working, I used the database credential and host localhost:9200. In the search box, to get the drop down list product, need to use mouse cursor. Can we add keyboard up,down to reach to the downward list instead of mouse cursor. Even after click outside of the search box, ES search dropdown list wont disappear. Need to used ESC key. It would be good idea to add one click functionality to clear search dropdown list like ESC key. 1 Quote Link to comment Share on other sites More sharing options...
bsmither Posted December 3, 2023 Share Posted December 3, 2023 (edited) That's my question: where does the index name come from? Is it auto-generated the first time ElasticSearch builds the index? Does the hosting provider assign it? sack123, where did you get the value for 'es_i'? (Note: The forum will not let me use the '@' notifier -- it refuses to allow a post that was edited to use it get re-saved. I hope you see this.) Edited December 3, 2023 by bsmither Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted December 3, 2023 Share Posted December 3, 2023 I use Kibana to manage this. Create a user and pass. Assign a role to this user for all privileges on a specific index name. I've not done it for a while so I might create the role first then the account and password. Quote Link to comment Share on other sites More sharing options...
sack123 Posted December 7, 2023 Share Posted December 7, 2023 bsmither, I used it same from global.inc.php -> $glob['dbdatabase'] = ' **** '. ES works fine now. But if I type keyword in search box and click on search buttom, it gives results, where some of them even dont have that keyword in title. Any idea, how to fix that ? Quote Link to comment Share on other sites More sharing options...
bsmither Posted December 7, 2023 Share Posted December 7, 2023 (edited) Unfortunately, sometimes, the spooled debug data gets lost (at least for me). That means, sometimes, we cannot know, absolutely, what search phase was last used to get results. (I am tracing the execution to find out how and where the debug data gets lost.) The search phases are, in order: Elasticsearch, Fulltext, RLike, Like. However, an Elasticsearch query is coded to look in the 'name' ('title') and 'product_code', and if not using "Search as you type", the 'description' columns for the search term. Please verify that the search term might actually appear in the description. Also, Elasticsearch should have the capability, and might be configured to do so, to take a search term, then find its stem and lemma. (See Wikipedia.) As such, a 'hit' could contain words that have been expanded from the lemma. An example: search broken to get hits with break (this is the lemma), breaking, and broke. And then, if the search phase actually gets to Like, verify that the search term might actually be just a part of a bigger word. Edited December 7, 2023 by bsmither Quote Link to comment Share on other sites More sharing options...
sack123 Posted December 10, 2023 Share Posted December 10, 2023 Can we change default search functionality to search keyword from product description to title, product code and then product description ? Quote Link to comment Share on other sites More sharing options...
bsmither Posted December 10, 2023 Share Posted December 10, 2023 That would involve customizing too much of the search code. But, sure. But have you verified that the search hits that are returned do have the search term in the description? Quote Link to comment Share on other sites More sharing options...
sack123 Posted December 15, 2023 Share Posted December 15, 2023 Yes. for exmaple: if I type "keyw" in box and hit then it list number of products. When I check unrelated product then I found they "keyw" was there in the product description. Quote Link to comment Share on other sites More sharing options...
bsmither Posted December 15, 2023 Share Posted December 15, 2023 Ok, then how is it you want the results? If 'keyw' appears in the Name and/or Product Code, regardless if it appears in the Description, it will be in the list of hits. You said if nothing was found in the Name or Product Code, then look in the Description. So, what is the difference? Would there be a difference in how the hits are listed? Quote Link to comment Share on other sites More sharing options...
sack123 Posted December 17, 2023 Share Posted December 17, 2023 Where can I see the list of hits ? When i type keywords and entered, the product list appear should contain title Name and/or Product Code. Description could be ignorred. Quote Link to comment Share on other sites More sharing options...
bsmither Posted December 17, 2023 Share Posted December 17, 2023 "Where can I see the list of hits?" The page that shows a grid of product panels for search results is the 'hits'. "The product list appear should contain title Name and/or Product Code." The list will always contain the name. To inhibit looking in the 'description' column for search terms, make these edits: In /classes/elasticsearchhandler.class.php, near line 255, from: $should = array_merge($should, [['match' => ['description' => $q]]]); To: // $should = array_merge($should, [['match' => ['description' => $q]]]); In /classes/catalogue.class.php, near line 1990, from: $indexes = $GLOBALS['db']->getFulltextIndex('CubeCart_inventory', 'I'); To: $indexes = $GLOBALS['db']->getFulltextIndex('CubeCart_inventory', 'I'); unset($indexes['description']); Near line 2087, from: $like = " AND (I.name ".$like_keyword." '".$regexp."' OR I.description ".$like_keyword." '".$regexp_desc."' OR I.product_code ".$like_keyword." '".$regexp."')"; To: $like = " AND (I.name ".$like_keyword." '".$regexp."' OR I.product_code ".$like_keyword." '".$regexp."')"; Quote Link to comment Share on other sites More sharing options...
coldbluts Posted April 15 Share Posted April 15 What you refer to is the access credentials to the MySQL database server. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.