I want to pass input value from one page and show search results in another page in algolia instant search? - algolia

I want to achieve just like this... https://magento.algolia.com/ when you search from home page and it will redirects you to result page along with the previous search value. I saw about the custom widgets of the instant search but cannot come over through. If I search 'shirt' over the above given site, the result page should be like this, https://magento.algolia.com/catalogsearch/result/?q=shirt

Finally found solution,using the following parameters and then pass it to InstantSearch at initialization. searching_value van be fetched using javascript.
searchParameters:{
query: searching_value
}

Related

Algolia: search - show featured items on top of page

Is it possible to construct order criteria in that way that all featured items goes always on top of the page ? I would like to performe this in single search call.
Algolia allows you sort your results. If your records have this "featured" attribute indexed, you can ad it to your formula.
Please find the doc here: https://www.algolia.com/doc/guides/relevance/sorting/
I also recommend you to have a look at the Custom ranking feature https://www.algolia.com/doc/guides/relevance/ranking/#custom-ranking

Prefill form with data in Symfony2, shorter way

I have form that can be used on front page and search page. Users can fill it on both pages, but if it is filled on front page it has to show filled data on the search page. to achieve this I'm forwarding the data, and using syntax similar to this.
$form->get('field')->setData($form_data['field']);
Everything works fine, except the form has a lot of fields and I was wondering if there is a shorter way to achieve the same?
What about this?
$form_data['return_box'] = (boolean)$form_data['return_box'];
$form->setData($form_data);

Confluence REST API - expanding page body when retrieving page by title

I'm accessing a Confluence page by its title using the latest REST API. To retrieve more details on certain fields, I'm passing the expand parameter (see Confluence Docs):
https://xyz.atlassian.net/wiki/rest/api/content/?title=Architecture&spaceKey=XX&expand=body
or
https://xyz.atlassian.net/wiki/rest/api/content/?title=Architecture&spaceKey=XX&expand=body.view
But the results don't hold any information on the found page body.
Note, this is working fine with requests using a page id only. Using the title to retrieve the page is threaded similar to search results, hence the expand feature seems not to work the same. According to the documentation it should work as per my example. Am I missing something?
You need to specify which type of "body" you want in the expansion parameter.
In your case, something like this:
https://xyz.atlassian.net/wiki/rest/api/content/?title=Architecture&spaceKey=XX&expand=body.view
https://xyz.atlassian.net/wiki/rest/api/content/?title=Architecture&spaceKey=XX&expand=body.export_view
Possible values are:
editor
export_view
anonymous_export_view
view
storage

Google Custom Search - filter data from within a page

I am using Google Custom Search to enable users to search within my website. I have one page that displays a list of references (to scientific publications) as well as other content (dynamic). I would like to display the results so that references including the search term are filtered into their own tab - but I can only see how to label a whole page, not just a section of a page. This means I can filter for 'references', but get other content in my results, not just the references. Is there a way of doing this?
Yes, its possible I suppose. And I had done it sometime back and it had worked as expected. Have a look at these links -
Tech Republic Set up Google Custom Search and
Google Custom Search

Dynamically search for Facebook pages on my site

I would like to have a search box on my site that works like the Facebook search box, but searching only for Pages.
I know that using the Graph API I can do searches like these:
search?q=London&type=page
and it will return a list of pages related to the keyword "London".
The difference is that I would like it to be dynamic. So that when the user starts typing "Lon" it starts suggesting pages. How can I do it?
Well the most straightforward is that you just call the API as the user types
search?q=L&type=page
search?q=Lo&type=page
search?q=Lon&type=page
search?q=Lond&type=page
search?q=Londo&type=page
search?q=London&type=page
And update your app view after each API call.