algolia

Using Algolia react-instantsearch with react-native

不羁的心 提交于 2019-12-14 03:57:50
问题 I'm trying to get the new Algolia react-instantsearch component using react-native. I've been following the guide and I'm completely stuck. Basically, anytime I try to add my <SearchBox /> component inside the <InstantSearch /> component, my app dies with a Expected a component class, got [object Object] . As far as I can tell, I'm wiring up <SearchBox /> to the connectSearchBox connector so I'm not sure what's going on. Code (I do have real values for appId, apiKey, & index): import React,

JObject Parse Data with a variable as the value

馋奶兔 提交于 2019-12-13 03:50:00
问题 I am trying to decipher the correct syntax for using JObject Parse when I need to have one of the values set by a variable. This is for using Algolia to push a new object to my search index. songIndexHelper.PartialUpdateObject(JObject.Parse(@"{""ApprovalFL"":"true", ""objectID"":"'+Accepted.Value+'"}")); I receive Accepted.Value from my function argument. For example, Accepted.Value could equal something like 98. Also, true should be formatted as boolean instead of a string. The above is my

Complex “featured product” model using query-time ranking (optional filters)

夙愿已清 提交于 2019-12-12 19:53:22
问题 I have a products index that displays filtered results on category pages. For a given category , any amount of products may be flagged as featured , meaning it displays first. When products are displayed for a category , only one featured product should show at a time (at random from the available products flagged as featured) Additionally, a product should not be flagged as featured if it has date range fields and the current date is not within the range So, my index might look something

Algolia redirect to search results

坚强是说给别人听的谎言 提交于 2019-12-12 06:45:05
问题 I'm having problem with redirecting search results to page that I want to display results. Want to have search bar in header so that my results are displayed on results page or something similar. All was done by tutorial (Laracasts), still learning javascript, so I'm a bit stuck here.. Some help would be great! index.blade.php <script src="http://code.jquery.com/jquery.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.11.1/typeahead.bundle.min.js"></script>

Cloud Functions for Firebase to index Firebase Database Objects in Algolia

纵饮孤独 提交于 2019-12-11 09:12:53
问题 I went through docs, github repositories but nothing worked for me yet. My datastructure: App { posts : { <post_keys> : { auth_name : "name", text : "some text" //and many other fields } } } 1) Github repository : If I use this, I only get one field from one function, if I need all the fields, I would need to write separate functions for each, which is a bad approach. 2) Algolia Official Docs for Node.js : This cannot be deployed as a cloud function, but it does what I intend to do. How can I

How to fix this error “Impossible to connect, please check your Algolia Application Id”?

心不动则不痛 提交于 2019-12-11 09:04:40
问题 I have everything correct, as written at laravel/algolia websites. I tried to read lot of documentations and tutorials about Laravel Scout installation, but still can't find solution. I have everything correct in my settings and also APIs are correct but still getting this error: Impossible to connect, please check your Algolia Application Id. 回答1: I had the same issue (with Windows 10) and found this exception in the stack trace: cURL error 60: SSL certificate problem: unable to get local

Algolia search with a certain category first

不问归期 提交于 2019-12-11 08:44:04
问题 I'm trying to search Algolia and have results for a certain category show up before all other categories. Here's an example: Data in Algolia { name: Harry Potter, category: book}, { name: The Avengers, category: movie}, { name: Pottery, category: movie} Problem Let's say the normal Algolia algorithm has Harry Potter way more relevant than the movie Pottery , so normally if you searched pot then Harry Potter would show up ahead of Pottery . I want to pass Algolia the search term pot and the

Algolia: searching multiple indices in Laravel

谁说我不能喝 提交于 2019-12-11 05:45:54
问题 I would like to set up algolia to search multiple indices in Laravel, using something simple like this. Route::get('/search/{query}', function ($query) { $queries = [ [ 'indexName' => 'movies_index', 'query' => $query, 'hitsPerPage' => 3 ], [ 'indexName' => 'directors', 'query' => $query, 'hitsPerPage' => 3, ], [ 'indexName' => 'screenwriters', 'query' => $query, 'hitsPerPage' => 10 ] ]; var_dump($queries);}); But I'm a beginner in laravel and algolia as well so I'm not entirely sure how to

How to display the matched words of an Algolia search query?

你说的曾经没有我的故事 提交于 2019-12-11 02:25:37
问题 I'm using Algolia's algoliasearch-client-js and autocomplete.js to power searches on my website. That works. But I also want to include the excerpt/snippet of the text with which the search query matches. How to do that? My current code is: autocomplete('#search-input', { hint: true, autoselect: true }, [ { source: autocomplete.sources.hits(index, { hitsPerPage: 7 }), displayKey: 'title', templates: { footer: '<span class="search-foot">Powered by <a href="https://www.algolia.com/" target="

Algolia instantsearch.js callback function

只愿长相守 提交于 2019-12-09 17:00:44
问题 I am using Algolia instantsearch.js as my site search. The setup process was rather easy and straightforward, including .js and .css files, creating templates and then create one more .js file with app() function for setting up my app (appId, apiKey, indexName) and widgets. What I need is a function that will execute each time a search function ran, preferably right after the hits are shown. Maybe there is a widget for that? Thanks! 回答1: You can listen the render event like described here, it