Clickable attribute

Hello,
I am exploring the use of Algolia in conjunction with GeneWeb, an open source genealogy software.
For the time being I am using the built-in index upload and GUI.

One of the attributes of my records is a URL pointing to my local genealogy database (http://localhost…).
I cant find in the documentation hints showing how to make this attribute clickable!

Thanks for your help.
Henri

Hi Henri,

If I understand correctly, you are trying to open links directly from the dashboard.
This feature is not supported as is.
You can however generate a UI Demo for your index that would have the links clickable. You will find the UI Demo link under Dashboard > Indices > (Your index name) > UI Demos.

I hope this helps you a bit.

Jonathan

I tried the UI-demo, and selected the url available in each record (http://localhost…) as Url attribute but this does not produce any result.
The only clickable item in the results is the primary attribute, and it display the same start page.

Henri

Hi Henri,

The primary attribute should indeed be the one that is clickable, and it should point to the URL present in the field you set as containing the Url for the demo.

I created a quick demo with a few records with links and some additional information, and the links were correctly pointing me to the right URL. It might be that there is an issue with your URLs and your server fails to interpret the link correctly and therefore makes you fall back to the same start page.

Jonathan

Thanks for your hints.
What should be the syntax of the Url attribute?
I am currently using http://localhost/some_additional_parameters
Is Algolia trying to verify the validity of the Url (which would exclude a localhost value!!)?
Is this validity check mandatory?
I remember seeing some configuration widget showing separately the hostname and the parameters, but I just cant find it again in your documentation!!

Cheers, (from France!!)
Henri

Hi Henri,

I may have a solution for you!
It turns out that Algolia doesn’t like to let you access urls that don’t have tlds (probably because of some parsing error). A simple fix for that is to create an alias for localhost in /etc/hosts like localdomain.com and to rename your links to point to that alias.

You can find more about how to create an alias for localhost here: https://stackoverflow.com/questions/19425086/alias-hostname-for-localhost

Best,

Jonathan

Thanks for the tip. I will try.
In the meantime, I have changed the url to point to a web visible copy of my base.
One issues though:


The image above shows my current setup.
I find the Url line to be superfluous, but when I suppress it from the returned attributes, the primary attribute is not clickable anymore (or rather, it points to the demo page).

Cheers,
Henri

Hi Henri,

The UI Demos use the same API as any other library we propose and therefore if you make the URL unretrievable by the API, the field does not appear in the search results and the UI cannot properly link the result to a URL (it can’t guess it), so it defaults to an empty href, which links to the current page.

The UI Demos are a super rough sketch of what you can do with our UI tools, and we strongly invite you to build your own using for instance, InstantSearch (which is available in many flavors, such as React, Angular, Vue, or just plain javascript).

Best,
Jonathan

Trying to use InstantSearch.js without success!!
Here is my html code below (with my appId and apiKey xxxed out.
If I read correctly the instantsearch.js page, at this step, I should see some results coming back from my index!! I get none. I am executing this html file on my Mac. The various <link …> commands operate correctly (I get the content if I click on the link in source mode).

Thanks for any hint!!
Henri

Searching a GeneWeb base

Essai de page search d'une base GeneWeb avec Algolia

Searchbox:

Results:

Hi Henri,

Would it possible for you to open another issue about the InstantSearch.js?
I believe this goes out of the scope of the initial subject of this discussion, and we try to have people easily find answers to their questions by having the subject of the issue match with the content of the discussion.

Thanks!

I have done so, but since discovered I has improperly copy/pasted the sample code.
My new post should probably be removed!
Problem solved

Thanks
Henri

Thanks for the tip. It works as said.
Took me an iteration to really grasp what tld meant!! :wink:

Thanks,
Henri