Hello,
on our website the search suggestions works well. But if you click search button to go to the search results page, it shows only 1 result.
Also, if we enable search page setting “Use Algolia with Instantsearch.js“, the page shows a number of results found (counter below the search field), but no actual results – 0 posts.
Are you aware what the problem can be?
Thank you!
How do you add this on the frontend? Is there a custom block?
If no, then is there a way I can hook into the plugin to add the functionality into a custom block?
Hi i want to ask something, im working with custom theme on my site. I have install algolia plugin and it works fine but only in default search bar. I want to include algolia in my search bar.
To be more spesific:
Algolia works on:
https://clickdate.gr/?s=test
But not wok on my home page on my custom search bar.
I found the differences. The difference is that algolia see the name of the input element to work: Default wordpress input is name=”s”. But im using name=”keyword-search”. If i change the name from “keyword-search” to “s” then algolia works but didnt work search propetly. Is anyway to change the default name “s” to “keyword-search” to work algolia to my search bar with name=”keyword-search”?
]]>When searching for a term, the term is highlighted in the results by an EM
tag. (I’ve simplified this using highlightPreTag
and highlightPostTag
in the algolia_search_params
filter.) However, the EM
tag is added within HTML attributes (e.g. the IMG
and A
tags), which breaks the page’s HTML.
Can this be fixed, or is there a way to completely remove the highlighting altogether? I’ve found attributesToHighlight
but it’s unclear how to modify this using WordPress filters in the PHP code.
Hi,
does the plugin respect a wordpress reverse proxy configuration? We are not able to authenticate with our algolia credentials. On pages without reverse proxy the installation is working properly.
Can you name the endpoints that are requested during activation, like e.g. “auth.algolia.com”?
Thanks and have a nice day,
Jan
]]>We have finally activated the plugin and indexed all the data. A few minutes after the indexing is completed, the plugin stops providing results, and although everything appears correct in Algolia, we keep getting ‘No results’ from the autocomplete in the search box. However, the results do show up on the results page. It seems there is an issue with the autocomplete. What can we do?
]]>Hi guys, is there a way, maybe in pro version, to sync post daily or when a post is saved? How it works exactly? Do I have to push a button every day?
]]>Hey there – I’d like to specify a results div for the autocomplete, becuause when the results extend beyond a certain height, scrolling has the page scrolling in the background, and I cannot figure out how to target the results into a div with overflow-y: auto. This would enable me to have a smooth scroll, i think, of the results, without the jitter that comes with the results in the autocompelte today. Even if you reduce to just a few results, any scrolling jitters the results box. Any tips or tricks?
]]>I’m looking for a plugin which allows me to customise and interface with an Algolia index without having to build one from scratch. This plugin came up and looked to be exactly what I needed however I don’t want to use it for Site search but instead other custom pages.
Upon trying it, I came across the search section on this page (
https://github.com/WebDevStudios/wp-search-with-algolia/wiki/Getting-Started#search-page) which made me think it would be of use. Seems that you don’t need to use it on search but would still get the benefit of converting your post types into indexes. However, it seems that on more recent releases the default option to not use it for site search disables the plugin completely rather than still allowing it to work.
Is this still an option with the plugin or will I need to look for alternatives or do you have details of any I can try?
Thanks
On the website below, typing a search for “dog’s” on iPhone/iOS devices return zero results, apparently because iOS uses smart apostrophe (aka typographer’s apostrophe) instead of a straight apostrophe. I see in the Agolia documentation that straight apostrophes are removed via Normalization during search queries and indexing, however the smart apostrophes do not appear to be handled the same way, resulting in zero results.
Here is a link to the search results using a straight apostrophe (the apostrophe is removed from the search term by the system before results are displayed, showing correct results):
https://gobookfair.com/search/dogs/
Here is a link to the search results using a smart apostrophe as entered in the search form from an iOS device. You can also simulate this on desktop devices by entering a smart apostrophe instead of a straight apostrophe (no results)
https://gobookfair.com/search/dog%E2%80%99s/
Do you have any suggestions on how to get around this issue with iOS devices using smart apostrophes? Thank you for your time!
]]>Is there a roadmap for updating the automplete-js version to 1.12? So we could leverage automatic events collection
]]>Its there way to exclude a word from the search query in Algolia by adding code in functions.php
I tried adding this code in functions.php and I couldn’t get it to work.
add_filter(‘algolia_search_params’, ‘exclude_specific_phrases_from_search’, 10, 2);
function exclude_specific_phrases_from_search($params, $query) {
$excluded_phrases = [‘bird guard glass’, ‘bird glass’];
foreach ($excluded_phrases as $phrase) { $query .= ‘ -“‘.$phrase.'”‘;
}
$params[‘query’] = $query;
return $params;
}
Hi,
I have WPML running on the site and working with WPML. We’ve only translated half the site into the second language, German. So when you’re on a page in German, we want to hide two of the columns in Autocomplete, so you don’t show them (as these will still be in English).
This could be done in CSS using display: none
but the content shows inside classes called aa-dataset-1
– aa-dataset-4
and there’s gaurantee what category will show in each.
Is there a better way to target these? I know this is a bit of an odd request, so any help is much appreciated.
I want to add the user’s search history to the autocomplete template. I checked the following page, but there is no concrete code example, so I don’t know how to implement it.
I added the following source to my autocomplete.php:
<script type="text/html" id="tmpl-autocomplete-recent-search">
<a class="suggestion-link" href="/search?keyword={{ data.query }}" title="{{ data.query }}">
<span class="suggestion-post-title">data.query
</span>
</a>
</script>
var recentSearch = {
source: function() {
return 'test';
},
templates: {
header:function () {
return wp.template( 'autocomplete-header' )( {
label: 'recent-search'
} );
},
suggestion: function () {
return wp.template( 'autocomplete-recent-search' )( {
query: 'clock'
} );
}
}
};
sources.push( recentSearch );
/* Instantiate autocomplete.js */
var autocomplete = algoliaAutocomplete( element, config, sources )
.on( 'autocomplete:selected', function ( e, suggestion ) {
The autocomplete template only shows suggestions for existing posts. However, it seems that the HTML output is <div class="aa-dataset-4"></div>
There is no content.
I haven’t implemented the search history saving yet, but I’d like to get the new section to appear in the autocomplete template first.
Thanks in advance.
]]>Hello,
Is it possible to configure filters on certain fields in an index directly in the plugin interface?
I have an event index and I would like past events not to appear in my search results.
Thanks
]]>Thank you as always.
Facets are displayed in the sidebar on the index screen in the Algolia dashboard. When you search in the search bar, the number next to each Facet changes according to the search results. I would like to achieve this in WordPress.
My plugin setting is “Use Algolia in the backend”. I am not using “Instantsearch.js”.
Can I obtain the Facets value according to the search keywords in the backend? More specifically, on my site, there is a price range filter button (for example, 1000-2000 or 2000-3000) on the search result page, and I would like to display the number of items after the price.
In the current Algolia post index, a single product price is registered as “searchableAttributes” and “attributesForFaceting”.
I looked at the following page, but I did not understand it.
https://www.algolia.com/doc/api-reference/api-parameters/facets/
Hello
Can I create a reverse image search? Are there any detailed instructions?
Thank you!
Hello.
Thanks for the plugin – was working really well – but now seems to be very slow to index.
Initially the first index was very fast pushing 90k in about 30 minutes. Now I’ve made changes to the shared attributes via the algolia_post_attachment_shared_attributes
filter. I’ve ‘cleared’ the index via the Algolia dashbaord.
Upon re-indexing via the ‘autocomplete’ page in the wp-admin area – I can see hundreds of individual ‘deleteObject’ API requests logged. These seem to be hitting the batch endpoint, but only deleting one record at a time, which is slow.
This seems totally redundant – as the index could be cleared to remove all records?
Tracking through the plugin – it appears to be the update_post_records()
function in class-algolia-posts-index.php that checks if records are to be updated then deletes them.
Is there a way to bypass this – or to run a faster resync, like when I originally installed the plugin.
Thanks,
Ian.
]]>Thank you for your continued support.
I run an e-commerce site. Can I limit the autocomplete search targets for each type of archive page?
For example, on the electrical appliances category page, I want to target TVs, refrigerators, washing machines, microwaves, etc., and on the child category, the television category page, I want to only target televisions with autocomplete. For reference, there are food and daily necessities categories parallel to the electrical appliances category. Imagine an e-commerce site like Amazon.
All product information uses the standard WordPress post (post_type=’post’). I check posts_post in the autocomplete settings. There are no separate post types for each category.
]]>for some reason the number of posts in wordpress does not match number of records in all_posts_ index. what are some reasons that could be the case ?
]]>Hi guys, I can’t understand how to make the snippet like this data._snippetResult['content'].value
work but with ACFs
I only found {{data.acf_field}}
around but it shows the content including html tags
do you have any solution about this?
Thanks in advance for the support
]]>We are going to use WP Search with Algolia for just one site in our multi-site network. Do we still need the pro version, or can we use the free version?
]]>hi there
i’m having trouble setting my taxonomy term as a variable and truncating it for use in autocomplete.php via any method. has anyone ever done this before ? i was able to output the taxonomy variable, just cant shorten it now
]]>A WordPress post seems to get split by this plugin and those multiple records are then stored in Algolia. Our avg. record size is 2.65KB. I think 10 KB is the limit?
Can this split size be reduced so that we store less records for each post in Algolia?
Also, when we use the instantsearch display page using the suggested code and instantiate the widgets, the count there shown is for the number of records (including the split ones) and not the number of search results. Any suggestions on how to fix this?
For example, the facet for post types shows Posts 9,505 (we have around 1600 posts). Clicking on it returns 1677 results found, which is accurate.. Those 1677 posts have 9505 records because they’re being split.
does anyone know why there is a searchable posts index and a posts index ?
all my posts should be searchable but the counts are different and it wastes an index on my free plan with Algolia…
]]>Hi,
I have a site a client is testing, and they’ve asked if possible that when you’re on a mobile and type a word, clicking the Go button on the OS doesn’t send you to search page. This way you’ll be kept seeing the autocomplete dropdown and be able to scroll through those.
This is a bit of a follow-on to this question I had resolved (which fixed that issue).
Many thanks,
Just want to share my solution to filter WPML results on the Search Page.
It took me 10 days to find solution for this, it kept returning the wrong numbers for pagination, and often there would be a different number of products on the results page.
After this, everything works as it should:
function eRaccoon_custom_algolia_search_params($params) {
if (function_exists('wpml_get_current_language')) {
$params['filters'] = "wpml.locale:" . wpml_get_current_language();
}
return $params;
}
add_filter('algolia_search_params', 'eRaccoon_custom_algolia_search_params');
function eRaccoon_custom_post_shared_attributes(array $shared_attributes, WP_Post $post) {
if (function_exists('wpml_get_post_language_details')) {
$lang_details = wpml_get_post_language_details($post->ID);
$shared_attributes['wpml.locale'] = $lang_details['language_code'];
}return $shared_attributes;
}
add_filter('algolia_post_shared_attributes', 'eRaccoon_custom_post_shared_attributes', 10, 2);
Cheers!
Hi sorry if this has been asked somewhere because I’m sure it’s been done before but I couldn’t find a question from my search, maybe just using the wrong keywords.
Right now only search results template uses instant search. I’d like to also use algolia on other woocommerce templates like product category, tag, and attribute archive pages.
for example going to example.com/product-category/cat-1/cat-2 should return products already filtered for cat-1 and cat-2 but with algolia integration so they can also use the instant search box and faceting.
Thanks in advance!
]]>Hi! I installed Algolia earlier today. Setup was a breeze, everything is working fine. I mean, almost everything. Analytics in Algolia dashboard isn’t working. All panels say “Failed. Load failed” and application stats still show 0 (zero) operations.
Is there a delay or something is wrong with my setup?
]]>When running a search with the plugin active, the search term is highlighted with an em
tag (class="algolia-search-highlight"
). This tag is applied within link title
attributes, which breaks the HTML structure of the page.