Forum Replies Created
-
prakashreddy.imduriParticipant4 years ago in reply to: how to set word variations #31385
Okay, Can we add synonyms to existing index, or new index with synonyms must be created ?
Here, after adding my synonyms file in location [/analysis/synonym.txt], If I run this same command, it will be linked to existing index right ? without any data loss in the index.

- This reply was modified 4 years ago by prakashreddy.imduri.
prakashreddy.imduriParticipant4 years ago in reply to: how to set word variations #31383Okay. This synonym.txt file should be maintained in server side, or it will be inside plugin only. In case of elastic index, do we need to do anything with schema.xml, when I checked the plugin, I found multiple schema.xml file.
I am checking if we can keep synonym file in plugin, so that I can update frequently without having to push this to server.prakashreddy.imduriParticipant4 years ago in reply to: Boost Search on Taxonomy Pages #31381Like this ?
use wpsolr\core\classes\engines\WPSOLR_AbstractSearchClient; use wpsolr\core\classes\WPSOLR_Events; add_filter( WPSOLR_Events::WPSOLR_FILTER_DEFAULT_SORT, 'wpsolr_filter_default_sort', 10, 2 ); /** * Apply specific default search on front * @param string $default_sort * @return string */ function wpsolr_filter_default_sort( string $default_sort ) { return ($_GET['s'] === '') ? 'publication_date_str_desc' : WPSOLR_AbstractSearchClient::SORT_CODE_BY_RELEVANCY_DESC; }prakashreddy.imduriParticipant4 years ago in reply to: how to set word variations #31379As you mentioned to use : You should use the synonym graph filter.
I checked out this link : /manage-elasticsearch-and-solr-analyser-configuration-files/,
We are using Elastic index, is this still applicable to us ?
it has 2 parts: one for elastic search and another for Solr, Can I skip the second part.
We updated the schema and synonyms.txt file, still didnt see any changes related to synonyms, do we need to do those configuration changes mentioned in part 1 or 2 ?- This reply was modified 4 years ago by prakashreddy.imduri.
prakashreddy.imduriParticipant4 years ago in reply to: Boost Search on Taxonomy Pages #31377Tried this but getting error;
Fatal error: Uncaught TypeError: Argument 2 passed to wpsolr_filter_default_sort() must be an instance of WPSOLR_Query, instance of wpsolr\core\classes\ui\WPSOLR_Query given, called in /code/wp-includes/class-wp-hook.phpprakashreddy.imduriParticipant4 years ago in reply to: Boost Search on Taxonomy Pages #31375Hi,
Can we have something like this ? or any action/hook to achieve this?
We want to show fresh products in search homepage and, when user searches some query, we want to show results by relevancy.public function get_first_sort_by_default() { if ($_GET['s'] == '') { return 'publication_date_str_desc'; // sort by acf field, which is availaible in sort filter } else { return $this->get_option_value( true, __FUNCTION__, self::OPTION_SORTBY, self::OPTION_SORTBY_ITEM_DEFAULT_FIRST, WPSOLR_SearchSolariumClient::SORT_CODE_BY_RELEVANCY_DESC ); } }prakashreddy.imduriParticipant4 years ago in reply to: how to set word variations #31373We have different schema.xml, in which file, this needs to be added ?
prakashreddy.imduriParticipant4 years ago in reply to: Exact matches vs any word matches #31369I have same kind of requirement, I added copyfields, and also used this function
use Solarium\QueryType\Select\Query\Query;add_action( WPSOLR_Events::WPSOLR_ACTION_SOLARIUM_QUERY, [$this, ‘wpsolr_action_query’,], 10, 1 );
I am getting error for using $this,
“Uncaught Error: Using $this when not in object context”
Can you tell me how exactly to use this, as you specified to use this in custom class.. Can you elaborate more.prakashreddy.imduriParticipant4 years ago in reply to: Boost Search on Taxonomy Pages #31368Okay, I sorted the results by relevancy, and added title with more priority than content, does this plugin work in this way : it will check for most words matching in different products, and ranks the product which has most matches in title and content ?
Bcos the results which I am seeing, has empty content, but still its ranks 1st, the second product has more matching keywords in title and description. Can you provide some info on this, or how to achieve this.prakashreddy.imduriParticipant4 years ago in reply to: how to set word variations #31366I have uncommented this line in schema.xml,

also added an example synonym mapping in synonys.txt

and reindexed all data. Anything more needed to make this work ?
I tried to search for post having title limited, but it should also search for title containing ‘limtd’. I am testing this on localhost.prakashreddy.imduriParticipant4 years ago in reply to: Exact matches vs any word matches #31365Can you release this feature in next version ?
prakashreddy.imduriParticipant4 years ago in reply to: Boost Search on Taxonomy Pages #31364Hi, I want to boost title and then content, [only 2 boost fields in this case]
If I keep title as 5 and content as 3
or keep title as 50 and content as 10,
both means same results, as title is higher and content priority is less, or the number matters? or should I match their sum to 100 or 10 …prakashreddy.imduriParticipant4 years, 1 month ago in reply to: Any Action to synchronize new posts without clicking on Indexing button. #31337those are not getting indexed, just showing up in synchronized products. Unless we don’t hit on index, those aren’t showing in search results. We have a custom code to import those products from csv.
prakashreddy.imduriParticipant4 years, 1 month ago in reply to: Any Action to synchronize new posts without clicking on Indexing button. #31334We upload products through csv daily, so we have access to run some code while doing the upload functionality, Can you help with some hook or action, to index new posts.
prakashreddy.imduriParticipant4 years, 1 month ago in reply to: Add Transient Cache for Performance #31301to cache queries in some table, for faster response.