Forum Replies Created
-
prakashreddy.imduriParticipant3 years, 7 months ago in reply to: Search PDF from ACF Field Embed Content #32958
Thank you, working fine with this filter.
prakashreddy.imduriParticipant3 years, 7 months ago in reply to: Search PDF from ACF Field Embed Content #32930I only want to index a certain field, which has the pdf url.. not all acf fields..
prakashreddy.imduriParticipant3 years, 8 months ago in reply to: Two different search results templates #32795In our case in the same website we would to use 2 types of templates,
Example 1:
All the post types
Facets with types and sectorsExample 2:
Only post types ‘post’
Facets with ‘tags’Is that possible?
prakashreddy.imduriParticipant3 years, 11 months ago in reply to: Search in title based on condition #31563I am able to get desired result if this function is modified : public function search_engine_client_set_query_fields(), but is there any hook to modify it, without editing plugin code.
prakashreddy.imduriParticipant4 years ago in reply to: No text specified for text query #31540Log With query monitor or without it in this case ?
prakashreddy.imduriParticipant4 years ago in reply to: Stop indexing from test instances #31526any update on this ..
prakashreddy.imduriParticipant4 years ago in reply to: Limit Search results to a certain custom taxonomy #31481Okay, how can I pass on regex as a search query to match titles only, when the query matches a specific word..
Currently, the search is happening across the title and content(custom fields), But wanted to limit to title for specific query.add_action( WPSOLR_Events::WPSOLR_FILTER_UPDATE_WPSOLR_QUERY, 'update_query_existing', 10, 1 ); function update_query_existing( WPSOLR_Query $wpsolr_query ) { if ( 'test' === $current_keywords ) { if (preg_match('/^X-[a-zA-Z-]+/', $post_title)) { // checking if this condition matches, then return those results return the posts matching the above regex; } } }prakashreddy.imduriParticipant4 years ago in reply to: Boost Search on Taxonomy Pages #31437Can we pass like this too : As we don’t want to miss results related to test, Can we have results of test and trial both, instead of mapping it to trial only.
if ( 'test' === $current_keywords ) { $wpsolr_query->set_wpsolr_query( 'trial or test' ); }prakashreddy.imduriParticipant4 years ago in reply to: Boost Search on Taxonomy Pages #31405Okay, this worked.
prakashreddy.imduriParticipant4 years ago in reply to: Boost Search on Taxonomy Pages #31401I have a test case, how can I achieve same with add action or filters? This code reference is taken from abstractsearchclient file. I want to catch the existing query word and change it based on some conditions. I modified it here to show you, I dont want to modify real code.
$word = 'old'; // example word to match ?s= // Get a chance to update the WPSOLR_Query $wpsolr_query = apply_filters( WPSOLR_Events::WPSOLR_FILTER_UPDATE_WPSOLR_QUERY, $wpsolr_query ); $this->set_wpsolr_query( $wpsolr_query ); // Create the query $this->query_select = $this->search_engine_client_create_query_select(); // Change search query if it matches this variable $word // test case if ( $_GET['s'] == 'test' ) { // Set the query keywords. $this->set_keywords( $word ); return; }- This reply was modified 4 years ago by prakashreddy.imduri.
prakashreddy.imduriParticipant4 years ago in reply to: Exact matches vs any word matches #31395Also, as this schema is not related to elastic search it seems,
<copyField source="title" dest="text_exact"/> <copyField source="tags" dest="text_exact"/> <copyField source="categories" dest="text_exact"/> <copyField source="content" dest="text_exact"/> <copyField source="permalink" dest="text_exact"/> <copyField source="comments" dest="text_exact"/>can you tell me how to implement exact match search for elastic index ?
prakashreddy.imduriParticipant4 years ago in reply to: Exact matches vs any word matches #31392Hi, I tried it without $this, getting this errors:
Uncaught Error: syntax error, unexpected ‘public’ (T_PUBLIC), expecting end of file [if used without class]
Fatal error: Uncaught Error: Call to a member function getQuery() on array
Here is my code : I didnt add class here, but its there in actual codeuse Solarium\QueryType\Select\Query\Query; add_action( WPSOLR_Events::WPSOLR_ACTION_SOLARIUM_QUERY, 'wpsolr_action_query', 10, 1 ); function wpsolr_action_query( $parameters ) { if ($_GET['s'] == "") { return; } $solarium_query = $parameters[ WPSOLR_Events::WPSOLR_ACTION_SOLARIUM_QUERY__PARAM_SOLARIUM_QUERY ]; $query = $solarium_query->getQuery(); $query_exact = $_GET['s']; $query = $solarium_query->setQuery($query_exact); }- This reply was modified 4 years ago by prakashreddy.imduri.
- This reply was modified 4 years ago by prakashreddy.imduri.
prakashreddy.imduriParticipant4 years ago in reply to: Boost Search on Taxonomy Pages #31391As I need the products which has most matching words matching to query entered. Will relevancy alone is enough for this, or boosting is also needed?
Can you tell me how these both work together… what logic goes behind the relevancy.
Only keeping content in boost seems good, but issue is Its not bringing up products matching up titles first, If I add title and content both with same boost, the results aren’t good. It seems, its ignoring the order by matching more words in the product.
Main priority of results I want to give to products with more matching words to come at first, and then on the top of it, sorted by keywords matching in title.. Can you tell me , what setting to add for this in plugin.prakashreddy.imduriParticipant4 years ago in reply to: how to set word variations #31390Okay, let me if you get some commands to execute, after your tests.
prakashreddy.imduriParticipant4 years ago in reply to: how to set word variations #31388Or is there any way to manipulate queries. We are trying to send the correct query if user enters some spelling mistakes, here not taking about suggestions. but even if user enters wrong spelling, trying to match that words in a text file and send that correct value to query. same concept as mapping in synonym file.. want to use such format of txt