Search autocomplete design

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

justinvichard
Posts: 11
Joined: Thu Apr 16, 2020 11:39 am

Search autocomplete design

Post by justinvichard »

Hi!

I was wondering if there was a way to change the design of the autocomplete results?

When I write something on the search field, I can see autocomplete results.

But how can I do to make it looks like this?

https://fr.sandro-paris.com/fr/faq-17/faq.html
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Search autocomplete design

Post by Thorsten »

Hi,

you mean like this?
Bildschirmfoto 2020-04-19 um 09.16.19.png
bye
Thorsten
You do not have the required permissions to view the files attached to this post.
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
justinvichard
Posts: 11
Joined: Thu Apr 16, 2020 11:39 am

Re: Search autocomplete design

Post by justinvichard »

Yup!
Exactly ;)
justinvichard
Posts: 11
Joined: Thu Apr 16, 2020 11:39 am

Re: Search autocomplete design

Post by justinvichard »

I forgot to ask this:

Is that normal that, when I'm seraching something like "my computer doesn't work", I can see the article displaying through the autocomplete?
But nothing is displaying if I use a keyword set up on the article (ex : boot, black, screen)
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Search autocomplete design

Post by Thorsten »

Hi,

depends... what search technology do you use, the database or Elasticsearch?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
justinvichard
Posts: 11
Joined: Thu Apr 16, 2020 11:39 am

Re: Search autocomplete design

Post by justinvichard »

Database for the moment.
But I can use elastic if it can solve my issue ;)
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Search autocomplete design

Post by Thorsten »

Hi,

the search results are much better with Elasticsearch

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
justinvichard
Posts: 11
Joined: Thu Apr 16, 2020 11:39 am

Re: Search autocomplete design

Post by justinvichard »

Great! I will try with elastic.

Is there a way to change the design of the autocomplet results so it looks more than your picture?
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Search autocomplete design

Post by Thorsten »

Hi,

it is possible. I played with the code a little bit, but there are some bugs, e.g. https://github.com/bassjobsen/Bootstrap ... issues/131

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
justinvichard
Posts: 11
Joined: Thu Apr 16, 2020 11:39 am

Re: Search autocomplete design

Post by justinvichard »

Thanks!

Concerning the autocomplete/elastic issue, i set up an elastic server and configure phpmyfaq to use it.
It's working. All my documents are registered into my index.

But I can't search using keywords :/
2020-04-29 18_00_04-SRV-MDT - TeamViewer.png
2020-04-29 18_00_22-SRV-MDT - TeamViewer.png
2020-04-29 18_00_38-SRV-MDT - TeamViewer.png
You do not have the required permissions to view the files attached to this post.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Search autocomplete design

Post by Thorsten »

Hi,

I'll check it on my test installation.

The code looks good for me: https://github.com/thorsten/phpMyFAQ/bl ... #L148-L198

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
justinvichard
Posts: 11
Joined: Thu Apr 16, 2020 11:39 am

Re: Search autocomplete design

Post by justinvichard »

Just to precise, the search system is working.

It's searching for title, content and keywords.

But the autocomplete system only give me result if I look for title.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Search autocomplete design

Post by Thorsten »

Hi,

this is strange as the autocomplete query only filters for the language, the search query for the normal search not...

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
justinvichard
Posts: 11
Joined: Thu Apr 16, 2020 11:39 am

Re: Search autocomplete design

Post by justinvichard »

Do you thin my problem can come from a langage issue?
If it is, why can I try to bypass it?

Waht's the purpose of the langage filter?

For the record, i'm french.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Search autocomplete design

Post by Thorsten »

Hi,

no, it's not language specific, I see the issue on my large test installation as well. And it's not the search query, it's a filter in the typeahead functionality. I'm working on this issue.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply